From a7a9149289b538150b5ec600a19899ce3b19d3b7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Thu, 5 Dec 2024 00:28:21 -0800 Subject: [PATCH 01/11] feat(all): auto-regenerate discovery clients (#2897) --- adsenseplatform/v1/adsenseplatform-api.json | 6 +- adsenseplatform/v1/adsenseplatform-gen.go | 5 +- .../v1/androiddeviceprovisioning-api.json | 6 +- .../v1/androiddeviceprovisioning-gen.go | 9 +- eventarc/v1/eventarc-api.json | 30 ++- eventarc/v1/eventarc-gen.go | 90 ++++---- .../v1beta/firebasedatabase-api.json | 4 +- .../v1beta/firebasedatabase-gen.go | 2 +- localservices/v1/localservices-api.json | 6 +- localservices/v1/localservices-gen.go | 5 +- vault/v1/vault-api.json | 4 +- vault/v1/vault-gen.go | 2 +- walletobjects/v1/walletobjects-api.json | 4 +- walletobjects/v1/walletobjects-gen.go | 4 +- youtube/v3/youtube-api.json | 68 +------ youtube/v3/youtube-gen.go | 192 ------------------ 16 files changed, 101 insertions(+), 336 deletions(-) diff --git a/adsenseplatform/v1/adsenseplatform-api.json b/adsenseplatform/v1/adsenseplatform-api.json index c0c646b06bf..6588e00bcb5 100644 --- a/adsenseplatform/v1/adsenseplatform-api.json +++ b/adsenseplatform/v1/adsenseplatform-api.json @@ -446,7 +446,7 @@ } } }, - "revision": "20240722", + "revision": "20241204", "rootUrl": "https://adsenseplatform.googleapis.com/", "schemas": { "Account": { @@ -703,11 +703,11 @@ "id": "TimeZone", "properties": { "id": { - "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "description": "IANA Time Zone Database time zone. For example \"America/New_York\".", "type": "string" }, "version": { - "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "description": "Optional. IANA Time Zone Database version number. For example \"2019a\".", "type": "string" } }, diff --git a/adsenseplatform/v1/adsenseplatform-gen.go b/adsenseplatform/v1/adsenseplatform-gen.go index 1d24c18dd46..c84bdfda928 100644 --- a/adsenseplatform/v1/adsenseplatform-gen.go +++ b/adsenseplatform/v1/adsenseplatform-gen.go @@ -530,9 +530,10 @@ func (s Site) MarshalJSON() ([]byte, error) { // TimeZone: Represents a time zone from the IANA Time Zone Database // (https://www.iana.org/time-zones). type TimeZone struct { - // Id: IANA Time Zone Database time zone, e.g. "America/New_York". + // Id: IANA Time Zone Database time zone. For example "America/New_York". Id string `json:"id,omitempty"` - // Version: Optional. IANA Time Zone Database version number, e.g. "2019a". + // Version: Optional. IANA Time Zone Database version number. For example + // "2019a". Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Id") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json index 48c7c65ea98..7ca41aac66a 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-api.json @@ -106,7 +106,7 @@ "parameterOrder": [], "parameters": { "pageSize": { - "description": "The maximum number of customers to show in a page of results. A number between 1 and 100 (inclusive).", + "description": "Required. The maximum number of customers to show in a page of results. A number between 1 and 100 (inclusive).", "format": "int32", "location": "query", "type": "integer" @@ -309,7 +309,7 @@ ], "parameters": { "pageSize": { - "description": "The maximum number of devices to show in a page of results. Must be between 1 and 100 inclusive.", + "description": "Required. The maximum number of devices to show in a page of results. Must be between 1 and 100 inclusive.", "format": "int64", "location": "query", "type": "string" @@ -851,7 +851,7 @@ } } }, - "revision": "20240916", + "revision": "20241202", "rootUrl": "https://androiddeviceprovisioning.googleapis.com/", "schemas": { "ClaimDeviceRequest": { diff --git a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go index b59b696007b..a832a6a940d 100644 --- a/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go +++ b/androiddeviceprovisioning/v1/androiddeviceprovisioning-gen.go @@ -1718,8 +1718,8 @@ func (r *CustomersService) List() *CustomersListCall { return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// customers to show in a page of results. A number between 1 and 100 +// PageSize sets the optional parameter "pageSize": Required. The maximum +// number of customers to show in a page of results. A number between 1 and 100 // (inclusive). func (c *CustomersListCall) PageSize(pageSize int64) *CustomersListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) @@ -2606,8 +2606,9 @@ func (r *CustomersDevicesService) List(parent string) *CustomersDevicesListCall return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// devices to show in a page of results. Must be between 1 and 100 inclusive. +// PageSize sets the optional parameter "pageSize": Required. The maximum +// number of devices to show in a page of results. Must be between 1 and 100 +// inclusive. func (c *CustomersDevicesListCall) PageSize(pageSize int64) *CustomersDevicesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c diff --git a/eventarc/v1/eventarc-api.json b/eventarc/v1/eventarc-api.json index 8ee8e521c1c..687f970746b 100644 --- a/eventarc/v1/eventarc-api.json +++ b/eventarc/v1/eventarc-api.json @@ -722,7 +722,7 @@ ], "parameters": { "enrollmentId": { - "description": "Required. The user-provided ID to be assigned to the Enrollment. It should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "description": "Required. The user-provided ID to be assigned to the Enrollment. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.", "location": "query", "type": "string" }, @@ -1006,7 +1006,7 @@ ], "parameters": { "googleApiSourceId": { - "description": "Required. The user-provided ID to be assigned to the GoogleApiSource. It should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "description": "Required. The user-provided ID to be assigned to the GoogleApiSource. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.", "location": "query", "type": "string" }, @@ -1290,7 +1290,7 @@ ], "parameters": { "messageBusId": { - "description": "Required. The user-provided ID to be assigned to the MessageBus. It should match the format (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$)", + "description": "Required. The user-provided ID to be assigned to the MessageBus. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.", "location": "query", "type": "string" }, @@ -1601,7 +1601,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "eventarc.projects.locations.operations.cancel", @@ -1740,7 +1740,7 @@ "type": "string" }, "pipelineId": { - "description": "Required. The user-provided ID to be assigned to the Pipeline.", + "description": "Required. The user-provided ID to be assigned to the Pipeline. It should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`.", "location": "query", "type": "string" }, @@ -2369,7 +2369,7 @@ } } }, - "revision": "20241029", + "revision": "20241119", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { @@ -2461,6 +2461,13 @@ "description": "Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt their event data. It must match the pattern `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", "type": "string" }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Resource labels.", + "type": "object" + }, "name": { "description": "Required. The resource name of the channel. Must be unique within the location on the project and must be in `projects/{project}/locations/{location}/channels/{channel_id}` format.", "type": "string" @@ -2528,6 +2535,13 @@ "readOnly": true, "type": "string" }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Resource labels.", + "type": "object" + }, "name": { "description": "Required. The name of the connection.", "type": "string" @@ -2960,7 +2974,7 @@ "id": "GoogleCloudEventarcV1PipelineDestinationHttpEndpoint", "properties": { "messageBindingTemplate": { - "description": "Optional. The CEL expression used to modify how the destination-bound HTTP request is constructed. If a binding expression is not specified here, the message is treated as a CloudEvent and is mapped to the HTTP request according to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this representation, all fields except the `data` and `datacontenttype` field on the message are mapped to HTTP request headers with a prefix of `ce-`. To construct the HTTP request payload and the value of the content-type HTTP header, the payload format is defined as follows: 1) Use the output_payload_format_type on the Pipeline.Destination if it is set, else: 2) Use the input_payload_format_type on the Pipeline if it is set, else: 3) Treat the payload as opaque binary data. The `data` field of the message is converted to the payload format or left as-is for case 3) and then attached as the payload of the HTTP request. The `content-type` header on the HTTP request is set to the payload format type or left empty for case 3). However, if a mediation has updated the `datacontenttype` field on the message so that it is not the same as the payload format type but it is still a prefix of the payload format type, then the `content-type` header on the HTTP request is set to this `datacontenttype` value. For example, if the `datacontenttype` is \"application/json\" and the payload format type is \"application/json; charset=utf-8\", then the `content-type` header on the HTTP request is set to \"application/json; charset=utf-8\". If a non-empty binding expression is specified then this expression is used to modify the default CloudEvent HTTP Protocol Binding Binary Content representation. The result of the CEL expression must be a map of key/value pairs which is used as follows: - If a map named `headers` exists on the result of the expression, then its key/value pairs are directly mapped to the HTTP request headers. The headers values are constructed from the corresponding value type's canonical representation. If the `headers` field doesn't exist then the resulting HTTP request will be the headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message. Note: If the specified binding expression, has updated the `datacontenttype` field on the message so that it is not the same as the payload format type but it is still a prefix of the payload format type, then the `content-type` header in the `headers` map is set to this `datacontenttype` value. - If a field named `body` exists on the result of the expression then its value is directly mapped to the body of the request. If the value of the `body` field is of type bytes or string then it is used for the HTTP request body as-is, with no conversion. If the body field is of any other type then it is converted to a JSON string. If the body field does not exist then the resulting payload of the HTTP request will be data value of the CloudEvent HTTP Binding Binary Content Mode representation of the final message as described earlier. - Any other fields in the resulting expression will be ignored. The CEL expression may access the incoming CloudEvent message in its definition, as follows: - The `data` field of the incoming CloudEvent message can be accessed using the `message.data` value. Subfields of `message.data` may also be accessed if an input_payload_format has been specified on the Pipeline. - Each attribute of the incoming CloudEvent message can be accessed using the `message.` value, where is replaced with the name of the attribute. - Existing headers can be accessed in the CEL expression using the `headers` variable. The `headers` variable defines a map of key/value pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message as described earlier. For example, the following CEL expression can be used to construct an HTTP request by adding an additional header to the HTTP headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message and by overwriting the body of the request: ``` { \"headers\": headers.merge({\"new-header-key\": \"new-header-value\"}), \"body\": \"new-body\" } ``` Additionally, the following CEL extension functions are provided for use in this CEL expression: - toBase64Url: map.toBase64Url() -\u003e string - Converts a CelValue to a base64url encoded string - toJsonString: map.toJsonString() -\u003e string - Converts a CelValue to a JSON string - merge: map1.merge(map2) -\u003e map3 - Merges the passed CEL map with the existing CEL map the function is applied to. - If the same key exists in both maps, if the key's value is type map both maps are merged else the value from the passed map is used. - denormalize: map.denormalize() -\u003e map - Denormalizes a CEL map such that every value of type map or key in the map is expanded to return a single level map. - The resulting keys are \".\" separated indices of the map keys. - For example: { \"a\": 1, \"b\": { \"c\": 2, \"d\": 3 } \"e\": [4, 5] } .denormalize() -\u003e { \"a\": 1, \"b.c\": 2, \"b.d\": 3, \"e.0\": 4, \"e.1\": 5 } - setField: map.setField(key, value) -\u003e message - Sets the field of the message with the given key to the given value. - If the field is not present it will be added. - If the field is present it will be overwritten. - The key can be a dot separated path to set a field in a nested message. - Key must be of type string. - Value may be any valid type. - removeFields: map.removeFields([key1, key2, ...]) -\u003e message - Removes the fields of the map with the given keys. - The keys can be a dot separated path to remove a field in a nested message. - If a key is not found it will be ignored. - Keys must be of type string. - toMap: [map1, map2, ...].toMap() -\u003e map - Converts a CEL list of CEL maps to a single CEL map - toDestinationPayloadFormat(): message.data.toDestinationPayloadFormat() -\u003e string or bytes - Converts the message data to the destination payload format specified in Pipeline.Destination.output_payload_format - This function is meant to be applied to the message.data field. - If the destination payload format is not set, the function will return the message data unchanged. - toCloudEventJsonWithPayloadFormat: message.toCloudEventJsonWithPayloadFormat() -\u003e map - Converts a message to the corresponding structure of JSON format for CloudEvents - This function applies toDestinationPayloadFormat() to the message data. It also sets the corresponding datacontenttype of the CloudEvent, as indicated by Pipeline.Destination.output_payload_format. If no output_payload_format is set it will use the existing datacontenttype on the CloudEvent if present, else leave datacontenttype absent. - This function expects that the content of the message will adhere to the standard CloudEvent format. If it doesn't then this function will fail. - The result is a CEL map that corresponds to the JSON representation of the CloudEvent. To convert that data to a JSON string it can be chained with the toJsonString function. The Pipeline expects that the message it receives adheres to the standard CloudEvent format. If it doesn't then the outgoing message request may fail with a persistent error.", + "description": "Optional. The CEL expression used to modify how the destination-bound HTTP request is constructed. If a binding expression is not specified here, the message is treated as a CloudEvent and is mapped to the HTTP request according to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this representation, all fields except the `data` and `datacontenttype` field on the message are mapped to HTTP request headers with a prefix of `ce-`. To construct the HTTP request payload and the value of the content-type HTTP header, the payload format is defined as follows: 1) Use the output_payload_format_type on the Pipeline.Destination if it is set, else: 2) Use the input_payload_format_type on the Pipeline if it is set, else: 3) Treat the payload as opaque binary data. The `data` field of the message is converted to the payload format or left as-is for case 3) and then attached as the payload of the HTTP request. The `content-type` header on the HTTP request is set to the payload format type or left empty for case 3). However, if a mediation has updated the `datacontenttype` field on the message so that it is not the same as the payload format type but it is still a prefix of the payload format type, then the `content-type` header on the HTTP request is set to this `datacontenttype` value. For example, if the `datacontenttype` is \"application/json\" and the payload format type is \"application/json; charset=utf-8\", then the `content-type` header on the HTTP request is set to \"application/json; charset=utf-8\". If a non-empty binding expression is specified then this expression is used to modify the default CloudEvent HTTP Protocol Binding Binary Content representation. The result of the CEL expression must be a map of key/value pairs which is used as follows: - If a map named `headers` exists on the result of the expression, then its key/value pairs are directly mapped to the HTTP request headers. The headers values are constructed from the corresponding value type's canonical representation. If the `headers` field doesn't exist then the resulting HTTP request will be the headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message. Note: If the specified binding expression, has updated the `datacontenttype` field on the message so that it is not the same as the payload format type but it is still a prefix of the payload format type, then the `content-type` header in the `headers` map is set to this `datacontenttype` value. - If a field named `body` exists on the result of the expression then its value is directly mapped to the body of the request. If the value of the `body` field is of type bytes or string then it is used for the HTTP request body as-is, with no conversion. If the body field is of any other type then it is converted to a JSON string. If the body field does not exist then the resulting payload of the HTTP request will be data value of the CloudEvent HTTP Binding Binary Content Mode representation of the final message as described earlier. - Any other fields in the resulting expression will be ignored. The CEL expression may access the incoming CloudEvent message in its definition, as follows: - The `data` field of the incoming CloudEvent message can be accessed using the `message.data` value. Subfields of `message.data` may also be accessed if an input_payload_format has been specified on the Pipeline. - Each attribute of the incoming CloudEvent message can be accessed using the `message.` value, where is replaced with the name of the attribute. - Existing headers can be accessed in the CEL expression using the `headers` variable. The `headers` variable defines a map of key/value pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message as described earlier. For example, the following CEL expression can be used to construct an HTTP request by adding an additional header to the HTTP headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message and by overwriting the body of the request: ``` { \"headers\": headers.merge({\"new-header-key\": \"new-header-value\"}), \"body\": \"new-body\" } ``` - The default binding for the message payload can be accessed using the `body` variable. It conatins a string representation of the message payload in the format specified by the `output_payload_format` field. If the `input_payload_format` field is not set, the `body` variable contains the same message payload bytes that were published. Additionally, the following CEL extension functions are provided for use in this CEL expression: - toBase64Url: map.toBase64Url() -\u003e string - Converts a CelValue to a base64url encoded string - toJsonString: map.toJsonString() -\u003e string - Converts a CelValue to a JSON string - merge: map1.merge(map2) -\u003e map3 - Merges the passed CEL map with the existing CEL map the function is applied to. - If the same key exists in both maps, if the key's value is type map both maps are merged else the value from the passed map is used. - denormalize: map.denormalize() -\u003e map - Denormalizes a CEL map such that every value of type map or key in the map is expanded to return a single level map. - The resulting keys are \".\" separated indices of the map keys. - For example: { \"a\": 1, \"b\": { \"c\": 2, \"d\": 3 } \"e\": [4, 5] } .denormalize() -\u003e { \"a\": 1, \"b.c\": 2, \"b.d\": 3, \"e.0\": 4, \"e.1\": 5 } - setField: map.setField(key, value) -\u003e message - Sets the field of the message with the given key to the given value. - If the field is not present it will be added. - If the field is present it will be overwritten. - The key can be a dot separated path to set a field in a nested message. - Key must be of type string. - Value may be any valid type. - removeFields: map.removeFields([key1, key2, ...]) -\u003e message - Removes the fields of the map with the given keys. - The keys can be a dot separated path to remove a field in a nested message. - If a key is not found it will be ignored. - Keys must be of type string. - toMap: [map1, map2, ...].toMap() -\u003e map - Converts a CEL list of CEL maps to a single CEL map - toCloudEventJsonWithPayloadFormat: message.toCloudEventJsonWithPayloadFormat() -\u003e map - Converts a message to the corresponding structure of JSON format for CloudEvents. - It converts `data` to destination payload format specified in `output_payload_format`. If `output_payload_format` is not set, the data will remain unchanged. - It also sets the corresponding datacontenttype of the CloudEvent, as indicated by `output_payload_format`. If no `output_payload_format` is set it will use the value of the \"datacontenttype\" attribute on the CloudEvent if present, else remove \"datacontenttype\" attribute. - This function expects that the content of the message will adhere to the standard CloudEvent format. If it doesn't then this function will fail. - The result is a CEL map that corresponds to the JSON representation of the CloudEvent. To convert that data to a JSON string it can be chained with the toJsonString function. The Pipeline expects that the message it receives adheres to the standard CloudEvent format. If it doesn't then the outgoing message request may fail with a persistent error.", "type": "string" }, "uri": { @@ -3447,7 +3461,7 @@ "type": "object" }, "LoggingConfig": { - "description": "The configuration for Platform Telemetry logging for Eventarc Avdvanced resources.", + "description": "The configuration for Platform Telemetry logging for Eventarc Advanced resources.", "id": "LoggingConfig", "properties": { "logSeverity": { diff --git a/eventarc/v1/eventarc-gen.go b/eventarc/v1/eventarc-gen.go index a72ce1ec20f..d420a030748 100644 --- a/eventarc/v1/eventarc-gen.go +++ b/eventarc/v1/eventarc-gen.go @@ -472,6 +472,8 @@ type Channel struct { // to encrypt/decrypt their event data. It must match the pattern // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. CryptoKeyName string `json:"cryptoKeyName,omitempty"` + // Labels: Optional. Resource labels. + Labels map[string]string `json:"labels,omitempty"` // Name: Required. The resource name of the channel. Must be unique within the // location on the project and must be in // `projects/{project}/locations/{location}/channels/{channel_id}` format. @@ -550,6 +552,8 @@ type ChannelConnection struct { Channel string `json:"channel,omitempty"` // CreateTime: Output only. The creation time. CreateTime string `json:"createTime,omitempty"` + // Labels: Optional. Resource labels. + Labels map[string]string `json:"labels,omitempty"` // Name: Required. The name of the connection. Name string `json:"name,omitempty"` // Uid: Output only. Server assigned ID of the resource. The server guarantees @@ -1216,48 +1220,49 @@ type GoogleCloudEventarcV1PipelineDestinationHttpEndpoint struct { // CloudEvent HTTP Binding Binary Content Mode representation of the final // message and by overwriting the body of the request: ``` { "headers": // headers.merge({"new-header-key": "new-header-value"}), "body": "new-body" } - // ``` Additionally, the following CEL extension functions are provided for use - // in this CEL expression: - toBase64Url: map.toBase64Url() -> string - - // Converts a CelValue to a base64url encoded string - toJsonString: - // map.toJsonString() -> string - Converts a CelValue to a JSON string - merge: - // map1.merge(map2) -> map3 - Merges the passed CEL map with the existing CEL - // map the function is applied to. - If the same key exists in both maps, if - // the key's value is type map both maps are merged else the value from the - // passed map is used. - denormalize: map.denormalize() -> map - Denormalizes a - // CEL map such that every value of type map or key in the map is expanded to - // return a single level map. - The resulting keys are "." separated indices of - // the map keys. - For example: { "a": 1, "b": { "c": 2, "d": 3 } "e": [4, 5] } - // .denormalize() -> { "a": 1, "b.c": 2, "b.d": 3, "e.0": 4, "e.1": 5 } - - // setField: map.setField(key, value) -> message - Sets the field of the - // message with the given key to the given value. - If the field is not present - // it will be added. - If the field is present it will be overwritten. - The - // key can be a dot separated path to set a field in a nested message. - Key - // must be of type string. - Value may be any valid type. - removeFields: + // ``` - The default binding for the message payload can be accessed using the + // `body` variable. It conatins a string representation of the message payload + // in the format specified by the `output_payload_format` field. If the + // `input_payload_format` field is not set, the `body` variable contains the + // same message payload bytes that were published. Additionally, the following + // CEL extension functions are provided for use in this CEL expression: - + // toBase64Url: map.toBase64Url() -> string - Converts a CelValue to a + // base64url encoded string - toJsonString: map.toJsonString() -> string - + // Converts a CelValue to a JSON string - merge: map1.merge(map2) -> map3 - + // Merges the passed CEL map with the existing CEL map the function is applied + // to. - If the same key exists in both maps, if the key's value is type map + // both maps are merged else the value from the passed map is used. - + // denormalize: map.denormalize() -> map - Denormalizes a CEL map such that + // every value of type map or key in the map is expanded to return a single + // level map. - The resulting keys are "." separated indices of the map keys. - + // For example: { "a": 1, "b": { "c": 2, "d": 3 } "e": [4, 5] } .denormalize() + // -> { "a": 1, "b.c": 2, "b.d": 3, "e.0": 4, "e.1": 5 } - setField: + // map.setField(key, value) -> message - Sets the field of the message with the + // given key to the given value. - If the field is not present it will be + // added. - If the field is present it will be overwritten. - The key can be a + // dot separated path to set a field in a nested message. - Key must be of type + // string. - Value may be any valid type. - removeFields: // map.removeFields([key1, key2, ...]) -> message - Removes the fields of the // map with the given keys. - The keys can be a dot separated path to remove a // field in a nested message. - If a key is not found it will be ignored. - // Keys must be of type string. - toMap: [map1, map2, ...].toMap() -> map - // Converts a CEL list of CEL maps to a single CEL map - - // toDestinationPayloadFormat(): message.data.toDestinationPayloadFormat() -> - // string or bytes - Converts the message data to the destination payload - // format specified in Pipeline.Destination.output_payload_format - This - // function is meant to be applied to the message.data field. - If the - // destination payload format is not set, the function will return the message - // data unchanged. - toCloudEventJsonWithPayloadFormat: + // toCloudEventJsonWithPayloadFormat: // message.toCloudEventJsonWithPayloadFormat() -> map - Converts a message to - // the corresponding structure of JSON format for CloudEvents - This function - // applies toDestinationPayloadFormat() to the message data. It also sets the - // corresponding datacontenttype of the CloudEvent, as indicated by - // Pipeline.Destination.output_payload_format. If no output_payload_format is - // set it will use the existing datacontenttype on the CloudEvent if present, - // else leave datacontenttype absent. - This function expects that the content - // of the message will adhere to the standard CloudEvent format. If it doesn't - // then this function will fail. - The result is a CEL map that corresponds to - // the JSON representation of the CloudEvent. To convert that data to a JSON - // string it can be chained with the toJsonString function. The Pipeline - // expects that the message it receives adheres to the standard CloudEvent - // format. If it doesn't then the outgoing message request may fail with a - // persistent error. + // the corresponding structure of JSON format for CloudEvents. - It converts + // `data` to destination payload format specified in `output_payload_format`. + // If `output_payload_format` is not set, the data will remain unchanged. - It + // also sets the corresponding datacontenttype of the CloudEvent, as indicated + // by `output_payload_format`. If no `output_payload_format` is set it will use + // the value of the "datacontenttype" attribute on the CloudEvent if present, + // else remove "datacontenttype" attribute. - This function expects that the + // content of the message will adhere to the standard CloudEvent format. If it + // doesn't then this function will fail. - The result is a CEL map that + // corresponds to the JSON representation of the CloudEvent. To convert that + // data to a JSON string it can be chained with the toJsonString function. The + // Pipeline expects that the message it receives adheres to the standard + // CloudEvent format. If it doesn't then the outgoing message request may fail + // with a persistent error. MessageBindingTemplate string `json:"messageBindingTemplate,omitempty"` // Uri: Required. The URI of the HTTP enpdoint. The value must be a RFC2396 URI // string. Examples: `https://svc.us-central1.p.local:8080/route`. Only the @@ -2000,7 +2005,7 @@ func (s Location) MarshalJSON() ([]byte, error) { } // LoggingConfig: The configuration for Platform Telemetry logging for Eventarc -// Avdvanced resources. +// Advanced resources. type LoggingConfig struct { // LogSeverity: Optional. The minimum severity of logs that will be sent to // Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be @@ -4916,7 +4921,7 @@ func (r *ProjectsLocationsEnrollmentsService) Create(parent string, enrollment * // EnrollmentId sets the optional parameter "enrollmentId": Required. The // user-provided ID to be assigned to the Enrollment. It should match the -// format (^a-z ([a-z0-9-]{0,61}[a-z0-9])?$). +// format `^a-z ([a-z0-9-]{0,61}[a-z0-9])?$`. func (c *ProjectsLocationsEnrollmentsCreateCall) EnrollmentId(enrollmentId string) *ProjectsLocationsEnrollmentsCreateCall { c.urlParams_.Set("enrollmentId", enrollmentId) return c @@ -5888,7 +5893,7 @@ func (r *ProjectsLocationsGoogleApiSourcesService) Create(parent string, googlea // GoogleApiSourceId sets the optional parameter "googleApiSourceId": Required. // The user-provided ID to be assigned to the GoogleApiSource. It should match -// the format (^a-z ([a-z0-9-]{0,61}[a-z0-9])?$). +// the format `^a-z ([a-z0-9-]{0,61}[a-z0-9])?$`. func (c *ProjectsLocationsGoogleApiSourcesCreateCall) GoogleApiSourceId(googleApiSourceId string) *ProjectsLocationsGoogleApiSourcesCreateCall { c.urlParams_.Set("googleApiSourceId", googleApiSourceId) return c @@ -6862,7 +6867,7 @@ func (r *ProjectsLocationsMessageBusesService) Create(parent string, messagebus // MessageBusId sets the optional parameter "messageBusId": Required. The // user-provided ID to be assigned to the MessageBus. It should match the -// format (^a-z ([a-z0-9-]{0,61}[a-z0-9])?$) +// format `^a-z ([a-z0-9-]{0,61}[a-z0-9])?$`. func (c *ProjectsLocationsMessageBusesCreateCall) MessageBusId(messageBusId string) *ProjectsLocationsMessageBusesCreateCall { c.urlParams_.Set("messageBusId", messageBusId) return c @@ -7974,7 +7979,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -8445,7 +8450,8 @@ func (r *ProjectsLocationsPipelinesService) Create(parent string, pipeline *Pipe } // PipelineId sets the optional parameter "pipelineId": Required. The -// user-provided ID to be assigned to the Pipeline. +// user-provided ID to be assigned to the Pipeline. It should match the format +// `^a-z ([a-z0-9-]{0,61}[a-z0-9])?$`. func (c *ProjectsLocationsPipelinesCreateCall) PipelineId(pipelineId string) *ProjectsLocationsPipelinesCreateCall { c.urlParams_.Set("pipelineId", pipelineId) return c diff --git a/firebasedatabase/v1beta/firebasedatabase-api.json b/firebasedatabase/v1beta/firebasedatabase-api.json index 7c48d5afe37..4fb72671c42 100644 --- a/firebasedatabase/v1beta/firebasedatabase-api.json +++ b/firebasedatabase/v1beta/firebasedatabase-api.json @@ -351,7 +351,7 @@ } } }, - "revision": "20221221", + "revision": "20241202", "rootUrl": "https://firebasedatabase.googleapis.com/", "schemas": { "DatabaseInstance": { @@ -444,7 +444,7 @@ } }, "servicePath": "", - "title": "Firebase Realtime Database API", + "title": "Firebase Realtime Database Management API", "version": "v1beta", "version_module": true } \ No newline at end of file diff --git a/firebasedatabase/v1beta/firebasedatabase-gen.go b/firebasedatabase/v1beta/firebasedatabase-gen.go index 5b84e2331e1..c6b41f6be33 100644 --- a/firebasedatabase/v1beta/firebasedatabase-gen.go +++ b/firebasedatabase/v1beta/firebasedatabase-gen.go @@ -4,7 +4,7 @@ // Code generated file. DO NOT EDIT. -// Package firebasedatabase provides access to the Firebase Realtime Database API. +// Package firebasedatabase provides access to the Firebase Realtime Database Management API. // // For product documentation, see: https://firebase.google.com/docs/reference/rest/database/database-management/rest/ // diff --git a/localservices/v1/localservices-api.json b/localservices/v1/localservices-api.json index 9ddf4f9eb48..30c735111e0 100644 --- a/localservices/v1/localservices-api.json +++ b/localservices/v1/localservices-api.json @@ -250,7 +250,7 @@ } } }, - "revision": "20240218", + "revision": "20241202", "rootUrl": "https://localservices.googleapis.com/", "schemas": { "GoogleAdsHomeservicesLocalservicesV1AccountReport": { @@ -568,11 +568,11 @@ "id": "GoogleTypeTimeZone", "properties": { "id": { - "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "description": "IANA Time Zone Database time zone. For example \"America/New_York\".", "type": "string" }, "version": { - "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "description": "Optional. IANA Time Zone Database version number. For example \"2019a\".", "type": "string" } }, diff --git a/localservices/v1/localservices-gen.go b/localservices/v1/localservices-gen.go index 7ed094e52dc..cfc5be7d02f 100644 --- a/localservices/v1/localservices-gen.go +++ b/localservices/v1/localservices-gen.go @@ -531,9 +531,10 @@ func (s GoogleAdsHomeservicesLocalservicesV1SearchDetailedLeadReportsResponse) M // GoogleTypeTimeZone: Represents a time zone from the IANA Time Zone Database // (https://www.iana.org/time-zones). type GoogleTypeTimeZone struct { - // Id: IANA Time Zone Database time zone, e.g. "America/New_York". + // Id: IANA Time Zone Database time zone. For example "America/New_York". Id string `json:"id,omitempty"` - // Version: Optional. IANA Time Zone Database version number, e.g. "2019a". + // Version: Optional. IANA Time Zone Database version number. For example + // "2019a". Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Id") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/vault/v1/vault-api.json b/vault/v1/vault-api.json index abe2d52cc0a..d2e11c9063e 100644 --- a/vault/v1/vault-api.json +++ b/vault/v1/vault-api.json @@ -1080,7 +1080,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "vault.operations.cancel", @@ -1203,7 +1203,7 @@ } } }, - "revision": "20240806", + "revision": "20241121", "rootUrl": "https://vault.googleapis.com/", "schemas": { "AccountCount": { diff --git a/vault/v1/vault-gen.go b/vault/v1/vault-gen.go index e56773c21b3..36c7a76d046 100644 --- a/vault/v1/vault-gen.go +++ b/vault/v1/vault-gen.go @@ -5491,7 +5491,7 @@ type OperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/walletobjects/v1/walletobjects-api.json b/walletobjects/v1/walletobjects-api.json index 7c49b5735df..87c70223600 100644 --- a/walletobjects/v1/walletobjects-api.json +++ b/walletobjects/v1/walletobjects-api.json @@ -2681,7 +2681,7 @@ } } }, - "revision": "20241119", + "revision": "20241203", "rootUrl": "https://walletobjects.googleapis.com/", "schemas": { "ActivationOptions": { @@ -3519,7 +3519,7 @@ "type": "object" }, "DiscoverableProgram": { - "description": "Information about how a class may be discovered and instantiated from within the Android Pay app. This is done by searching for a loyalty or gift card program and scanning or manually entering.", + "description": "Information about how a class may be discovered and instantiated from within the Google Wallet app. This is done by searching for a loyalty or gift card program and scanning or manually entering.", "id": "DiscoverableProgram", "properties": { "merchantSigninInfo": { diff --git a/walletobjects/v1/walletobjects-gen.go b/walletobjects/v1/walletobjects-gen.go index 5cc9483eaf2..39f5267af2d 100644 --- a/walletobjects/v1/walletobjects-gen.go +++ b/walletobjects/v1/walletobjects-gen.go @@ -1430,8 +1430,8 @@ func (s DiffVersionResponse) MarshalJSON() ([]byte, error) { } // DiscoverableProgram: Information about how a class may be discovered and -// instantiated from within the Android Pay app. This is done by searching for -// a loyalty or gift card program and scanning or manually entering. +// instantiated from within the Google Wallet app. This is done by searching +// for a loyalty or gift card program and scanning or manually entering. type DiscoverableProgram struct { // MerchantSigninInfo: Information about the ability to signin and add a // valuable for this program through a merchant site. Used when diff --git a/youtube/v3/youtube-api.json b/youtube/v3/youtube-api.json index ecc9d2ae864..5e898ab78c6 100644 --- a/youtube/v3/youtube-api.json +++ b/youtube/v3/youtube-api.json @@ -4067,78 +4067,12 @@ "$ref": "CommentThread" } } - }, - "resources": { - "liveChat": { - "resources": { - "messages": { - "methods": { - "stream": { - "description": "Allows a user to load live chat through a server-streamed RPC.", - "flatPath": "youtube/v3/liveChat/messages/stream", - "httpMethod": "GET", - "id": "youtube.youtube.v3.liveChat.messages.stream", - "parameterOrder": [], - "parameters": { - "hl": { - "description": "Specifies the localization language in which the system messages should be returned.", - "location": "query", - "type": "string" - }, - "liveChatId": { - "description": "The id of the live chat for which comments should be returned.", - "location": "query", - "type": "string" - }, - "maxResults": { - "default": "500", - "description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. Not used in the streaming RPC.", - "format": "uint32", - "location": "query", - "maximum": "2000", - "minimum": "200", - "type": "integer" - }, - "pageToken": { - "description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identify other pages that could be retrieved.", - "location": "query", - "type": "string" - }, - "part": { - "description": "The *part* parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id, snippet, and authorDetails.", - "location": "query", - "repeated": true, - "type": "string" - }, - "profileImageSize": { - "description": "Specifies the size of the profile image that should be returned for each user.", - "format": "uint32", - "location": "query", - "maximum": "720", - "minimum": "16", - "type": "integer" - } - }, - "path": "youtube/v3/liveChat/messages/stream", - "response": { - "$ref": "LiveChatMessageListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/youtube", - "https://www.googleapis.com/auth/youtube.force-ssl", - "https://www.googleapis.com/auth/youtube.readonly" - ] - } - } - } - } - } } } } } }, - "revision": "20241126", + "revision": "20241203", "rootUrl": "https://youtube.googleapis.com/", "schemas": { "AbuseReport": { diff --git a/youtube/v3/youtube-gen.go b/youtube/v3/youtube-gen.go index 69b32b97571..725dafb36ac 100644 --- a/youtube/v3/youtube-gen.go +++ b/youtube/v3/youtube-gen.go @@ -559,35 +559,11 @@ type YoutubeService struct { func NewYoutubeV3Service(s *Service) *YoutubeV3Service { rs := &YoutubeV3Service{s: s} - rs.LiveChat = NewYoutubeV3LiveChatService(s) return rs } type YoutubeV3Service struct { s *Service - - LiveChat *YoutubeV3LiveChatService -} - -func NewYoutubeV3LiveChatService(s *Service) *YoutubeV3LiveChatService { - rs := &YoutubeV3LiveChatService{s: s} - rs.Messages = NewYoutubeV3LiveChatMessagesService(s) - return rs -} - -type YoutubeV3LiveChatService struct { - s *Service - - Messages *YoutubeV3LiveChatMessagesService -} - -func NewYoutubeV3LiveChatMessagesService(s *Service) *YoutubeV3LiveChatMessagesService { - rs := &YoutubeV3LiveChatMessagesService{s: s} - return rs -} - -type YoutubeV3LiveChatMessagesService struct { - s *Service } type AbuseReport struct { @@ -19715,171 +19691,3 @@ func (c *YoutubeV3UpdateCommentThreadsCall) Do(opts ...googleapi.CallOption) (*C } return ret, nil } - -type YoutubeV3LiveChatMessagesStreamCall struct { - s *Service - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Stream: Allows a user to load live chat through a server-streamed RPC. -func (r *YoutubeV3LiveChatMessagesService) Stream() *YoutubeV3LiveChatMessagesStreamCall { - c := &YoutubeV3LiveChatMessagesStreamCall{s: r.s, urlParams_: make(gensupport.URLParams)} - return c -} - -// Hl sets the optional parameter "hl": Specifies the localization language in -// which the system messages should be returned. -func (c *YoutubeV3LiveChatMessagesStreamCall) Hl(hl string) *YoutubeV3LiveChatMessagesStreamCall { - c.urlParams_.Set("hl", hl) - return c -} - -// LiveChatId sets the optional parameter "liveChatId": The id of the live chat -// for which comments should be returned. -func (c *YoutubeV3LiveChatMessagesStreamCall) LiveChatId(liveChatId string) *YoutubeV3LiveChatMessagesStreamCall { - c.urlParams_.Set("liveChatId", liveChatId) - return c -} - -// MaxResults sets the optional parameter "maxResults": The *maxResults* -// parameter specifies the maximum number of items that should be returned in -// the result set. Not used in the streaming RPC. -func (c *YoutubeV3LiveChatMessagesStreamCall) MaxResults(maxResults int64) *YoutubeV3LiveChatMessagesStreamCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": The *pageToken* parameter -// identifies a specific page in the result set that should be returned. In an -// API response, the nextPageToken property identify other pages that could be -// retrieved. -func (c *YoutubeV3LiveChatMessagesStreamCall) PageToken(pageToken string) *YoutubeV3LiveChatMessagesStreamCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Part sets the optional parameter "part": The *part* parameter specifies the -// liveChatComment resource parts that the API response will include. Supported -// values are id, snippet, and authorDetails. -func (c *YoutubeV3LiveChatMessagesStreamCall) Part(part ...string) *YoutubeV3LiveChatMessagesStreamCall { - c.urlParams_.SetMulti("part", append([]string{}, part...)) - return c -} - -// ProfileImageSize sets the optional parameter "profileImageSize": Specifies -// the size of the profile image that should be returned for each user. -func (c *YoutubeV3LiveChatMessagesStreamCall) ProfileImageSize(profileImageSize int64) *YoutubeV3LiveChatMessagesStreamCall { - c.urlParams_.Set("profileImageSize", fmt.Sprint(profileImageSize)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *YoutubeV3LiveChatMessagesStreamCall) Fields(s ...googleapi.Field) *YoutubeV3LiveChatMessagesStreamCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *YoutubeV3LiveChatMessagesStreamCall) IfNoneMatch(entityTag string) *YoutubeV3LiveChatMessagesStreamCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *YoutubeV3LiveChatMessagesStreamCall) Context(ctx context.Context) *YoutubeV3LiveChatMessagesStreamCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *YoutubeV3LiveChatMessagesStreamCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *YoutubeV3LiveChatMessagesStreamCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "youtube/v3/liveChat/messages/stream") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "youtube.youtube.v3.liveChat.messages.stream" call. -// Any non-2xx status code is an error. Response headers are in either -// *LiveChatMessageListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *YoutubeV3LiveChatMessagesStreamCall) Do(opts ...googleapi.CallOption) (*LiveChatMessageListResponse, 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 := &LiveChatMessageListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *YoutubeV3LiveChatMessagesStreamCall) Pages(ctx context.Context, f func(*LiveChatMessageListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} From 587a11df23378396e3e174fd7021afcb4c59db0e Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Fri, 6 Dec 2024 00:24:21 -0800 Subject: [PATCH 02/11] feat(all): auto-regenerate discovery clients (#2899) --- .../v1/androidmanagement-api.json | 4 +- androidmanagement/v1/androidmanagement-gen.go | 5 + checks/v1alpha/checks-api.json | 10 +- checks/v1alpha/checks-gen.go | 12 +-- cloudchannel/v1/cloudchannel-api.json | 16 ++-- cloudchannel/v1/cloudchannel-gen.go | 53 +++++----- contentwarehouse/v1/contentwarehouse-api.json | 16 ++-- contentwarehouse/v1/contentwarehouse-gen.go | 53 +++++----- .../v1alpha/firebaseappdistribution-api.json | 27 ++++-- .../v1alpha/firebaseappdistribution-gen.go | 32 ++++++- firebasehosting/v1/firebasehosting-api.json | 4 +- firebasehosting/v1/firebasehosting-gen.go | 2 +- firebaseml/v2beta/firebaseml-api.json | 84 +++++++++++++++- firebaseml/v2beta/firebaseml-gen.go | 96 +++++++++++++++++++ iap/v1/iap-api.json | 4 +- iap/v1/iap-gen.go | 11 +-- 16 files changed, 327 insertions(+), 102 deletions(-) diff --git a/androidmanagement/v1/androidmanagement-api.json b/androidmanagement/v1/androidmanagement-api.json index d9347bdba27..4d654b8ff88 100644 --- a/androidmanagement/v1/androidmanagement-api.json +++ b/androidmanagement/v1/androidmanagement-api.json @@ -1168,7 +1168,7 @@ } } }, - "revision": "20241203", + "revision": "20241204", "rootUrl": "https://androidmanagement.googleapis.com/", "schemas": { "AdbShellCommandEvent": { @@ -6640,11 +6640,13 @@ "description": "Required. Wi-Fi roaming mode for the specified SSID.", "enum": [ "WIFI_ROAMING_MODE_UNSPECIFIED", + "WIFI_ROAMING_DISABLED", "WIFI_ROAMING_DEFAULT", "WIFI_ROAMING_AGGRESSIVE" ], "enumDescriptions": [ "Unspecified. Defaults to WIFI_ROAMING_DEFAULT.", + "Wi-Fi roaming is disabled. Supported on Android 15 and above on fully managed devices and work profiles on company-owned devices. A nonComplianceDetail with MANAGEMENT_MODE is reported for other management modes. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 15.", "Default Wi-Fi roaming mode of the device.", "Aggressive roaming mode which allows quicker Wi-Fi roaming. Supported on Android 15 and above on fully managed devices and work profiles on company-owned devices. A nonComplianceDetail with MANAGEMENT_MODE is reported for other management modes. A nonComplianceDetail with API_LEVEL is reported if the Android version is less than 15. A nonComplianceDetail with DEVICE_INCOMPATIBLE is reported if the device does not support aggressive roaming mode." ], diff --git a/androidmanagement/v1/androidmanagement-gen.go b/androidmanagement/v1/androidmanagement-gen.go index fbf703ab092..318233fba53 100644 --- a/androidmanagement/v1/androidmanagement-gen.go +++ b/androidmanagement/v1/androidmanagement-gen.go @@ -6723,6 +6723,11 @@ type WifiRoamingSetting struct { // Possible values: // "WIFI_ROAMING_MODE_UNSPECIFIED" - Unspecified. Defaults to // WIFI_ROAMING_DEFAULT. + // "WIFI_ROAMING_DISABLED" - Wi-Fi roaming is disabled. Supported on Android + // 15 and above on fully managed devices and work profiles on company-owned + // devices. A nonComplianceDetail with MANAGEMENT_MODE is reported for other + // management modes. A nonComplianceDetail with API_LEVEL is reported if the + // Android version is less than 15. // "WIFI_ROAMING_DEFAULT" - Default Wi-Fi roaming mode of the device. // "WIFI_ROAMING_AGGRESSIVE" - Aggressive roaming mode which allows quicker // Wi-Fi roaming. Supported on Android 15 and above on fully managed devices diff --git a/checks/v1alpha/checks-api.json b/checks/v1alpha/checks-api.json index c66991658d8..01581780e48 100644 --- a/checks/v1alpha/checks-api.json +++ b/checks/v1alpha/checks-api.json @@ -552,7 +552,7 @@ } } }, - "revision": "20241124", + "revision": "20241203", "rootUrl": "https://checks.googleapis.com/", "schemas": { "CancelOperationRequest": { @@ -682,9 +682,9 @@ "The model generates content that is malicious, intimidating, bullying, or abusive towards another individual.", "The model generates content that is sexually explicit in nature.", "The model promotes violence, hatred, discrimination on the basis of race, religion, etc.", - "The model facilitates harm by providing health advice or guidance.", + "The model provides or offers to facilitate access to medical advice or guidance.", "The model generates content that contains gratuitous, realistic descriptions of violence or gore.", - "" + "The model generates profanity and obscenities." ], "type": "string" }, @@ -734,9 +734,9 @@ "The model generates content that is malicious, intimidating, bullying, or abusive towards another individual.", "The model generates content that is sexually explicit in nature.", "The model promotes violence, hatred, discrimination on the basis of race, religion, etc.", - "The model facilitates harm by providing health advice or guidance.", + "The model provides or offers to facilitate access to medical advice or guidance.", "The model generates content that contains gratuitous, realistic descriptions of violence or gore.", - "" + "The model generates profanity and obscenities." ], "type": "string" }, diff --git a/checks/v1alpha/checks-gen.go b/checks/v1alpha/checks-gen.go index a4b2a3b7ae2..31536b3a7f2 100644 --- a/checks/v1alpha/checks-gen.go +++ b/checks/v1alpha/checks-gen.go @@ -415,11 +415,11 @@ type GoogleChecksAisafetyV1alphaClassifyContentRequestPolicyConfig struct { // explicit in nature. // "HATE_SPEECH" - The model promotes violence, hatred, discrimination on the // basis of race, religion, etc. - // "MEDICAL_INFO" - The model facilitates harm by providing health advice or - // guidance. + // "MEDICAL_INFO" - The model provides or offers to facilitate access to + // medical advice or guidance. // "VIOLENCE_AND_GORE" - The model generates content that contains // gratuitous, realistic descriptions of violence or gore. - // "OBSCENITY_AND_PROFANITY" + // "OBSCENITY_AND_PROFANITY" - The model generates profanity and obscenities. PolicyType string `json:"policyType,omitempty"` // Threshold: Optional. Score threshold to use when deciding if the content is // violative or non-violative. If not specified, the default 0.5 threshold for @@ -500,11 +500,11 @@ type GoogleChecksAisafetyV1alphaClassifyContentResponsePolicyResult struct { // explicit in nature. // "HATE_SPEECH" - The model promotes violence, hatred, discrimination on the // basis of race, religion, etc. - // "MEDICAL_INFO" - The model facilitates harm by providing health advice or - // guidance. + // "MEDICAL_INFO" - The model provides or offers to facilitate access to + // medical advice or guidance. // "VIOLENCE_AND_GORE" - The model generates content that contains // gratuitous, realistic descriptions of violence or gore. - // "OBSCENITY_AND_PROFANITY" + // "OBSCENITY_AND_PROFANITY" - The model generates profanity and obscenities. PolicyType string `json:"policyType,omitempty"` // Score: Final score for the results of this policy. Score float64 `json:"score,omitempty"` diff --git a/cloudchannel/v1/cloudchannel-api.json b/cloudchannel/v1/cloudchannel-api.json index 68d08366127..d72a3e5a69d 100644 --- a/cloudchannel/v1/cloudchannel-api.json +++ b/cloudchannel/v1/cloudchannel-api.json @@ -2289,7 +2289,7 @@ } } }, - "revision": "20241116", + "revision": "20241202", "rootUrl": "https://cloudchannel.googleapis.com/", "schemas": { "GoogleCloudChannelV1ActivateEntitlementRequest": { @@ -5962,18 +5962,18 @@ "type": "object" }, "GoogleTypePostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address. For example for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478", "id": "GoogleTypePostalAddress", "properties": { "addressLines": { - "description": "Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. \"Austin, TX\"), it is important that the line order is clear. The order of address lines should be \"envelope order\" for the country/region of the address. In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. \"ja\" for large-to-small ordering and \"ja-Latn\" or \"en\" for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).", + "description": "Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (For example \"Austin, TX\"), it is important that the line order is clear. The order of address lines should be \"envelope order\" for the country/region of the address. In places where this can vary (For example Japan), address_language is used to make it explicit (For example \"ja\" for large-to-small ordering and \"ja-Latn\" or \"en\" for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).", "items": { "type": "string" }, "type": "array" }, "administrativeArea": { - "description": "Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. \"Barcelona\" and not \"Catalonia\"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated.", + "description": "Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (For example \"Barcelona\" and not \"Catalonia\"). Many countries don't use an administrative area in postal addresses. For example in Switzerland this should be left unpopulated.", "type": "string" }, "languageCode": { @@ -5989,7 +5989,7 @@ "type": "string" }, "postalCode": { - "description": "Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).", + "description": "Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (For example state/zip validation in the U.S.A.).", "type": "string" }, "recipients": { @@ -6009,7 +6009,7 @@ "type": "integer" }, "sortingCode": { - "description": "Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like \"CEDEX\", optionally followed by a number (e.g. \"CEDEX 7\"), or just a number alone, representing the \"sector code\" (Jamaica), \"delivery area indicator\" (Malawi) or \"post office indicator\" (e.g. Côte d'Ivoire).", + "description": "Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like \"CEDEX\", optionally followed by a number (For example \"CEDEX 7\"), or just a number alone, representing the \"sector code\" (Jamaica), \"delivery area indicator\" (Malawi) or \"post office indicator\" (For example Côte d'Ivoire).", "type": "string" }, "sublocality": { @@ -6024,11 +6024,11 @@ "id": "GoogleTypeTimeZone", "properties": { "id": { - "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "description": "IANA Time Zone Database time zone. For example \"America/New_York\".", "type": "string" }, "version": { - "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "description": "Optional. IANA Time Zone Database version number. For example \"2019a\".", "type": "string" } }, diff --git a/cloudchannel/v1/cloudchannel-gen.go b/cloudchannel/v1/cloudchannel-gen.go index 35e60e85d65..973637b34c3 100644 --- a/cloudchannel/v1/cloudchannel-gen.go +++ b/cloudchannel/v1/cloudchannel-gen.go @@ -5152,42 +5152,43 @@ func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleTypePostalAddress: Represents a postal address, e.g. for postal +// GoogleTypePostalAddress: Represents a postal address. For example for postal // delivery or payments addresses. Given a postal address, a postal service can // deliver items to a premise, P.O. Box or similar. It is not intended to model // geographical locations (roads, towns, mountains). In typical usage an -// address would be created via user input or from importing existing data, +// address would be created by user input or from importing existing data, // depending on the type of process. Advice on address input / editing: - Use // an internationalization-ready address widget such as // https://github.com/google/libaddressinput) - Users should not be presented // with UI elements for input or editing of fields outside countries where that -// field is used. For more guidance on how to use this schema, please see: +// field is used. For more guidance on how to use this schema, see: // https://support.google.com/business/answer/6397478 type GoogleTypePostalAddress struct { // AddressLines: Unstructured address lines describing the lower levels of an // address. Because values in address_lines do not have type information and - // may sometimes contain multiple values in a single field (e.g. "Austin, TX"), - // it is important that the line order is clear. The order of address lines - // should be "envelope order" for the country/region of the address. In places - // where this can vary (e.g. Japan), address_language is used to make it - // explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for - // small-to-large). This way, the most specific line of an address can be - // selected based on the language. The minimum permitted structural - // representation of an address consists of a region_code with all remaining - // information placed in the address_lines. It would be possible to format such - // an address very approximately without geocoding, but no semantic reasoning - // could be made about any of the address components until it was at least - // partially resolved. Creating an address only containing a region_code and - // address_lines, and then geocoding is the recommended way to handle + // may sometimes contain multiple values in a single field (For example + // "Austin, TX"), it is important that the line order is clear. The order of + // address lines should be "envelope order" for the country/region of the + // address. In places where this can vary (For example Japan), address_language + // is used to make it explicit (For example "ja" for large-to-small ordering + // and "ja-Latn" or "en" for small-to-large). This way, the most specific line + // of an address can be selected based on the language. The minimum permitted + // structural representation of an address consists of a region_code with all + // remaining information placed in the address_lines. It would be possible to + // format such an address very approximately without geocoding, but no semantic + // reasoning could be made about any of the address components until it was at + // least partially resolved. Creating an address only containing a region_code + // and address_lines, and then geocoding is the recommended way to handle // completely unstructured addresses (as opposed to guessing which parts of the // address should be localities or administrative areas). AddressLines []string `json:"addressLines,omitempty"` // AdministrativeArea: Optional. Highest administrative subdivision which is // used for postal addresses of a country or region. For example, this can be a // state, a province, an oblast, or a prefecture. Specifically, for Spain this - // is the province and not the autonomous community (e.g. "Barcelona" and not - // "Catalonia"). Many countries don't use an administrative area in postal - // addresses. E.g. in Switzerland this should be left unpopulated. + // is the province and not the autonomous community (For example "Barcelona" + // and not "Catalonia"). Many countries don't use an administrative area in + // postal addresses. For example in Switzerland this should be left + // unpopulated. AdministrativeArea string `json:"administrativeArea,omitempty"` // LanguageCode: Optional. BCP-47 language code of the contents of this address // (if known). This is often the UI language of the input form or is expected @@ -5207,7 +5208,7 @@ type GoogleTypePostalAddress struct { Organization string `json:"organization,omitempty"` // PostalCode: Optional. Postal code of the address. Not all countries use or // require postal codes to be present, but where they are used, they may - // trigger additional validation with other parts of the address (e.g. + // trigger additional validation with other parts of the address (For example // state/zip validation in the U.S.A.). PostalCode string `json:"postalCode,omitempty"` // Recipients: Optional. The recipient at the address. This field may, under @@ -5226,9 +5227,10 @@ type GoogleTypePostalAddress struct { Revision int64 `json:"revision,omitempty"` // SortingCode: Optional. Additional, country-specific, sorting code. This is // not used in most regions. Where it is used, the value is either a string - // like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a - // number alone, representing the "sector code" (Jamaica), "delivery area - // indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). + // like "CEDEX", optionally followed by a number (For example "CEDEX 7"), or + // just a number alone, representing the "sector code" (Jamaica), "delivery + // area indicator" (Malawi) or "post office indicator" (For example Côte + // d'Ivoire). SortingCode string `json:"sortingCode,omitempty"` // Sublocality: Optional. Sublocality of the address. For example, this can be // neighborhoods, boroughs, districts. @@ -5254,9 +5256,10 @@ func (s GoogleTypePostalAddress) MarshalJSON() ([]byte, error) { // GoogleTypeTimeZone: Represents a time zone from the IANA Time Zone Database // (https://www.iana.org/time-zones). type GoogleTypeTimeZone struct { - // Id: IANA Time Zone Database time zone, e.g. "America/New_York". + // Id: IANA Time Zone Database time zone. For example "America/New_York". Id string `json:"id,omitempty"` - // Version: Optional. IANA Time Zone Database version number, e.g. "2019a". + // Version: Optional. IANA Time Zone Database version number. For example + // "2019a". Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Id") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/contentwarehouse/v1/contentwarehouse-api.json b/contentwarehouse/v1/contentwarehouse-api.json index 07ace1d74d7..5e54487c341 100644 --- a/contentwarehouse/v1/contentwarehouse-api.json +++ b/contentwarehouse/v1/contentwarehouse-api.json @@ -1156,7 +1156,7 @@ } } }, - "revision": "20240723", + "revision": "20241204", "rootUrl": "https://contentwarehouse.googleapis.com/", "schemas": { "CloudAiPlatformTenantresourceCloudSqlInstanceConfig": { @@ -5816,18 +5816,18 @@ "type": "object" }, "GoogleTypePostalAddress": { - "description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", + "description": "Represents a postal address. For example for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created by user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, see: https://support.google.com/business/answer/6397478", "id": "GoogleTypePostalAddress", "properties": { "addressLines": { - "description": "Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. \"Austin, TX\"), it is important that the line order is clear. The order of address lines should be \"envelope order\" for the country/region of the address. In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. \"ja\" for large-to-small ordering and \"ja-Latn\" or \"en\" for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).", + "description": "Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (For example \"Austin, TX\"), it is important that the line order is clear. The order of address lines should be \"envelope order\" for the country/region of the address. In places where this can vary (For example Japan), address_language is used to make it explicit (For example \"ja\" for large-to-small ordering and \"ja-Latn\" or \"en\" for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).", "items": { "type": "string" }, "type": "array" }, "administrativeArea": { - "description": "Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. \"Barcelona\" and not \"Catalonia\"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated.", + "description": "Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (For example \"Barcelona\" and not \"Catalonia\"). Many countries don't use an administrative area in postal addresses. For example in Switzerland this should be left unpopulated.", "type": "string" }, "languageCode": { @@ -5843,7 +5843,7 @@ "type": "string" }, "postalCode": { - "description": "Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).", + "description": "Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (For example state/zip validation in the U.S.A.).", "type": "string" }, "recipients": { @@ -5863,7 +5863,7 @@ "type": "integer" }, "sortingCode": { - "description": "Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like \"CEDEX\", optionally followed by a number (e.g. \"CEDEX 7\"), or just a number alone, representing the \"sector code\" (Jamaica), \"delivery area indicator\" (Malawi) or \"post office indicator\" (e.g. Côte d'Ivoire).", + "description": "Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like \"CEDEX\", optionally followed by a number (For example \"CEDEX 7\"), or just a number alone, representing the \"sector code\" (Jamaica), \"delivery area indicator\" (Malawi) or \"post office indicator\" (For example Côte d'Ivoire).", "type": "string" }, "sublocality": { @@ -5878,11 +5878,11 @@ "id": "GoogleTypeTimeZone", "properties": { "id": { - "description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", + "description": "IANA Time Zone Database time zone. For example \"America/New_York\".", "type": "string" }, "version": { - "description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", + "description": "Optional. IANA Time Zone Database version number. For example \"2019a\".", "type": "string" } }, diff --git a/contentwarehouse/v1/contentwarehouse-gen.go b/contentwarehouse/v1/contentwarehouse-gen.go index a9b312f470a..937b7040f3b 100644 --- a/contentwarehouse/v1/contentwarehouse-gen.go +++ b/contentwarehouse/v1/contentwarehouse-gen.go @@ -6634,42 +6634,43 @@ func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleTypePostalAddress: Represents a postal address, e.g. for postal +// GoogleTypePostalAddress: Represents a postal address. For example for postal // delivery or payments addresses. Given a postal address, a postal service can // deliver items to a premise, P.O. Box or similar. It is not intended to model // geographical locations (roads, towns, mountains). In typical usage an -// address would be created via user input or from importing existing data, +// address would be created by user input or from importing existing data, // depending on the type of process. Advice on address input / editing: - Use // an internationalization-ready address widget such as // https://github.com/google/libaddressinput) - Users should not be presented // with UI elements for input or editing of fields outside countries where that -// field is used. For more guidance on how to use this schema, please see: +// field is used. For more guidance on how to use this schema, see: // https://support.google.com/business/answer/6397478 type GoogleTypePostalAddress struct { // AddressLines: Unstructured address lines describing the lower levels of an // address. Because values in address_lines do not have type information and - // may sometimes contain multiple values in a single field (e.g. "Austin, TX"), - // it is important that the line order is clear. The order of address lines - // should be "envelope order" for the country/region of the address. In places - // where this can vary (e.g. Japan), address_language is used to make it - // explicit (e.g. "ja" for large-to-small ordering and "ja-Latn" or "en" for - // small-to-large). This way, the most specific line of an address can be - // selected based on the language. The minimum permitted structural - // representation of an address consists of a region_code with all remaining - // information placed in the address_lines. It would be possible to format such - // an address very approximately without geocoding, but no semantic reasoning - // could be made about any of the address components until it was at least - // partially resolved. Creating an address only containing a region_code and - // address_lines, and then geocoding is the recommended way to handle + // may sometimes contain multiple values in a single field (For example + // "Austin, TX"), it is important that the line order is clear. The order of + // address lines should be "envelope order" for the country/region of the + // address. In places where this can vary (For example Japan), address_language + // is used to make it explicit (For example "ja" for large-to-small ordering + // and "ja-Latn" or "en" for small-to-large). This way, the most specific line + // of an address can be selected based on the language. The minimum permitted + // structural representation of an address consists of a region_code with all + // remaining information placed in the address_lines. It would be possible to + // format such an address very approximately without geocoding, but no semantic + // reasoning could be made about any of the address components until it was at + // least partially resolved. Creating an address only containing a region_code + // and address_lines, and then geocoding is the recommended way to handle // completely unstructured addresses (as opposed to guessing which parts of the // address should be localities or administrative areas). AddressLines []string `json:"addressLines,omitempty"` // AdministrativeArea: Optional. Highest administrative subdivision which is // used for postal addresses of a country or region. For example, this can be a // state, a province, an oblast, or a prefecture. Specifically, for Spain this - // is the province and not the autonomous community (e.g. "Barcelona" and not - // "Catalonia"). Many countries don't use an administrative area in postal - // addresses. E.g. in Switzerland this should be left unpopulated. + // is the province and not the autonomous community (For example "Barcelona" + // and not "Catalonia"). Many countries don't use an administrative area in + // postal addresses. For example in Switzerland this should be left + // unpopulated. AdministrativeArea string `json:"administrativeArea,omitempty"` // LanguageCode: Optional. BCP-47 language code of the contents of this address // (if known). This is often the UI language of the input form or is expected @@ -6689,7 +6690,7 @@ type GoogleTypePostalAddress struct { Organization string `json:"organization,omitempty"` // PostalCode: Optional. Postal code of the address. Not all countries use or // require postal codes to be present, but where they are used, they may - // trigger additional validation with other parts of the address (e.g. + // trigger additional validation with other parts of the address (For example // state/zip validation in the U.S.A.). PostalCode string `json:"postalCode,omitempty"` // Recipients: Optional. The recipient at the address. This field may, under @@ -6708,9 +6709,10 @@ type GoogleTypePostalAddress struct { Revision int64 `json:"revision,omitempty"` // SortingCode: Optional. Additional, country-specific, sorting code. This is // not used in most regions. Where it is used, the value is either a string - // like "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a - // number alone, representing the "sector code" (Jamaica), "delivery area - // indicator" (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). + // like "CEDEX", optionally followed by a number (For example "CEDEX 7"), or + // just a number alone, representing the "sector code" (Jamaica), "delivery + // area indicator" (Malawi) or "post office indicator" (For example Côte + // d'Ivoire). SortingCode string `json:"sortingCode,omitempty"` // Sublocality: Optional. Sublocality of the address. For example, this can be // neighborhoods, boroughs, districts. @@ -6736,9 +6738,10 @@ func (s GoogleTypePostalAddress) MarshalJSON() ([]byte, error) { // GoogleTypeTimeZone: Represents a time zone from the IANA Time Zone Database // (https://www.iana.org/time-zones). type GoogleTypeTimeZone struct { - // Id: IANA Time Zone Database time zone, e.g. "America/New_York". + // Id: IANA Time Zone Database time zone. For example "America/New_York". Id string `json:"id,omitempty"` - // Version: Optional. IANA Time Zone Database version number, e.g. "2019a". + // Version: Optional. IANA Time Zone Database version number. For example + // "2019a". Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Id") to unconditionally // include in API requests. By default, fields with empty or default values are diff --git a/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json b/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json index 0962da59887..34fb5125106 100644 --- a/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json +++ b/firebaseappdistribution/v1alpha/firebaseappdistribution-api.json @@ -776,7 +776,7 @@ } } }, - "revision": "20241121", + "revision": "20241204", "rootUrl": "https://firebaseappdistribution.googleapis.com/", "schemas": { "AndroidxCrawlerOutputPoint": { @@ -988,6 +988,7 @@ "type": "object" }, "GoogleFirebaseAppdistroV1alphaApp": { + "description": "An app.", "id": "GoogleFirebaseAppdistroV1alphaApp", "properties": { "aabCertificate": { @@ -1085,6 +1086,7 @@ "type": "object" }, "GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest": { + "description": "The request message for `CreateReleaseNotes`.", "id": "GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest", "properties": { "releaseNotes": { @@ -1095,6 +1097,7 @@ "type": "object" }, "GoogleFirebaseAppdistroV1alphaCreateReleaseNotesResponse": { + "description": "The response message for `CreateReleaseNotes`.", "id": "GoogleFirebaseAppdistroV1alphaCreateReleaseNotesResponse", "properties": {}, "type": "object" @@ -1310,6 +1313,7 @@ "type": "object" }, "GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseRequest": { + "description": "The request message for `EnableAccessOnRelease`.", "id": "GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseRequest", "properties": { "buildVersion": { @@ -1340,6 +1344,7 @@ "type": "object" }, "GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseResponse": { + "description": "The response message for `EnableAccessOnRelease`.", "id": "GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseResponse", "properties": {}, "type": "object" @@ -1370,6 +1375,7 @@ "type": "object" }, "GoogleFirebaseAppdistroV1alphaGetUploadStatusResponse": { + "description": "The response message for `GetUploadStatus`.", "id": "GoogleFirebaseAppdistroV1alphaGetUploadStatusResponse", "properties": { "errorCode": { @@ -1442,11 +1448,11 @@ "ERROR" ], "enumDescriptions": [ - "", - "", - "", - "", - "" + "Status unspecified.", + "The upload is in progress.", + "The binary has already been uploaded.", + "The upload was successful.", + "The upload failed." ], "type": "string" } @@ -1491,9 +1497,11 @@ "type": "object" }, "GoogleFirebaseAppdistroV1alphaJwt": { + "description": "A JWT token.", "id": "GoogleFirebaseAppdistroV1alphaJwt", "properties": { "token": { + "description": "The JWT token (three Base64URL-encoded strings joined by dots).", "type": "string" } }, @@ -1574,6 +1582,7 @@ "type": "object" }, "GoogleFirebaseAppdistroV1alphaProvisionAppResponse": { + "description": "The response message for `ProvisionApp`.", "id": "GoogleFirebaseAppdistroV1alphaProvisionAppResponse", "properties": {}, "type": "object" @@ -1637,9 +1646,11 @@ "type": "object" }, "GoogleFirebaseAppdistroV1alphaReleaseNotes": { + "description": "Release notes for a release.", "id": "GoogleFirebaseAppdistroV1alphaReleaseNotes", "properties": { "releaseNotes": { + "description": "The actual release notes text from the user.", "type": "string" } }, @@ -1678,6 +1689,10 @@ "description": "The name of the release test resource. Format: `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_id}`", "type": "string" }, + "testCase": { + "description": "Optional. The test case that was used to generate this release test. Note: The test case may have changed or been deleted since the release test was created. Format: `projects/{project_number}/apps/{app}/testCases/{test_case}`", + "type": "string" + }, "testState": { "description": "Output only. The state of the release test.", "enum": [ diff --git a/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go b/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go index 56e2893ecab..2e0589807bc 100644 --- a/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go +++ b/firebaseappdistribution/v1alpha/firebaseappdistribution-gen.go @@ -541,6 +541,7 @@ func (s GoogleFirebaseAppdistroV1alphaAiStepResult) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleFirebaseAppdistroV1alphaApp: An app. type GoogleFirebaseAppdistroV1alphaApp struct { // AabCertificate: App bundle test certificate generated for the app. AabCertificate *GoogleFirebaseAppdistroV1alphaAabCertificate `json:"aabCertificate,omitempty"` @@ -652,6 +653,8 @@ type GoogleFirebaseAppdistroV1alphaCancelReleaseTestResponse struct { googleapi.ServerResponse `json:"-"` } +// GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest: The request message +// for `CreateReleaseNotes`. type GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest struct { // ReleaseNotes: The actual release notes body from the user ReleaseNotes *GoogleFirebaseAppdistroV1alphaReleaseNotes `json:"releaseNotes,omitempty"` @@ -673,6 +676,8 @@ func (s GoogleFirebaseAppdistroV1alphaCreateReleaseNotesRequest) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleFirebaseAppdistroV1alphaCreateReleaseNotesResponse: The response +// message for `CreateReleaseNotes`. type GoogleFirebaseAppdistroV1alphaCreateReleaseNotesResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -872,6 +877,8 @@ func (s GoogleFirebaseAppdistroV1alphaDeviceInteractionWait) MarshalJSON() ([]by return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseRequest: The request +// message for `EnableAccessOnRelease`. type GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseRequest struct { // BuildVersion: Optional. Ignored. Used to be build version of the app release // if an instance identifier was provided for the release_id. @@ -904,6 +911,8 @@ func (s GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseRequest) MarshalJSON( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseResponse: The response +// message for `EnableAccessOnRelease`. type GoogleFirebaseAppdistroV1alphaEnableAccessOnReleaseResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -961,6 +970,8 @@ func (s GoogleFirebaseAppdistroV1alphaGetTesterUdidsResponse) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleFirebaseAppdistroV1alphaGetUploadStatusResponse: The response message +// for `GetUploadStatus`. type GoogleFirebaseAppdistroV1alphaGetUploadStatusResponse struct { // ErrorCode: The error code associated with (only set on "FAILURE") // @@ -997,11 +1008,11 @@ type GoogleFirebaseAppdistroV1alphaGetUploadStatusResponse struct { // Status: The status of the upload // // Possible values: - // "STATUS_UNSPECIFIED" - // "IN_PROGRESS" - // "ALREADY_UPLOADED" - // "SUCCESS" - // "ERROR" + // "STATUS_UNSPECIFIED" - Status unspecified. + // "IN_PROGRESS" - The upload is in progress. + // "ALREADY_UPLOADED" - The binary has already been uploaded. + // "SUCCESS" - The upload was successful. + // "ERROR" - The upload failed. Status string `json:"status,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -1076,7 +1087,9 @@ func (s GoogleFirebaseAppdistroV1alphaGoalDetails) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleFirebaseAppdistroV1alphaJwt: A JWT token. type GoogleFirebaseAppdistroV1alphaJwt struct { + // Token: The JWT token (three Base64URL-encoded strings joined by dots). Token string `json:"token,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -1218,6 +1231,8 @@ func (s GoogleFirebaseAppdistroV1alphaLoginCredentialFieldHints) MarshalJSON() ( return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleFirebaseAppdistroV1alphaProvisionAppResponse: The response message for +// `ProvisionApp`. type GoogleFirebaseAppdistroV1alphaProvisionAppResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -1266,7 +1281,9 @@ func (s GoogleFirebaseAppdistroV1alphaRelease) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleFirebaseAppdistroV1alphaReleaseNotes: Release notes for a release. type GoogleFirebaseAppdistroV1alphaReleaseNotes struct { + // ReleaseNotes: The actual release notes text from the user. ReleaseNotes string `json:"releaseNotes,omitempty"` // ForceSendFields is a list of field names (e.g. "ReleaseNotes") to // unconditionally include in API requests. By default, fields with empty or @@ -1305,6 +1322,11 @@ type GoogleFirebaseAppdistroV1alphaReleaseTest struct { // `projects/{project_number}/apps/{app_id}/releases/{release_id}/tests/{test_id // }` Name string `json:"name,omitempty"` + // TestCase: Optional. The test case that was used to generate this release + // test. Note: The test case may have changed or been deleted since the release + // test was created. Format: + // `projects/{project_number}/apps/{app}/testCases/{test_case}` + TestCase string `json:"testCase,omitempty"` // TestState: Output only. The state of the release test. // // Possible values: diff --git a/firebasehosting/v1/firebasehosting-api.json b/firebasehosting/v1/firebasehosting-api.json index 4b9d161f6c6..976c16f5bc1 100644 --- a/firebasehosting/v1/firebasehosting-api.json +++ b/firebasehosting/v1/firebasehosting-api.json @@ -111,7 +111,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "firebasehosting.operations.cancel", @@ -269,7 +269,7 @@ } } }, - "revision": "20240319", + "revision": "20241203", "rootUrl": "https://firebasehosting.googleapis.com/", "schemas": { "CancelOperationRequest": { diff --git a/firebasehosting/v1/firebasehosting-gen.go b/firebasehosting/v1/firebasehosting-gen.go index fe77535ae7b..f8e1bf7489b 100644 --- a/firebasehosting/v1/firebasehosting-gen.go +++ b/firebasehosting/v1/firebasehosting-gen.go @@ -731,7 +731,7 @@ type OperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 54d8246b436..2b603067360 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20241117", + "revision": "20241203", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -825,6 +825,25 @@ "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", "type": "string" }, + "responseModalities": { + "description": "Optional. The modalities of the response.", + "items": { + "enum": [ + "MODALITY_UNSPECIFIED", + "TEXT", + "IMAGE", + "AUDIO" + ], + "enumDescriptions": [ + "Unspecified modality. Will be processed as text.", + "Text modality.", + "Image modality.", + "Audio modality." + ], + "type": "string" + }, + "type": "array" + }, "responseSchema": { "$ref": "GoogleCloudAiplatformV1beta1Schema", "description": "Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response." @@ -838,6 +857,10 @@ "format": "int32", "type": "integer" }, + "speechConfig": { + "$ref": "GoogleCloudAiplatformV1beta1SpeechConfig", + "description": "Optional. The speech generation config." + }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -850,6 +873,22 @@ "format": "float", "type": "number" }, + "tokenResolution": { + "description": "Optional. If specified, the token resolution specified will be used.", + "enum": [ + "TOKEN_RESOLUTION_UNSPECIFIED", + "TOKEN_RESOLUTION_LOW", + "TOKEN_RESOLUTION_MEDIUM", + "TOKEN_RESOLUTION_HIGH" + ], + "enumDescriptions": [ + "Token resolution has not been set.", + "Token resolution set to low (64 tokens).", + "Token resolution set to medium (256 tokens).", + "Token resolution set to high (P\u0026S with 256 tokens)." + ], + "type": "string" + }, "topK": { "description": "Optional. If specified, top-k sampling will be used.", "format": "float", @@ -1138,6 +1177,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig": { + "description": "The configuration for the prebuilt speaker to use.", + "id": "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig", + "properties": { + "voiceName": { + "description": "The name of the preset voice to use.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1RagRetrievalConfig": { "description": "Specifies the context retrieval config.", "id": "GoogleCloudAiplatformV1beta1RagRetrievalConfig", @@ -1590,6 +1640,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1SpeechConfig": { + "description": "The speech generation config.", + "id": "GoogleCloudAiplatformV1beta1SpeechConfig", + "properties": { + "voiceConfig": { + "$ref": "GoogleCloudAiplatformV1beta1VoiceConfig", + "description": "The configuration for the speaker to use." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Tool": { "description": "Tool details that the model may use to generate response. A `Tool` is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. A Tool object should contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval or GoogleSearchRetrieval).", "id": "GoogleCloudAiplatformV1beta1Tool", @@ -1605,6 +1666,10 @@ }, "type": "array" }, + "googleSearch": { + "$ref": "GoogleCloudAiplatformV1beta1ToolGoogleSearch", + "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google." + }, "googleSearchRetrieval": { "$ref": "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval", "description": "Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search." @@ -1633,6 +1698,12 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ToolGoogleSearch": { + "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.", + "id": "GoogleCloudAiplatformV1beta1ToolGoogleSearch", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1beta1VertexAISearch": { "description": "Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder", "id": "GoogleCloudAiplatformV1beta1VertexAISearch", @@ -1717,6 +1788,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1VoiceConfig": { + "description": "The configuration for the voice to use.", + "id": "GoogleCloudAiplatformV1beta1VoiceConfig", + "properties": { + "prebuiltVoiceConfig": { + "$ref": "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig", + "description": "The configuration for the prebuilt voice to use." + } + }, + "type": "object" + }, "ModelOperationMetadata": { "description": "This is returned in the longrunning operations for create/update.", "id": "ModelOperationMetadata", diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index 83ecc732a2a..d06c755cb94 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -960,6 +960,14 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { // prompted to output the appropriate response type, otherwise the behavior is // undefined. This is a preview feature. ResponseMimeType string `json:"responseMimeType,omitempty"` + // ResponseModalities: Optional. The modalities of the response. + // + // Possible values: + // "MODALITY_UNSPECIFIED" - Unspecified modality. Will be processed as text. + // "TEXT" - Text modality. + // "IMAGE" - Image modality. + // "AUDIO" - Audio modality. + ResponseModalities []string `json:"responseModalities,omitempty"` // ResponseSchema: Optional. The `Schema` object allows the definition of input // and output data types. These types can be objects, but also primitives and // arrays. Represents a select subset of an OpenAPI 3.0 schema object @@ -971,10 +979,22 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { RoutingConfig *GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig `json:"routingConfig,omitempty"` // Seed: Optional. Seed. Seed int64 `json:"seed,omitempty"` + // SpeechConfig: Optional. The speech generation config. + SpeechConfig *GoogleCloudAiplatformV1beta1SpeechConfig `json:"speechConfig,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. Temperature float64 `json:"temperature,omitempty"` + // TokenResolution: Optional. If specified, the token resolution specified will + // be used. + // + // Possible values: + // "TOKEN_RESOLUTION_UNSPECIFIED" - Token resolution has not been set. + // "TOKEN_RESOLUTION_LOW" - Token resolution set to low (64 tokens). + // "TOKEN_RESOLUTION_MEDIUM" - Token resolution set to medium (256 tokens). + // "TOKEN_RESOLUTION_HIGH" - Token resolution set to high (P&S with 256 + // tokens). + TokenResolution string `json:"tokenResolution,omitempty"` // TopK: Optional. If specified, top-k sampling will be used. TopK float64 `json:"topK,omitempty"` // TopP: Optional. If specified, nucleus sampling will be used. @@ -1419,6 +1439,29 @@ func (s GoogleCloudAiplatformV1beta1Part) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig: The configuration for the +// prebuilt speaker to use. +type GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig struct { + // VoiceName: The name of the preset voice to use. + VoiceName string `json:"voiceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "VoiceName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VoiceName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1RagRetrievalConfig: Specifies the context // retrieval config. type GoogleCloudAiplatformV1beta1RagRetrievalConfig struct { @@ -1965,6 +2008,28 @@ func (s GoogleCloudAiplatformV1beta1Segment) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1SpeechConfig: The speech generation config. +type GoogleCloudAiplatformV1beta1SpeechConfig struct { + // VoiceConfig: The configuration for the speaker to use. + VoiceConfig *GoogleCloudAiplatformV1beta1VoiceConfig `json:"voiceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "VoiceConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VoiceConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SpeechConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SpeechConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Tool: Tool details that the model may use to // generate response. A `Tool` is a piece of code that enables the system to // interact with external systems to perform an action, or set of actions, @@ -1984,6 +2049,9 @@ type GoogleCloudAiplatformV1beta1Tool struct { // will generate the final response back to the user. Maximum 128 function // declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1beta1FunctionDeclaration `json:"functionDeclarations,omitempty"` + // GoogleSearch: Optional. GoogleSearch tool type. Tool to support Google + // Search in Model. Powered by Google. + GoogleSearch *GoogleCloudAiplatformV1beta1ToolGoogleSearch `json:"googleSearch,omitempty"` // GoogleSearchRetrieval: Optional. GoogleSearchRetrieval tool type. // Specialized retrieval tool that is powered by Google search. GoogleSearchRetrieval *GoogleCloudAiplatformV1beta1GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` @@ -2039,6 +2107,11 @@ func (s GoogleCloudAiplatformV1beta1ToolConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ToolGoogleSearch: GoogleSearch tool type. Tool +// to support Google Search in Model. Powered by Google. +type GoogleCloudAiplatformV1beta1ToolGoogleSearch struct { +} + // GoogleCloudAiplatformV1beta1VertexAISearch: Retrieve from Vertex AI Search // datastore for grounding. See https://cloud.google.com/products/agent-builder type GoogleCloudAiplatformV1beta1VertexAISearch struct { @@ -2167,6 +2240,29 @@ func (s GoogleCloudAiplatformV1beta1VideoMetadata) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1VoiceConfig: The configuration for the voice to +// use. +type GoogleCloudAiplatformV1beta1VoiceConfig struct { + // PrebuiltVoiceConfig: The configuration for the prebuilt voice to use. + PrebuiltVoiceConfig *GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig `json:"prebuiltVoiceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrebuiltVoiceConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PrebuiltVoiceConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1VoiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1VoiceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ModelOperationMetadata: This is returned in the longrunning operations for // create/update. type ModelOperationMetadata struct { diff --git a/iap/v1/iap-api.json b/iap/v1/iap-api.json index ac31806c72a..79014073ece 100644 --- a/iap/v1/iap-api.json +++ b/iap/v1/iap-api.json @@ -682,7 +682,7 @@ } } }, - "revision": "20240909", + "revision": "20241202", "rootUrl": "https://iap.googleapis.com/", "schemas": { "AccessDeniedPageSettings": { @@ -1243,7 +1243,7 @@ "description": "Properties of the object. Contains field @type with type URL.", "type": "any" }, - "description": "The proto or JSON formatted expected next state of the resource, wrapped in a google.protobuf.Any proto, against which the policy rules are evaluated. Services not integrated with custom org policy can omit this field. Services integrated with custom org policy must populate this field for all requests where the API call changes the state of the resource. Custom org policy backend uses these attributes to enforce custom org policies. When a proto is wrapped, it is generally the One Platform API proto. When a JSON string is wrapped, use `google.protobuf.StringValue` for the inner value. For create operations, GCP service is expected to pass resource from customer request as is. For update/patch operations, GCP service is expected to compute the next state with the patch provided by the user. See go/custom-constraints-org-policy-integration-guide for additional details.", + "description": "The proto or JSON formatted expected next state of the resource, wrapped in a google.protobuf.Any proto, against which the policy rules are evaluated. Services not integrated with custom org policy can omit this field. Services integrated with custom org policy must populate this field for all requests where the API call changes the state of the resource. Custom org policy backend uses these attributes to enforce custom org policies. For create operations, GCP service is expected to pass resource from customer request as is. For update/patch operations, GCP service is expected to compute the next state with the patch provided by the user. See go/custom-constraints-org-policy-integration-guide for additional details.", "type": "object" }, "labels": { diff --git a/iap/v1/iap-gen.go b/iap/v1/iap-gen.go index 3e69aca1685..6eb76075be8 100644 --- a/iap/v1/iap-gen.go +++ b/iap/v1/iap-gen.go @@ -1206,13 +1206,10 @@ type Resource struct { // this field. Services integrated with custom org policy must populate this // field for all requests where the API call changes the state of the resource. // Custom org policy backend uses these attributes to enforce custom org - // policies. When a proto is wrapped, it is generally the One Platform API - // proto. When a JSON string is wrapped, use `google.protobuf.StringValue` for - // the inner value. For create operations, GCP service is expected to pass - // resource from customer request as is. For update/patch operations, GCP - // service is expected to compute the next state with the patch provided by the - // user. See go/custom-constraints-org-policy-integration-guide for additional - // details. + // policies. For create operations, GCP service is expected to pass resource + // from customer request as is. For update/patch operations, GCP service is + // expected to compute the next state with the patch provided by the user. See + // go/custom-constraints-org-policy-integration-guide for additional details. ExpectedNextState googleapi.RawMessage `json:"expectedNextState,omitempty"` // Labels: The service defined labels of the resource on which the conditions // will be evaluated. The semantics - including the key names - are vague to From 2b3363e799feff4ed8d191bc69cd3afdb70f1f99 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Fri, 6 Dec 2024 12:57:46 -0700 Subject: [PATCH 03/11] feat(transport): remove deprecated EXPERIMENTAL OpenCensus trace context propagation (#2901) * See https://github.com/googleapis/google-cloud-go/blob/main/debug.md\#telemetry refs: googleapis/google-cloud-go#10287 refs: googleapis/google-cloud-go#11230 --- go.mod | 2 +- go.work.sum | 17 ++++ transport/grpc/dial.go | 9 -- transport/grpc/dial_test.go | 4 +- transport/http/dial.go | 15 ---- transport/http/internal/propagation/http.go | 87 ------------------- .../http/internal/propagation/http_test.go | 63 -------------- 7 files changed, 20 insertions(+), 177 deletions(-) delete mode 100644 transport/http/internal/propagation/http.go delete mode 100644 transport/http/internal/propagation/http_test.go diff --git a/go.mod b/go.mod index 9db6e1c3aeb..c6a24a547cc 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,6 @@ require ( github.com/google/uuid v1.6.0 github.com/googleapis/enterprise-certificate-proxy v0.3.4 github.com/googleapis/gax-go/v2 v2.14.0 - go.opencensus.io v0.24.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 golang.org/x/net v0.31.0 @@ -31,6 +30,7 @@ require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel v1.29.0 // indirect go.opentelemetry.io/otel/metric v1.29.0 // indirect go.opentelemetry.io/otel/trace v1.29.0 // indirect diff --git a/go.work.sum b/go.work.sum index 814eeb9e812..90fb670f624 100644 --- a/go.work.sum +++ b/go.work.sum @@ -16,6 +16,7 @@ cloud.google.com/go/accesscontextmanager v1.9.1/go.mod h1:wUVSoz8HmG7m9miQTh6smb cloud.google.com/go/accesscontextmanager v1.9.2/go.mod h1:T0Sw/PQPyzctnkw1pdmGAKb7XBA84BqQzH0fSU7wzJU= cloud.google.com/go/aiplatform v1.60.0/go.mod h1:eTlGuHOahHprZw3Hio5VKmtThIOak5/qy6pzdsqcQnM= cloud.google.com/go/aiplatform v1.68.0/go.mod h1:105MFA3svHjC3Oazl7yjXAmIR89LKhRAeNdnDKJczME= +cloud.google.com/go/aiplatform v1.69.0/go.mod h1:nUsIqzS3khlnWvpjfJbP+2+h+VrFyYsTm7RNCAViiY8= cloud.google.com/go/analytics v0.23.0/go.mod h1:YPd7Bvik3WS95KBok2gPXDqQPHy08TsCQG6CdUCb+u0= cloud.google.com/go/analytics v0.23.6/go.mod h1:cFz5GwWHrWQi8OHKP9ep3Z4pvHgGcG9lPnFQ+8kXsNo= cloud.google.com/go/analytics v0.25.0/go.mod h1:LZMfjJnKU1GDkvJV16dKnXm7KJJaMZfvUXx58ujgVLg= @@ -51,6 +52,7 @@ cloud.google.com/go/artifactregistry v1.14.13/go.mod h1:zQ/T4xoAFPtcxshl+Q4TJBgs cloud.google.com/go/artifactregistry v1.15.0/go.mod h1:4xrfigx32/3N7Pp7YSPOZZGs4VPhyYeRyJ67ZfVdOX4= cloud.google.com/go/artifactregistry v1.15.1/go.mod h1:ExJb4VN+IMTQWO5iY+mjcY19Rz9jUxCVGZ1YuyAgPBw= cloud.google.com/go/artifactregistry v1.15.2/go.mod h1:LunXo4u2rFtvJjrGjO0JS+Gs9Eco2xbZU6JVJ4+T8Sk= +cloud.google.com/go/artifactregistry v1.16.0/go.mod h1:LunXo4u2rFtvJjrGjO0JS+Gs9Eco2xbZU6JVJ4+T8Sk= cloud.google.com/go/asset v1.17.2/go.mod h1:SVbzde67ehddSoKf5uebOD1sYw8Ab/jD/9EIeWg99q4= cloud.google.com/go/asset v1.19.5/go.mod h1:sqyLOYaLLfc4ACcn3YxqHno+J7lRt9NJTdO50zCUcY0= cloud.google.com/go/asset v1.20.0/go.mod h1:CT3ME6xNZKsPSvi0lMBPgW3azvRhiurJTFSnNl6ahw8= @@ -114,6 +116,7 @@ cloud.google.com/go/cloudbuild v1.16.5/go.mod h1:HXLpZ8QeYZgmDIWpbl9Gs22p6o6uScg cloud.google.com/go/cloudbuild v1.17.0/go.mod h1:/RbwgDlbQEwIKoWLIYnW72W3cWs+e83z7nU45xRKnj8= cloud.google.com/go/cloudbuild v1.18.0/go.mod h1:KCHWGIoS/5fj+By9YmgIQnUiDq8P6YURWOjX3hoc6As= cloud.google.com/go/cloudbuild v1.18.1/go.mod h1:ZGRqbNMrVGhknIIjwASa6MqoRTOpXIVMSI+Ew5DMPuY= +cloud.google.com/go/cloudbuild v1.19.0/go.mod h1:ZGRqbNMrVGhknIIjwASa6MqoRTOpXIVMSI+Ew5DMPuY= cloud.google.com/go/clouddms v1.7.4/go.mod h1:RdrVqoFG9RWI5AvZ81SxJ/xvxPdtcRhFotwdE79DieY= cloud.google.com/go/clouddms v1.7.10/go.mod h1:PzHELq0QDyA7VaD9z6mzh2mxeBz4kM6oDe8YxMxd4RA= cloud.google.com/go/clouddms v1.8.0/go.mod h1:JUgTgqd1M9iPa7p3jodjLTuecdkGTcikrg7nz++XB5E= @@ -144,6 +147,7 @@ cloud.google.com/go/compute v1.28.2 h1:M9Rf+Ii9xQZk+rTBEgaz3J5ZyKs6kSNAgdZQpyBpx cloud.google.com/go/compute v1.28.2/go.mod h1:HFlsDurE5DpQZClAGf/cYh+gxssMhBxBovZDYkEn/Og= cloud.google.com/go/compute v1.28.3 h1:+b9s7mbJYe7yQ0qA9o6GS7Tb1Ubygnv6jCLxM0JnbQA= cloud.google.com/go/compute v1.29.0 h1:Lph6d8oPi38NHkOr6S55Nus/Pbbcp37m/J0ohgKAefs= +cloud.google.com/go/compute v1.29.0/go.mod h1:HFlsDurE5DpQZClAGf/cYh+gxssMhBxBovZDYkEn/Og= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/contactcenterinsights v1.13.0/go.mod h1:ieq5d5EtHsu8vhe2y3amtZ+BE+AQwX5qAy7cpo0POsI= cloud.google.com/go/contactcenterinsights v1.13.6/go.mod h1:mL+DbN3pMQGaAbDC4wZhryLciwSwHf5Tfk4Itr72Zyk= @@ -155,6 +159,7 @@ cloud.google.com/go/container v1.38.0/go.mod h1:U0uPBvkVWOJGY/0qTVuPS7NeafFEUsHS cloud.google.com/go/container v1.39.0/go.mod h1:gNgnvs1cRHXjYxrotVm+0nxDfZkqzBbXCffh5WtqieI= cloud.google.com/go/container v1.40.0/go.mod h1:wNI1mOUivm+ZkpHMbouutgbD4sQxyphMwK31X5cThY4= cloud.google.com/go/container v1.41.0/go.mod h1:YL6lDgCUi3frIWNIFU9qrmF7/6K1EYrtspmFTyyqJ+k= +cloud.google.com/go/container v1.42.0/go.mod h1:YL6lDgCUi3frIWNIFU9qrmF7/6K1EYrtspmFTyyqJ+k= cloud.google.com/go/containeranalysis v0.11.4/go.mod h1:cVZT7rXYBS9NG1rhQbWL9pWbXCKHWJPYraE8/FTSYPE= cloud.google.com/go/containeranalysis v0.12.1/go.mod h1:+/lcJIQSFt45TC0N9Nq7/dPbl0isk6hnC4EvBBqyXsM= cloud.google.com/go/containeranalysis v0.13.0/go.mod h1:OpufGxsNzMOZb6w5yqwUgHr5GHivsAD18KEI06yGkQs= @@ -165,6 +170,7 @@ cloud.google.com/go/datacatalog v1.20.5/go.mod h1:DB0QWF9nelpsbB0eR/tA0xbHZZMvpo cloud.google.com/go/datacatalog v1.22.0/go.mod h1:4Wff6GphTY6guF5WphrD76jOdfBiflDiRGFAxq7t//I= cloud.google.com/go/datacatalog v1.22.1/go.mod h1:MscnJl9B2lpYlFoxRjicw19kFTwEke8ReKL5Y/6TWg8= cloud.google.com/go/datacatalog v1.22.2/go.mod h1:9Wamq8TDfL2680Sav7q3zEhBJSPBrDxJU8WtPJ25dBM= +cloud.google.com/go/datacatalog v1.23.0/go.mod h1:9Wamq8TDfL2680Sav7q3zEhBJSPBrDxJU8WtPJ25dBM= cloud.google.com/go/dataflow v0.9.5/go.mod h1:udl6oi8pfUHnL0z6UN9Lf9chGqzDMVqcYTcZ1aPnCZQ= cloud.google.com/go/dataflow v0.9.11/go.mod h1:CCLufd7I4pPfyp54qMgil/volrL2ZKYjXeYLfQmBGJs= cloud.google.com/go/dataflow v0.10.0/go.mod h1:zAv3YUNe/2pXWKDSPvbf31mCIUuJa+IHtKmhfzaeGww= @@ -214,11 +220,13 @@ cloud.google.com/go/deploy v1.20.0/go.mod h1:PaOfS47VrvmYnxG5vhHg0KU60cKeWcqyLbM cloud.google.com/go/deploy v1.22.0/go.mod h1:qXJgBcnyetoOe+w/79sCC99c5PpHJsgUXCNhwMjG0e4= cloud.google.com/go/deploy v1.23.0/go.mod h1:O7qoXcg44Ebfv9YIoFEgYjPmrlPsXD4boYSVEiTqdHY= cloud.google.com/go/deploy v1.23.1/go.mod h1:h9uVCWxSDanXUereI5WR+vlZdbPJ6XGy+gcfC25v5rM= +cloud.google.com/go/deploy v1.25.0/go.mod h1:h9uVCWxSDanXUereI5WR+vlZdbPJ6XGy+gcfC25v5rM= cloud.google.com/go/dialogflow v1.49.0/go.mod h1:dhVrXKETtdPlpPhE7+2/k4Z8FRNUp6kMV3EW3oz/fe0= cloud.google.com/go/dialogflow v1.55.0/go.mod h1:0u0hSlJiFpMkMpMNoFrQETwDjaRm8Q8hYKv+jz5JeRA= cloud.google.com/go/dialogflow v1.57.0/go.mod h1:wegtnocuYEfue6IGlX96n5mHu3JGZUaZxv1L5HzJUJY= cloud.google.com/go/dialogflow v1.58.0/go.mod h1:sWcyFLdUrg+TWBJVq/OtwDyjcyDOfirTF0Gx12uKy7o= cloud.google.com/go/dialogflow v1.58.1/go.mod h1:PjsrI+d2FI4BlGThxL0+Rua/g9vLI+2A1KL7s/Vo3pY= +cloud.google.com/go/dialogflow v1.60.0/go.mod h1:PjsrI+d2FI4BlGThxL0+Rua/g9vLI+2A1KL7s/Vo3pY= cloud.google.com/go/dlp v1.11.2/go.mod h1:9Czi+8Y/FegpWzgSfkRlyz+jwW6Te9Rv26P3UfU/h/w= cloud.google.com/go/dlp v1.15.0/go.mod h1:LtPZxZAenBXKzvWIOB2hdHIXuEcK0wW0En8//u+/nNA= cloud.google.com/go/dlp v1.18.0/go.mod h1:RVO9zkh+xXgUa7+YOf9IFNHL/2FXt9Vnv/GKNYmc1fE= @@ -239,6 +247,7 @@ cloud.google.com/go/edgecontainer v1.2.5/go.mod h1:OAb6tElD3F3oBujFAup14PKOs9B/l cloud.google.com/go/edgecontainer v1.3.0/go.mod h1:dV1qTl2KAnQOYG+7plYr53KSq/37aga5/xPgOlYXh3A= cloud.google.com/go/edgecontainer v1.3.1/go.mod h1:qyz5+Nk/UAs6kXp6wiux9I2U4A2R624K15QhHYovKKM= cloud.google.com/go/edgecontainer v1.3.2/go.mod h1:Hxj5saJT8LMREmAI9tbNTaBpW5loYiWFyisCjDhzu88= +cloud.google.com/go/edgecontainer v1.4.0/go.mod h1:Hxj5saJT8LMREmAI9tbNTaBpW5loYiWFyisCjDhzu88= cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= cloud.google.com/go/errorreporting v0.3.1/go.mod h1:6xVQXU1UuntfAf+bVkFk6nld41+CPyF2NSPCyXE3Ztk= cloud.google.com/go/essentialcontacts v1.6.6/go.mod h1:XbqHJGaiH0v2UvtuucfOzFXN+rpL/aU5BCZLn4DYl1Q= @@ -251,6 +260,7 @@ cloud.google.com/go/eventarc v1.13.10/go.mod h1:KlCcOMApmUaqOEZUpZRVH+p0nnnsY1Ha cloud.google.com/go/eventarc v1.14.0/go.mod h1:60ZzZfOekvsc/keHc7uGHcoEOMVa+p+ZgRmTjpdamnA= cloud.google.com/go/eventarc v1.14.1/go.mod h1:NG0YicE+z9MDcmh2u4tlzLDVLRjq5UHZlibyQlPhcxY= cloud.google.com/go/eventarc v1.14.2/go.mod h1:PAd/pPIZdJtJQFJI1yDEUms1mqohdNuM1BFEVHHlVFg= +cloud.google.com/go/eventarc v1.15.0/go.mod h1:PAd/pPIZdJtJQFJI1yDEUms1mqohdNuM1BFEVHHlVFg= cloud.google.com/go/filestore v1.8.1/go.mod h1:MbN9KcaM47DRTIuLfQhJEsjaocVebNtNQhSLhKCF5GM= cloud.google.com/go/filestore v1.8.7/go.mod h1:dKfyH0YdPAKdYHqAR/bxZeil85Y5QmrEVQwIYuRjcXI= cloud.google.com/go/filestore v1.9.0/go.mod h1:GlQK+VBaAGb19HqprnOMqYYpn7Gev5ZA9SSHpxFKD7Q= @@ -275,6 +285,7 @@ cloud.google.com/go/gkeconnect v0.10.0/go.mod h1:d8TE+YAlX7mvq8pWy1Q4yOnmxbN0Sim cloud.google.com/go/gkeconnect v0.11.0/go.mod h1:l3iPZl1OfT+DUQ+QkmH1PC5RTLqxKQSVnboLiQGAcCA= cloud.google.com/go/gkeconnect v0.11.1/go.mod h1:Vu3UoOI2c0amGyv4dT/EmltzscPH41pzS4AXPqQLej0= cloud.google.com/go/gkeconnect v0.11.2/go.mod h1:+Sj47chrbFMON1wjG6DA4KJKi85/7ON7GQZXEo0cbaQ= +cloud.google.com/go/gkeconnect v0.12.0/go.mod h1:zn37LsFiNZxPN4iO7YbUk8l/E14pAJ7KxpoXoxt7Ly0= cloud.google.com/go/gkehub v0.14.5/go.mod h1:6bzqxM+a+vEH/h8W8ec4OJl4r36laxTs3A/fMNHJ0wA= cloud.google.com/go/gkehub v0.14.11/go.mod h1:CsmDJ4qbBnSPkoBltEubK6qGOjG0xNfeeT5jI5gCnRQ= cloud.google.com/go/gkehub v0.15.0/go.mod h1:obpeROly2mjxZJbRkFfHEflcH54XhJI+g2QgfHphL0I= @@ -348,6 +359,7 @@ cloud.google.com/go/maps v1.11.5/go.mod h1:MOS/NN0L6b7Kumr8bLux9XTpd8+D54DYxBMUj cloud.google.com/go/maps v1.12.0/go.mod h1:qjErDNStn3BaGx06vHner5d75MRMgGflbgCuWTuslMc= cloud.google.com/go/maps v1.14.0/go.mod h1:UepOes9un0UP7i8JBiaqgh8jqUaZAHVRXCYjrVlhSC8= cloud.google.com/go/maps v1.14.1/go.mod h1:ZFqZS04ucwFiHSNU8TBYDUr3wYhj5iBFJk24Ibvpf3o= +cloud.google.com/go/maps v1.15.0/go.mod h1:ZFqZS04ucwFiHSNU8TBYDUr3wYhj5iBFJk24Ibvpf3o= cloud.google.com/go/mediatranslation v0.8.5/go.mod h1:y7kTHYIPCIfgyLbKncgqouXJtLsU+26hZhHEEy80fSs= cloud.google.com/go/mediatranslation v0.8.11/go.mod h1:3sNEm0fx61eHk7rfzBzrljVV9XKr931xI3OFacQBVFg= cloud.google.com/go/mediatranslation v0.9.0/go.mod h1:udnxo0i4YJ5mZfkwvvQQrQ6ra47vcX8jeGV+6I5x+iU= @@ -378,6 +390,7 @@ cloud.google.com/go/networkmanagement v1.13.6/go.mod h1:WXBijOnX90IFb6sberjnGrVt cloud.google.com/go/networkmanagement v1.14.0/go.mod h1:4myfd4A0uULCOCGHL1npZN0U+kr1Z2ENlbHdCCX4cE8= cloud.google.com/go/networkmanagement v1.14.1/go.mod h1:3Ds8FZ3ZHjTVEedsBoZi9ef9haTE14iS6swTSqM39SI= cloud.google.com/go/networkmanagement v1.15.0/go.mod h1:Yc905R9U5jik5YMt76QWdG5WqzPU4ZsdI/mLnVa62/Q= +cloud.google.com/go/networkmanagement v1.16.0/go.mod h1:Yc905R9U5jik5YMt76QWdG5WqzPU4ZsdI/mLnVa62/Q= cloud.google.com/go/networksecurity v0.9.5/go.mod h1:KNkjH/RsylSGyyZ8wXpue8xpCEK+bTtvof8SBfIhMG8= cloud.google.com/go/networksecurity v0.9.11/go.mod h1:4xbpOqCwplmFgymAjPFM6ZIplVC6+eQ4m7sIiEq9oJA= cloud.google.com/go/networksecurity v0.10.0/go.mod h1:IcpI5pyzlZyYG8cNRCJmY1AYKajsd9Uz575HoeyYoII= @@ -441,6 +454,7 @@ cloud.google.com/go/recaptchaenterprise/v2 v2.16.0/go.mod h1:iq7s8lR3dXv4mDXE3/q cloud.google.com/go/recaptchaenterprise/v2 v2.17.0/go.mod h1:SS4QDdlmJ3NvbOMCXQxaFhVGRjvNMfoKCoCdxqXadqs= cloud.google.com/go/recaptchaenterprise/v2 v2.17.2/go.mod h1:iigNZOnUpf++xlm8RdMZJTX/PihYVMrHidRLjHuekec= cloud.google.com/go/recaptchaenterprise/v2 v2.17.3/go.mod h1:vnbA2SpVPPwKeoFrCQxR+5a0JFRRytwBBG69Zj9pGfk= +cloud.google.com/go/recaptchaenterprise/v2 v2.19.0/go.mod h1:vnbA2SpVPPwKeoFrCQxR+5a0JFRRytwBBG69Zj9pGfk= cloud.google.com/go/recommendationengine v0.8.5/go.mod h1:A38rIXHGFvoPvmy6pZLozr0g59NRNREz4cx7F58HAsQ= cloud.google.com/go/recommendationengine v0.8.11/go.mod h1:cEkU4tCXAF88a4boMFZym7U7uyxvVwcQtKzS85IbQio= cloud.google.com/go/recommendationengine v0.9.0/go.mod h1:59ydKXFyXO4Y8S0Bk224sKfj6YvIyzgcpG6w8kXIMm4= @@ -476,6 +490,7 @@ cloud.google.com/go/run v1.4.0/go.mod h1:4G9iHLjdOC+CQ0CzA0+6nLeR6NezVPmlj+GULmb cloud.google.com/go/run v1.5.0/go.mod h1:Z4Tv/XNC/veO6rEpF0waVhR7vEu5RN1uJQ8dD1PeMtI= cloud.google.com/go/run v1.6.0/go.mod h1:DXkPPa8bZ0jfRGLT+EKIlPbHvosBYBMdxTgo9EBbXZE= cloud.google.com/go/run v1.6.1/go.mod h1:IvJOg2TBb/5a0Qkc6crn5yTy5nkjcgSWQLhgO8QL8PQ= +cloud.google.com/go/run v1.7.0/go.mod h1:IvJOg2TBb/5a0Qkc6crn5yTy5nkjcgSWQLhgO8QL8PQ= cloud.google.com/go/scheduler v1.10.6/go.mod h1:pe2pNCtJ+R01E06XCDOJs1XvAMbv28ZsQEbqknxGOuE= cloud.google.com/go/scheduler v1.10.12/go.mod h1:6DRtOddMWJ001HJ6MS148rtLSh/S2oqd2hQC3n5n9fQ= cloud.google.com/go/scheduler v1.11.0/go.mod h1:RBSu5/rIsF5mDbQUiruvIE6FnfKpLd3HlTDu8aWk0jw= @@ -511,6 +526,7 @@ cloud.google.com/go/spanner v1.65.0/go.mod h1:dQGB+w5a67gtyE3qSKPPxzniedrnAmV6te cloud.google.com/go/spanner v1.67.0/go.mod h1:Um+TNmxfcCHqNCKid4rmAMvoe/Iu1vdz6UfxJ9GPxRQ= cloud.google.com/go/spanner v1.70.0/go.mod h1:X5T0XftydYp0K1adeJQDJtdWpbrOeJ7wHecM4tK6FiE= cloud.google.com/go/spanner v1.71.0/go.mod h1:mw98ua5ggQXVWwp83yjwggqEmW9t8rjs9Po1ohcUGW4= +cloud.google.com/go/spanner v1.73.0/go.mod h1:mw98ua5ggQXVWwp83yjwggqEmW9t8rjs9Po1ohcUGW4= cloud.google.com/go/speech v1.21.1/go.mod h1:E5GHZXYQlkqWQwY5xRSLHw2ci5NMQNG52FfMU1aZrIA= cloud.google.com/go/speech v1.24.0/go.mod h1:HcVyIh5jRXM5zDMcbFCW+DF2uK/MSGN6Rastt6bj1ic= cloud.google.com/go/speech v1.25.0/go.mod h1:2IUTYClcJhqPgee5Ko+qJqq29/bglVizgIap0c5MvYs= @@ -536,6 +552,7 @@ cloud.google.com/go/texttospeech v1.7.11/go.mod h1:Ua125HU+WT2IkIo5MzQtuNpNEk72s cloud.google.com/go/texttospeech v1.8.0/go.mod h1:hAgeA01K5QNfLy2sPUAVETE0L4WdEpaCMfwKH1qjCQU= cloud.google.com/go/texttospeech v1.8.1/go.mod h1:WoTykB+4mfSDDYPuk7smrdXNRGoJJS6dXRR6l4XqD9g= cloud.google.com/go/texttospeech v1.9.0/go.mod h1:215FpCOyRxxrS7DSb2t7f4ylMz8dXsQg8+Vdup5IhP4= +cloud.google.com/go/texttospeech v1.10.0/go.mod h1:215FpCOyRxxrS7DSb2t7f4ylMz8dXsQg8+Vdup5IhP4= cloud.google.com/go/tpu v1.6.5/go.mod h1:P9DFOEBIBhuEcZhXi+wPoVy/cji+0ICFi4TtTkMHSSs= cloud.google.com/go/tpu v1.6.11/go.mod h1:W0C4xaSj1Ay3VX/H96FRvLt2HDs0CgdRPVI4e7PoCDk= cloud.google.com/go/tpu v1.7.0/go.mod h1:/J6Co458YHMD60nM3cCjA0msvFU/miCGMfx/nYyxv/o= diff --git a/transport/grpc/dial.go b/transport/grpc/dial.go index 4015df6303d..95f4e7922d7 100644 --- a/transport/grpc/dial.go +++ b/transport/grpc/dial.go @@ -22,7 +22,6 @@ import ( "cloud.google.com/go/auth/grpctransport" "cloud.google.com/go/auth/oauth2adapt" "cloud.google.com/go/compute/metadata" - "go.opencensus.io/plugin/ocgrpc" "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" "golang.org/x/oauth2" "golang.org/x/time/rate" @@ -385,7 +384,6 @@ func dial(ctx context.Context, insecure bool, o *internal.DialSettings) (*grpc.C // Add tracing, but before the other options, so that clients can override the // gRPC stats handler. // This assumes that gRPC options are processed in order, left to right. - grpcOpts = addOCStatsHandler(grpcOpts, o) grpcOpts = addOpenTelemetryStatsHandler(grpcOpts, o) grpcOpts = append(grpcOpts, o.GRPCDialOpts...) if o.UserAgent != "" { @@ -395,13 +393,6 @@ func dial(ctx context.Context, insecure bool, o *internal.DialSettings) (*grpc.C return dialContext(ctx, endpoint, grpcOpts...) } -func addOCStatsHandler(opts []grpc.DialOption, settings *internal.DialSettings) []grpc.DialOption { - if settings.TelemetryDisabled { - return opts - } - return append(opts, grpc.WithStatsHandler(&ocgrpc.ClientHandler{})) -} - func addOpenTelemetryStatsHandler(opts []grpc.DialOption, settings *internal.DialSettings) []grpc.DialOption { if settings.TelemetryDisabled { return opts diff --git a/transport/grpc/dial_test.go b/transport/grpc/dial_test.go index ecf46701b3b..7fe6a1129e8 100644 --- a/transport/grpc/dial_test.go +++ b/transport/grpc/dial_test.go @@ -23,8 +23,8 @@ func TestDial(t *testing.T) { oldDialContext := dialContext // Replace package var in order to assert DialContext args. dialContext = func(ctxGot context.Context, target string, opts ...grpc.DialOption) (conn *grpc.ClientConn, err error) { - if len(opts) != 4 { - t.Fatalf("got: %d, want: 4", len(opts)) + if len(opts) != 3 { + t.Fatalf("got: %d, want: 3", len(opts)) } return nil, nil } diff --git a/transport/http/dial.go b/transport/http/dial.go index d5b213e0f08..6cdbac2ca1e 100644 --- a/transport/http/dial.go +++ b/transport/http/dial.go @@ -19,7 +19,6 @@ import ( "cloud.google.com/go/auth/credentials" "cloud.google.com/go/auth/httptransport" "cloud.google.com/go/auth/oauth2adapt" - "go.opencensus.io/plugin/ochttp" "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" "golang.org/x/net/http2" "golang.org/x/oauth2" @@ -27,7 +26,6 @@ import ( "google.golang.org/api/internal" "google.golang.org/api/internal/cert" "google.golang.org/api/option" - "google.golang.org/api/transport/http/internal/propagation" ) // NewClient returns an HTTP client for use communicating with a Google cloud @@ -165,10 +163,7 @@ func newTransport(ctx context.Context, base http.RoundTripper, settings *interna requestReason: settings.RequestReason, } var trans http.RoundTripper = paramTransport - // Give OpenTelemetry precedence over OpenCensus in case user configuration - // causes both to write the same header (`X-Cloud-Trace-Context`). trans = addOpenTelemetryTransport(trans, settings) - trans = addOCTransport(trans, settings) switch { case settings.NoAuth: // Do nothing. @@ -309,16 +304,6 @@ func addOpenTelemetryTransport(trans http.RoundTripper, settings *internal.DialS return otelhttp.NewTransport(trans) } -func addOCTransport(trans http.RoundTripper, settings *internal.DialSettings) http.RoundTripper { - if settings.TelemetryDisabled { - return trans - } - return &ochttp.Transport{ - Base: trans, - Propagation: &propagation.HTTPFormat{}, - } -} - // clonedTransport returns the given RoundTripper as a cloned *http.Transport. // It returns nil if the RoundTripper can't be cloned or coerced to // *http.Transport. diff --git a/transport/http/internal/propagation/http.go b/transport/http/internal/propagation/http.go deleted file mode 100644 index ba7512aa26d..00000000000 --- a/transport/http/internal/propagation/http.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2018 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.8 -// +build go1.8 - -// Package propagation implements X-Cloud-Trace-Context header propagation used -// by Google Cloud products. -package propagation - -import ( - "encoding/binary" - "encoding/hex" - "fmt" - "net/http" - "strconv" - "strings" - - "go.opencensus.io/trace" - "go.opencensus.io/trace/propagation" -) - -const ( - httpHeaderMaxSize = 200 - httpHeader = `X-Cloud-Trace-Context` -) - -var _ propagation.HTTPFormat = (*HTTPFormat)(nil) - -// HTTPFormat implements propagation.HTTPFormat to propagate -// traces in HTTP headers for Google Cloud Platform and Stackdriver Trace. -type HTTPFormat struct{} - -// SpanContextFromRequest extracts a Stackdriver Trace span context from incoming requests. -func (f *HTTPFormat) SpanContextFromRequest(req *http.Request) (sc trace.SpanContext, ok bool) { - h := req.Header.Get(httpHeader) - // See https://cloud.google.com/trace/docs/faq for the header HTTPFormat. - // Return if the header is empty or missing, or if the header is unreasonably - // large, to avoid making unnecessary copies of a large string. - if h == "" || len(h) > httpHeaderMaxSize { - return trace.SpanContext{}, false - } - - // Parse the trace id field. - slash := strings.Index(h, `/`) - if slash == -1 { - return trace.SpanContext{}, false - } - tid, h := h[:slash], h[slash+1:] - - buf, err := hex.DecodeString(tid) - if err != nil { - return trace.SpanContext{}, false - } - copy(sc.TraceID[:], buf) - - // Parse the span id field. - spanstr := h - semicolon := strings.Index(h, `;`) - if semicolon != -1 { - spanstr, h = h[:semicolon], h[semicolon+1:] - } - sid, err := strconv.ParseUint(spanstr, 10, 64) - if err != nil { - return trace.SpanContext{}, false - } - binary.BigEndian.PutUint64(sc.SpanID[:], sid) - - // Parse the options field, options field is optional. - if !strings.HasPrefix(h, "o=") { - return sc, true - } - o, err := strconv.ParseUint(h[2:], 10, 64) - if err != nil { - return trace.SpanContext{}, false - } - sc.TraceOptions = trace.TraceOptions(o) - return sc, true -} - -// SpanContextToRequest modifies the given request to include a Stackdriver Trace header. -func (f *HTTPFormat) SpanContextToRequest(sc trace.SpanContext, req *http.Request) { - sid := binary.BigEndian.Uint64(sc.SpanID[:]) - header := fmt.Sprintf("%s/%d;o=%d", hex.EncodeToString(sc.TraceID[:]), sid, int64(sc.TraceOptions)) - req.Header.Set(httpHeader, header) -} diff --git a/transport/http/internal/propagation/http_test.go b/transport/http/internal/propagation/http_test.go deleted file mode 100644 index ddf50d0154b..00000000000 --- a/transport/http/internal/propagation/http_test.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2018 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.8 -// +build go1.8 - -package propagation - -import ( - "net/http" - "reflect" - "testing" - - "go.opencensus.io/trace" -) - -func TestHTTPFormat(t *testing.T) { - format := &HTTPFormat{} - traceID := [16]byte{16, 84, 69, 170, 120, 67, 188, 139, 242, 6, 177, 32, 0, 16, 0, 0} - spanID1 := [8]byte{255, 0, 0, 0, 0, 0, 0, 123} - spanID2 := [8]byte{0, 0, 0, 0, 0, 0, 0, 123} - tests := []struct { - incoming string - wantSpanContext trace.SpanContext - }{ - { - incoming: "105445aa7843bc8bf206b12000100000/18374686479671623803;o=1", - wantSpanContext: trace.SpanContext{ - TraceID: traceID, - SpanID: spanID1, - TraceOptions: 1, - }, - }, - { - incoming: "105445aa7843bc8bf206b12000100000/123;o=0", - wantSpanContext: trace.SpanContext{ - TraceID: traceID, - SpanID: spanID2, - TraceOptions: 0, - }, - }, - } - for _, tt := range tests { - t.Run(tt.incoming, func(t *testing.T) { - req, _ := http.NewRequest("GET", "http://example.com", nil) - req.Header.Add(httpHeader, tt.incoming) - sc, ok := format.SpanContextFromRequest(req) - if !ok { - t.Errorf("exporter.SpanContextFromRequest() = false; want true") - } - if got, want := sc, tt.wantSpanContext; !reflect.DeepEqual(got, want) { - t.Errorf("exporter.SpanContextFromRequest() returned span context %v; want %v", got, want) - } - - req, _ = http.NewRequest("GET", "http://example.com", nil) - format.SpanContextToRequest(sc, req) - if got, want := req.Header.Get(httpHeader), tt.incoming; got != want { - t.Errorf("exporter.SpanContextToRequest() returned header %q; want %q", got, want) - } - }) - } -} From d4cb90f490006155566779810a37100c56a57780 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sat, 7 Dec 2024 00:26:23 -0800 Subject: [PATCH 04/11] feat(all): auto-regenerate discovery clients (#2902) --- bigquery/v2/bigquery-api.json | 10 +- bigquery/v2/bigquery-gen.go | 8 +- chat/v1/chat-api.json | 4 +- chat/v1/chat-gen.go | 19 +- connectors/v1/connectors-api.json | 228 +- connectors/v1/connectors-gen.go | 423 +- discoveryengine/v1/discoveryengine-api.json | 616 ++- discoveryengine/v1/discoveryengine-gen.go | 1415 ++++++- .../v1alpha/discoveryengine-api.json | 616 ++- .../v1alpha/discoveryengine-gen.go | 1260 +++++- .../v1beta/discoveryengine-api.json | 825 +++- discoveryengine/v1beta/discoveryengine-gen.go | 1370 ++++++- displayvideo/v2/displayvideo-api.json | 16 +- displayvideo/v2/displayvideo-gen.go | 10 +- displayvideo/v3/displayvideo-api.json | 26 +- displayvideo/v3/displayvideo-gen.go | 19 +- dlp/v2/dlp-api.json | 6 +- dlp/v2/dlp-gen.go | 2 + firebaseml/v2beta/firebaseml-api.json | 34 +- firebaseml/v2beta/firebaseml-gen.go | 20 +- metastore/v1alpha/metastore-api.json | 6 +- metastore/v1alpha/metastore-gen.go | 6 +- metastore/v2/metastore-api.json | 1813 ++++++++ metastore/v2/metastore-gen.go | 3639 +++++++++++++++++ .../v1beta1/networkservices-api.json | 6 +- .../v1beta1/networkservices-gen.go | 4 +- tagmanager/v2/tagmanager-api.json | 6 +- tagmanager/v2/tagmanager-gen.go | 3 + 28 files changed, 11922 insertions(+), 488 deletions(-) create mode 100644 metastore/v2/metastore-api.json create mode 100644 metastore/v2/metastore-gen.go diff --git a/bigquery/v2/bigquery-api.json b/bigquery/v2/bigquery-api.json index 6d546a35907..286f3cbe44b 100644 --- a/bigquery/v2/bigquery-api.json +++ b/bigquery/v2/bigquery-api.json @@ -254,7 +254,7 @@ ], "parameters": { "accessPolicyVersion": { - "description": "Optional. The version of the access policy schema to fetch. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for conditional access policy binding in datasets must specify version 3. Dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. This field will be maped to [IAM Policy version] (https://cloud.google.com/iam/docs/policies#versions) and will be used to fetch policy from IAM. If unset or if 0 or 1 value is used for dataset with conditional bindings, access entry with condition will have role string appended by 'withcond' string followed by a hash value. For example : { \"access\": [ { \"role\": \"roles/bigquery.dataViewer_with_conditionalbinding_7a34awqsda\", \"userByEmail\": \"user@example.com\", } ] } Please refer https://cloud.google.com/iam/docs/troubleshooting-withcond for more details.", + "description": "Optional. The version of the access policy schema to fetch. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for conditional access policy binding in datasets must specify version 3. Dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. This field will be mapped to [IAM Policy version] (https://cloud.google.com/iam/docs/policies#versions) and will be used to fetch policy from IAM. If unset or if 0 or 1 value is used for dataset with conditional bindings, access entry with condition will have role string appended by 'withcond' string followed by a hash value. For example : { \"access\": [ { \"role\": \"roles/bigquery.dataViewer_with_conditionalbinding_7a34awqsda\", \"userByEmail\": \"user@example.com\", } ] } Please refer https://cloud.google.com/iam/docs/troubleshooting-withcond for more details.", "format": "int32", "location": "query", "type": "integer" @@ -311,7 +311,7 @@ ], "parameters": { "accessPolicyVersion": { - "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Requests with conditional access policy binding in datasets must specify version 3. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be maped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", + "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Requests with conditional access policy binding in datasets must specify version 3. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be mapped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", "format": "int32", "location": "query", "type": "integer" @@ -395,7 +395,7 @@ ], "parameters": { "accessPolicyVersion": { - "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Operations updating conditional access policy binding in datasets must specify version 3. Some of the operations are : - Adding a new access policy entry with condition. - Removing an access policy entry with condition. - Updating an access policy entry with condition. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be maped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", + "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Operations updating conditional access policy binding in datasets must specify version 3. Some of the operations are : - Adding a new access policy entry with condition. - Removing an access policy entry with condition. - Updating an access policy entry with condition. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be mapped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", "format": "int32", "location": "query", "type": "integer" @@ -475,7 +475,7 @@ ], "parameters": { "accessPolicyVersion": { - "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Operations updating conditional access policy binding in datasets must specify version 3. Some of the operations are : - Adding a new access policy entry with condition. - Removing an access policy entry with condition. - Updating an access policy entry with condition. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be maped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", + "description": "Optional. The version of the provided access policy schema. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. This version refers to the schema version of the access policy and not the version of access policy. This field's value can be equal or more than the access policy schema provided in the request. For example, * Operations updating conditional access policy binding in datasets must specify version 3. Some of the operations are : - Adding a new access policy entry with condition. - Removing an access policy entry with condition. - Updating an access policy entry with condition. * But dataset with no conditional role bindings in access policy may specify any valid value or leave the field unset. If unset or if 0 or 1 value is used for dataset with conditional bindings, request will be rejected. This field will be mapped to IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and will be used to set policy in IAM.", "format": "int32", "location": "query", "type": "integer" @@ -2009,7 +2009,7 @@ } } }, - "revision": "20241111", + "revision": "20241115", "rootUrl": "https://bigquery.googleapis.com/", "schemas": { "AggregateClassificationMetrics": { diff --git a/bigquery/v2/bigquery-gen.go b/bigquery/v2/bigquery-gen.go index 25e95d28efd..be5e1b7f40b 100644 --- a/bigquery/v2/bigquery-gen.go +++ b/bigquery/v2/bigquery-gen.go @@ -10484,7 +10484,7 @@ func (r *DatasetsService) Get(projectId string, datasetId string) *DatasetsGetCa // Requests specifying an invalid value will be rejected. Requests for // conditional access policy binding in datasets must specify version 3. // Dataset with no conditional role bindings in access policy may specify any -// valid value or leave the field unset. This field will be maped to [IAM +// valid value or leave the field unset. This field will be mapped to [IAM // Policy version] (https://cloud.google.com/iam/docs/policies#versions) and // will be used to fetch policy from IAM. If unset or if 0 or 1 value is used // for dataset with conditional bindings, access entry with condition will have @@ -10637,7 +10637,7 @@ func (r *DatasetsService) Insert(projectId string, dataset *Dataset) *DatasetsIn // access policy binding in datasets must specify version 3. * But dataset with // no conditional role bindings in access policy may specify any valid value or // leave the field unset. If unset or if 0 or 1 value is used for dataset with -// conditional bindings, request will be rejected. This field will be maped to +// conditional bindings, request will be rejected. This field will be mapped to // IAM Policy version (https://cloud.google.com/iam/docs/policies#versions) and // will be used to set policy in IAM. func (c *DatasetsInsertCall) AccessPolicyVersion(accessPolicyVersion int64) *DatasetsInsertCall { @@ -10927,7 +10927,7 @@ func (r *DatasetsService) Patch(projectId string, datasetId string, dataset *Dat // entry with condition. * But dataset with no conditional role bindings in // access policy may specify any valid value or leave the field unset. If unset // or if 0 or 1 value is used for dataset with conditional bindings, request -// will be rejected. This field will be maped to IAM Policy version +// will be rejected. This field will be mapped to IAM Policy version // (https://cloud.google.com/iam/docs/policies#versions) and will be used to // set policy in IAM. func (c *DatasetsPatchCall) AccessPolicyVersion(accessPolicyVersion int64) *DatasetsPatchCall { @@ -11161,7 +11161,7 @@ func (r *DatasetsService) Update(projectId string, datasetId string, dataset *Da // entry with condition. * But dataset with no conditional role bindings in // access policy may specify any valid value or leave the field unset. If unset // or if 0 or 1 value is used for dataset with conditional bindings, request -// will be rejected. This field will be maped to IAM Policy version +// will be rejected. This field will be mapped to IAM Policy version // (https://cloud.google.com/iam/docs/policies#versions) and will be used to // set policy in IAM. func (c *DatasetsUpdateCall) AccessPolicyVersion(accessPolicyVersion int64) *DatasetsUpdateCall { diff --git a/chat/v1/chat-api.json b/chat/v1/chat-api.json index 1c52f20374f..094d4e4a854 100644 --- a/chat/v1/chat-api.json +++ b/chat/v1/chat-api.json @@ -290,7 +290,7 @@ ] }, "create": { - "description": "Creates a space with no members. Can be used to create a named space, or a group chat in `Import mode`. For an example, see [Create a space](https://developers.google.com/workspace/chat/create-spaces). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) When authenticating as an app, the `space.customer` field must be set in the request.", + "description": "Creates a space. Can be used to create a named space, or a group chat in `Import mode`. For an example, see [Create a space](https://developers.google.com/workspace/chat/create-spaces). Supports the following types of [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): - [App authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) with [administrator approval](https://support.google.com/a?p=chat-app-auth) in [Developer Preview](https://developers.google.com/workspace/preview) - [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) When authenticating as an app, the `space.customer` field must be set in the request. Space membership upon creation depends on whether the space is created in `Import mode`: * **Import mode:** No members are created. * **All other modes:** The calling user is added as a member. This is: * The app itself when using app authentication. * The human user when using user authentication. If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name.", "flatPath": "v1/spaces", "httpMethod": "POST", "id": "chat.spaces.create", @@ -1344,7 +1344,7 @@ } } }, - "revision": "20241124", + "revision": "20241203", "rootUrl": "https://chat.googleapis.com/", "schemas": { "AccessSettings": { diff --git a/chat/v1/chat-gen.go b/chat/v1/chat-gen.go index 126bd37621a..bcb9693f1c1 100644 --- a/chat/v1/chat-gen.go +++ b/chat/v1/chat-gen.go @@ -6277,13 +6277,10 @@ type SpacesCreateCall struct { header_ http.Header } -// Create: Creates a space with no members. Can be used to create a named -// space, or a group chat in `Import mode`. For an example, see Create a space -// (https://developers.google.com/workspace/chat/create-spaces). If you receive -// the error message `ALREADY_EXISTS` when creating a space, try a different -// `displayName`. An existing space within the Google Workspace organization -// might already use this display name. Supports the following types of -// authentication +// Create: Creates a space. Can be used to create a named space, or a group +// chat in `Import mode`. For an example, see Create a space +// (https://developers.google.com/workspace/chat/create-spaces). Supports the +// following types of authentication // (https://developers.google.com/workspace/chat/authenticate-authorize): - App // authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) @@ -6292,7 +6289,13 @@ type SpacesCreateCall struct { // User authentication // (https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) // When authenticating as an app, the `space.customer` field must be set in the -// request. +// request. Space membership upon creation depends on whether the space is +// created in `Import mode`: * **Import mode:** No members are created. * **All +// other modes:** The calling user is added as a member. This is: * The app +// itself when using app authentication. * The human user when using user +// authentication. If you receive the error message `ALREADY_EXISTS` when +// creating a space, try a different `displayName`. An existing space within +// the Google Workspace organization might already use this display name. func (r *SpacesService) Create(space *Space) *SpacesCreateCall { c := &SpacesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.space = space diff --git a/connectors/v1/connectors-api.json b/connectors/v1/connectors-api.json index e9a350b3b1b..928b6ab03a5 100644 --- a/connectors/v1/connectors-api.json +++ b/connectors/v1/connectors-api.json @@ -1245,6 +1245,62 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "publish": { + "description": "Publish request for the CustomConnectorVersion. Once approved, the CustomConnectorVersion will be published as PartnerConnector.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customConnectors/{customConnectorsId}/customConnectorVersions/{customConnectorVersionsId}:publish", + "httpMethod": "POST", + "id": "connectors.projects.locations.customConnectors.customConnectorVersions.publish", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the form: `projects/{project}/locations/{location}/customConnectors/{custom_connector}/customConnectorVersions/{custom_connector_version}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/customConnectors/[^/]+/customConnectorVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:publish", + "request": { + "$ref": "PublishCustomConnectorVersionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "withdraw": { + "description": "Withdraw the publish request for the CustomConnectorVersion. This can only be used before the CustomConnectorVersion is published.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customConnectors/{customConnectorsId}/customConnectorVersions/{customConnectorVersionsId}:withdraw", + "httpMethod": "POST", + "id": "connectors.projects.locations.customConnectors.customConnectorVersions.withdraw", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Resource name of the form: `projects/{project}/locations/{location}/customConnectors/{custom_connector}/customConnectorVersions/{custom_connector_version}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/customConnectors/[^/]+/customConnectorVersions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:withdraw", + "request": { + "$ref": "WithdrawCustomConnectorVersionRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } } @@ -1949,7 +2005,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "connectors.projects.locations.operations.cancel", @@ -2502,7 +2558,7 @@ } } }, - "revision": "20241105", + "revision": "20241203", "rootUrl": "https://connectors.googleapis.com/", "schemas": { "AuditConfig": { @@ -2804,7 +2860,7 @@ "id": "AuthorizationCodeLink", "properties": { "clientId": { - "description": "The client ID assigned to the Google Cloud Connectors OAuth app for the connector data source.", + "description": "Optional. The client ID assigned to the Google Cloud Connectors OAuth app for the connector data source.", "type": "string" }, "clientSecret": { @@ -2812,7 +2868,7 @@ "description": "Optional. The client secret assigned to the Google Cloud Connectors OAuth app for the connector data source." }, "enablePkce": { - "description": "Whether to enable PKCE for the auth code flow.", + "description": "Optional. Whether to enable PKCE for the auth code flow.", "type": "boolean" }, "omitQueryParams": { @@ -2820,14 +2876,14 @@ "type": "boolean" }, "scopes": { - "description": "The scopes for which the user will authorize Google Cloud Connectors on the connector data source.", + "description": "Optional. The scopes for which the user will authorize Google Cloud Connectors on the connector data source.", "items": { "type": "string" }, "type": "array" }, "uri": { - "description": "The base URI the user must click to trigger the authorization code login flow.", + "description": "Optional. The base URI the user must click to trigger the authorization code login flow.", "type": "string" } }, @@ -2921,18 +2977,18 @@ "properties": { "authorizationCodeLink": { "$ref": "AuthorizationCodeLink", - "description": "Authorization code link options. To be populated if `ValueType` is `AUTHORIZATION_CODE`" + "description": "Optional. Authorization code link options. To be populated if `ValueType` is `AUTHORIZATION_CODE`" }, "description": { - "description": "Description.", + "description": "Optional. Description.", "type": "string" }, "displayName": { - "description": "Display name of the parameter.", + "description": "Optional. Display name of the parameter.", "type": "string" }, "enumOptions": { - "description": "Enum options. To be populated if `ValueType` is `ENUM`", + "description": "Optional. Enum options. To be populated if `ValueType` is `ENUM`", "items": { "$ref": "EnumOption" }, @@ -2951,11 +3007,11 @@ "type": "string" }, "isAdvanced": { - "description": "Indicates if current template is part of advanced settings", + "description": "Optional. Indicates if current template is part of advanced settings", "type": "boolean" }, "key": { - "description": "Key of the config variable.", + "description": "Optional. Key of the config variable.", "type": "string" }, "locationType": { @@ -2981,19 +3037,19 @@ "description": "Optional. MultipleSelectConfig represents the multiple options for a config variable." }, "required": { - "description": "Flag represents that this `ConfigVariable` must be provided for a connection.", + "description": "Optional. Flag represents that this `ConfigVariable` must be provided for a connection.", "type": "boolean" }, "requiredCondition": { "$ref": "LogicalExpression", - "description": "Condition under which a field would be required. The condition can be represented in the form of a logical expression." + "description": "Optional. Condition under which a field would be required. The condition can be represented in the form of a logical expression." }, "roleGrant": { "$ref": "RoleGrant", - "description": "Role grant configuration for the config variable." + "description": "Optional. Role grant configuration for the config variable." }, "state": { - "description": "State of the config variable.", + "description": "Output only. State of the config variable.", "enum": [ "STATE_UNSPECIFIED", "ACTIVE", @@ -3004,14 +3060,15 @@ "Config variable is active", "Config variable is deprecated." ], + "readOnly": true, "type": "string" }, "validationRegex": { - "description": "Regular expression in RE2 syntax used for validating the `value` of a `ConfigVariable`.", + "description": "Optional. Regular expression in RE2 syntax used for validating the `value` of a `ConfigVariable`.", "type": "string" }, "valueType": { - "description": "Type of the parameter: string, int, bool etc. consider custom type for the benefit for the validation.", + "description": "Optional. Type of the parameter: string, int, bool etc. consider custom type for the benefit for the validation.", "enum": [ "VALUE_TYPE_UNSPECIFIED", "STRING", @@ -3089,6 +3146,7 @@ "PREVIEW", "GA", "DEPRECATED", + "TEST", "PRIVATE_PREVIEW" ], "enumDescriptions": [ @@ -3096,6 +3154,7 @@ "PREVIEW.", "GA.", "DEPRECATED.", + "TEST.", "PRIVATE_PREVIEW." ], "readOnly": true, @@ -3416,6 +3475,7 @@ "PREVIEW", "GA", "DEPRECATED", + "TEST", "PRIVATE_PREVIEW" ], "enumDescriptions": [ @@ -3423,11 +3483,17 @@ "PREVIEW.", "GA.", "DEPRECATED.", + "TEST.", "PRIVATE_PREVIEW." ], "readOnly": true, "type": "string" }, + "marketplaceConnectorDetails": { + "$ref": "MarketplaceConnectorDetails", + "description": "Output only. Marketplace connector details. Will be null if the connector is not marketplace connector.", + "readOnly": true + }, "name": { "description": "Output only. Resource name of the Connector. Format: projects/{project}/locations/{location}/providers/{provider}/connectors/{connector} Only global location is supported for Connector resource.", "readOnly": true, @@ -3621,6 +3687,7 @@ "PREVIEW", "GA", "DEPRECATED", + "TEST", "PRIVATE_PREVIEW" ], "enumDescriptions": [ @@ -3628,6 +3695,7 @@ "PREVIEW.", "GA.", "DEPRECATED.", + "TEST.", "PRIVATE_PREVIEW." ], "readOnly": true, @@ -3726,7 +3794,7 @@ "type": "string" }, "deploymentModel": { - "description": "Optional. Indicates whether connector is deployed on GKE/CloudRun", + "description": "Output only. Indicates whether connector is deployed on GKE/CloudRun", "enum": [ "DEPLOYMENT_MODEL_UNSPECIFIED", "GKE_MST", @@ -3737,6 +3805,7 @@ "Default model gke mst.", "Cloud run mst." ], + "readOnly": true, "type": "string" }, "deploymentModelMigrationState": { @@ -4370,11 +4439,11 @@ "id": "EnumOption", "properties": { "displayName": { - "description": "Display name of the option.", + "description": "Optional. Display name of the option.", "type": "string" }, "id": { - "description": "Id of the option.", + "description": "Optional. Id of the option.", "type": "string" } }, @@ -4442,6 +4511,10 @@ "$ref": "EndPoint", "description": "OPTION 1: Hit an endpoint when we receive an event." }, + "gsutil": { + "$ref": "GSUtil", + "description": "OPTION 2: Write the event to Cloud Storage bucket." + }, "serviceAccount": { "description": "Service account needed for runtime plane to trigger IP workflow.", "type": "string" @@ -4450,11 +4523,15 @@ "description": "type of the destination", "enum": [ "TYPE_UNSPECIFIED", - "ENDPOINT" + "ENDPOINT", + "GCS", + "PUBSUB" ], "enumDescriptions": [ "Default state.", - "Endpoint - Hit the value of endpoint when event is received" + "Endpoint - Hit the value of endpoint when event is received", + "Cloud Storage - Write the event to Cloud Storage bucket", + "Pub/Sub - Write the event to Pub/Sub topic" ], "type": "string" } @@ -4548,7 +4625,7 @@ "id": "EventingConfig", "properties": { "additionalVariables": { - "description": "Additional eventing related field values", + "description": "Optional. Additional eventing related field values", "items": { "$ref": "ConfigVariable" }, @@ -4556,14 +4633,14 @@ }, "authConfig": { "$ref": "AuthConfig", - "description": "Auth details for the webhook adapter." + "description": "Optional. Auth details for the webhook adapter." }, "deadLetterConfig": { "$ref": "DeadLetterConfig", "description": "Optional. Dead letter configuration for eventing of a connection." }, "enrichmentEnabled": { - "description": "Enrichment Enabled.", + "description": "Optional. Enrichment Enabled.", "type": "boolean" }, "eventsListenerIngressEndpoint": { @@ -4584,7 +4661,7 @@ }, "registrationDestinationConfig": { "$ref": "DestinationConfig", - "description": "Registration endpoint for auto registration." + "description": "Optional. Registration endpoint for auto registration." } }, "type": "object" @@ -4697,6 +4774,7 @@ "PREVIEW", "GA", "DEPRECATED", + "TEST", "PRIVATE_PREVIEW" ], "enumDescriptions": [ @@ -4704,6 +4782,7 @@ "PREVIEW.", "GA.", "DEPRECATED.", + "TEST.", "PRIVATE_PREVIEW." ], "readOnly": true, @@ -5068,7 +5147,7 @@ "type": "boolean" }, "comparator": { - "description": "Comparator to use for comparing the field value.", + "description": "Optional. Comparator to use for comparing the field value.", "enum": [ "COMPARATOR_UNSPECIFIED", "EQUALS", @@ -5087,7 +5166,7 @@ "type": "string" }, "key": { - "description": "Key of the field.", + "description": "Optional. Key of the field.", "type": "string" }, "stringValue": { @@ -5097,6 +5176,17 @@ }, "type": "object" }, + "GSUtil": { + "description": "GSUtil message includes details of the Destination Cloud Storage bucket.", + "id": "GSUtil", + "properties": { + "gsutilUri": { + "description": "Required. The URI of the Cloud Storage bucket.", + "type": "string" + } + }, + "type": "object" + }, "HPAConfig": { "description": "Autoscaling config for connector deployment system metrics.", "id": "HPAConfig", @@ -6103,21 +6193,21 @@ "id": "LogicalExpression", "properties": { "fieldComparisons": { - "description": "A list of fields to be compared.", + "description": "Optional. A list of fields to be compared.", "items": { "$ref": "FieldComparison" }, "type": "array" }, "logicalExpressions": { - "description": "A list of nested conditions to be compared.", + "description": "Optional. A list of nested conditions to be compared.", "items": { "$ref": "LogicalExpression" }, "type": "array" }, "logicalOperator": { - "description": "The logical operator to use between the fields and conditions.", + "description": "Optional. The logical operator to use between the fields and conditions.", "enum": [ "OPERATOR_UNSPECIFIED", "AND", @@ -6298,6 +6388,29 @@ }, "type": "object" }, + "MarketplaceConnectorDetails": { + "description": "Marketplace connector details.", + "id": "MarketplaceConnectorDetails", + "properties": { + "marketplaceProduct": { + "description": "Marketplace product name.", + "type": "string" + }, + "marketplaceProductId": { + "description": "Marketplace product ID.", + "type": "string" + }, + "marketplaceProductUri": { + "description": "Marketplace product URL.", + "type": "string" + }, + "partner": { + "description": "The name of the partner.", + "type": "string" + } + }, + "type": "object" + }, "MultipleSelectConfig": { "description": "MultipleSelectConfig represents the multiple options for a config variable.", "id": "MultipleSelectConfig", @@ -6754,6 +6867,7 @@ "PREVIEW", "GA", "DEPRECATED", + "TEST", "PRIVATE_PREVIEW" ], "enumDescriptions": [ @@ -6761,6 +6875,7 @@ "PREVIEW.", "GA.", "DEPRECATED.", + "TEST.", "PRIVATE_PREVIEW." ], "readOnly": true, @@ -6800,6 +6915,17 @@ }, "type": "object" }, + "PublishCustomConnectorVersionRequest": { + "description": "Request message for ConnectorsService.PublishCustomConnectorVersion", + "id": "PublishCustomConnectorVersionRequest", + "properties": { + "partnerMetadata": { + "$ref": "PartnerMetadata", + "description": "Required. Partner metadata details for validating and publishing the custom connector as a partner connector version." + } + }, + "type": "object" + }, "PublishStatus": { "description": "Publish status of a custom connector.", "id": "PublishStatus", @@ -6882,11 +7008,11 @@ "id": "Resource", "properties": { "pathTemplate": { - "description": "Template to uniquely represent a Google Cloud resource in a format IAM expects This is a template that can have references to other values provided in the config variable template.", + "description": "Optional. Template to uniquely represent a Google Cloud resource in a format IAM expects This is a template that can have references to other values provided in the config variable template.", "type": "string" }, "type": { - "description": "Different types of resource supported.", + "description": "Optional. Different types of resource supported.", "enum": [ "TYPE_UNSPECIFIED", "GCP_PROJECT", @@ -7123,11 +7249,11 @@ "id": "RoleGrant", "properties": { "helperTextTemplate": { - "description": "Template that UI can use to provide helper text to customers.", + "description": "Optional. Template that UI can use to provide helper text to customers.", "type": "string" }, "principal": { - "description": "Prinicipal/Identity for whom the role need to assigned.", + "description": "Optional. Prinicipal/Identity for whom the role need to assigned.", "enum": [ "PRINCIPAL_UNSPECIFIED", "CONNECTOR_SA" @@ -7140,10 +7266,10 @@ }, "resource": { "$ref": "Resource", - "description": "Resource on which the roles needs to be granted for the principal." + "description": "Optional. Resource on which the roles needs to be granted for the principal." }, "roles": { - "description": "List of roles that need to be granted.", + "description": "Optional. List of roles that need to be granted.", "items": { "type": "string" }, @@ -7585,14 +7711,14 @@ "id": "SslConfig", "properties": { "additionalVariables": { - "description": "Additional SSL related field values", + "description": "Optional. Additional SSL related field values", "items": { "$ref": "ConfigVariable" }, "type": "array" }, "clientCertType": { - "description": "Type of Client Cert (PEM/JKS/.. etc.)", + "description": "Optional. Type of Client Cert (PEM/JKS/.. etc.)", "enum": [ "CERT_TYPE_UNSPECIFIED", "PEM" @@ -7605,22 +7731,22 @@ }, "clientCertificate": { "$ref": "Secret", - "description": "Client Certificate" + "description": "Optional. Client Certificate" }, "clientPrivateKey": { "$ref": "Secret", - "description": "Client Private Key" + "description": "Optional. Client Private Key" }, "clientPrivateKeyPass": { "$ref": "Secret", - "description": "Secret containing the passphrase protecting the Client Private Key" + "description": "Optional. Secret containing the passphrase protecting the Client Private Key" }, "privateServerCertificate": { "$ref": "Secret", - "description": "Private Server Certificate. Needs to be specified if trust model is `PRIVATE`." + "description": "Optional. Private Server Certificate. Needs to be specified if trust model is `PRIVATE`." }, "serverCertType": { - "description": "Type of Server Cert (PEM/JKS/.. etc.)", + "description": "Optional. Type of Server Cert (PEM/JKS/.. etc.)", "enum": [ "CERT_TYPE_UNSPECIFIED", "PEM" @@ -7632,7 +7758,7 @@ "type": "string" }, "trustModel": { - "description": "Trust Model of the SSL connection", + "description": "Optional. Trust Model of the SSL connection", "enum": [ "PUBLIC", "PRIVATE", @@ -7646,7 +7772,7 @@ "type": "string" }, "type": { - "description": "Controls the ssl type for the given connector version.", + "description": "Optional. Controls the ssl type for the given connector version.", "enum": [ "SSL_TYPE_UNSPECIFIED", "TLS", @@ -7660,7 +7786,7 @@ "type": "string" }, "useSsl": { - "description": "Bool for enabling SSL", + "description": "Optional. Bool for enabling SSL", "type": "boolean" } }, @@ -8015,6 +8141,12 @@ } }, "type": "object" + }, + "WithdrawCustomConnectorVersionRequest": { + "description": "Request message for ConnectorsService.WithdrawCustomConnectorVersion", + "id": "WithdrawCustomConnectorVersionRequest", + "properties": {}, + "type": "object" } }, "servicePath": "", diff --git a/connectors/v1/connectors-gen.go b/connectors/v1/connectors-gen.go index 535235d1c23..d37cdae3d5d 100644 --- a/connectors/v1/connectors-gen.go +++ b/connectors/v1/connectors-gen.go @@ -685,21 +685,21 @@ func (s AuthSchema) MarshalJSON() ([]byte, error) { // AuthorizationCodeLink: This configuration captures the details required to // render an authorization link for the OAuth Authorization Code Flow. type AuthorizationCodeLink struct { - // ClientId: The client ID assigned to the Google Cloud Connectors OAuth app - // for the connector data source. + // ClientId: Optional. The client ID assigned to the Google Cloud Connectors + // OAuth app for the connector data source. ClientId string `json:"clientId,omitempty"` // ClientSecret: Optional. The client secret assigned to the Google Cloud // Connectors OAuth app for the connector data source. ClientSecret *Secret `json:"clientSecret,omitempty"` - // EnablePkce: Whether to enable PKCE for the auth code flow. + // EnablePkce: Optional. Whether to enable PKCE for the auth code flow. EnablePkce bool `json:"enablePkce,omitempty"` // OmitQueryParams: Optional. Omit query params from the redirect URI. OmitQueryParams bool `json:"omitQueryParams,omitempty"` - // Scopes: The scopes for which the user will authorize Google Cloud Connectors - // on the connector data source. + // Scopes: Optional. The scopes for which the user will authorize Google Cloud + // Connectors on the connector data source. Scopes []string `json:"scopes,omitempty"` - // Uri: The base URI the user must click to trigger the authorization code - // login flow. + // Uri: Optional. The base URI the user must click to trigger the authorization + // code login flow. Uri string `json:"uri,omitempty"` // ForceSendFields is a list of field names (e.g. "ClientId") to // unconditionally include in API requests. By default, fields with empty or @@ -885,14 +885,15 @@ func (s ConfigVariable) MarshalJSON() ([]byte, error) { // ConfigVariableTemplate: ConfigVariableTemplate provides metadata about a // `ConfigVariable` that is used in a Connection. type ConfigVariableTemplate struct { - // AuthorizationCodeLink: Authorization code link options. To be populated if - // `ValueType` is `AUTHORIZATION_CODE` + // AuthorizationCodeLink: Optional. Authorization code link options. To be + // populated if `ValueType` is `AUTHORIZATION_CODE` AuthorizationCodeLink *AuthorizationCodeLink `json:"authorizationCodeLink,omitempty"` - // Description: Description. + // Description: Optional. Description. Description string `json:"description,omitempty"` - // DisplayName: Display name of the parameter. + // DisplayName: Optional. Display name of the parameter. DisplayName string `json:"displayName,omitempty"` - // EnumOptions: Enum options. To be populated if `ValueType` is `ENUM` + // EnumOptions: Optional. Enum options. To be populated if `ValueType` is + // `ENUM` EnumOptions []*EnumOption `json:"enumOptions,omitempty"` // EnumSource: Optional. enum source denotes the source of api to fill the enum // options @@ -901,9 +902,10 @@ type ConfigVariableTemplate struct { // "ENUM_SOURCE_UNSPECIFIED" - Api type unspecified. // "EVENT_TYPES_API" - list event types. EnumSource string `json:"enumSource,omitempty"` - // IsAdvanced: Indicates if current template is part of advanced settings + // IsAdvanced: Optional. Indicates if current template is part of advanced + // settings IsAdvanced bool `json:"isAdvanced,omitempty"` - // Key: Key of the config variable. + // Key: Optional. Key of the config variable. Key string `json:"key,omitempty"` // LocationType: Optional. Location Tyep denotes where this value should be // sent in BYOC connections. @@ -918,26 +920,27 @@ type ConfigVariableTemplate struct { // MultipleSelectConfig: Optional. MultipleSelectConfig represents the multiple // options for a config variable. MultipleSelectConfig *MultipleSelectConfig `json:"multipleSelectConfig,omitempty"` - // Required: Flag represents that this `ConfigVariable` must be provided for a - // connection. + // Required: Optional. Flag represents that this `ConfigVariable` must be + // provided for a connection. Required bool `json:"required,omitempty"` - // RequiredCondition: Condition under which a field would be required. The - // condition can be represented in the form of a logical expression. + // RequiredCondition: Optional. Condition under which a field would be + // required. The condition can be represented in the form of a logical + // expression. RequiredCondition *LogicalExpression `json:"requiredCondition,omitempty"` - // RoleGrant: Role grant configuration for the config variable. + // RoleGrant: Optional. Role grant configuration for the config variable. RoleGrant *RoleGrant `json:"roleGrant,omitempty"` - // State: State of the config variable. + // State: Output only. State of the config variable. // // Possible values: // "STATE_UNSPECIFIED" - Status is unspecified. // "ACTIVE" - Config variable is active // "DEPRECATED" - Config variable is deprecated. State string `json:"state,omitempty"` - // ValidationRegex: Regular expression in RE2 syntax used for validating the - // `value` of a `ConfigVariable`. + // ValidationRegex: Optional. Regular expression in RE2 syntax used for + // validating the `value` of a `ConfigVariable`. ValidationRegex string `json:"validationRegex,omitempty"` - // ValueType: Type of the parameter: string, int, bool etc. consider custom - // type for the benefit for the validation. + // ValueType: Optional. Type of the parameter: string, int, bool etc. consider + // custom type for the benefit for the validation. // // Possible values: // "VALUE_TYPE_UNSPECIFIED" - Value type is not specified. @@ -1005,6 +1008,7 @@ type Connection struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "TEST" - TEST. // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. ConnectorVersionLaunchStage string `json:"connectorVersionLaunchStage,omitempty"` // CreateTime: Output only. Created time. @@ -1230,8 +1234,12 @@ type Connector struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "TEST" - TEST. // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. LaunchStage string `json:"launchStage,omitempty"` + // MarketplaceConnectorDetails: Output only. Marketplace connector details. + // Will be null if the connector is not marketplace connector. + MarketplaceConnectorDetails *MarketplaceConnectorDetails `json:"marketplaceConnectorDetails,omitempty"` // Name: Output only. Resource name of the Connector. Format: // projects/{project}/locations/{location}/providers/{provider}/connectors/{conn // ector} Only global location is supported for Connector resource. @@ -1369,6 +1377,7 @@ type ConnectorVersion struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "TEST" - TEST. // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. LaunchStage string `json:"launchStage,omitempty"` // Name: Output only. Resource name of the Version. Format: @@ -1435,7 +1444,7 @@ type ConnectorVersionInfraConfig struct { // ConnectionRatelimitWindowSeconds: Output only. The window used for // ratelimiting runtime requests to connections. ConnectionRatelimitWindowSeconds int64 `json:"connectionRatelimitWindowSeconds,omitempty,string"` - // DeploymentModel: Optional. Indicates whether connector is deployed on + // DeploymentModel: Output only. Indicates whether connector is deployed on // GKE/CloudRun // // Possible values: @@ -2075,9 +2084,9 @@ func (s EndpointAttachment) MarshalJSON() ([]byte, error) { // EnumOption: EnumOption definition type EnumOption struct { - // DisplayName: Display name of the option. + // DisplayName: Optional. Display name of the option. DisplayName string `json:"displayName,omitempty"` - // Id: Id of the option. + // Id: Optional. Id of the option. Id string `json:"id,omitempty"` // ForceSendFields is a list of field names (e.g. "DisplayName") to // unconditionally include in API requests. By default, fields with empty or @@ -2151,6 +2160,8 @@ func (s EventSubscription) MarshalJSON() ([]byte, error) { type EventSubscriptionDestination struct { // Endpoint: OPTION 1: Hit an endpoint when we receive an event. Endpoint *EndPoint `json:"endpoint,omitempty"` + // Gsutil: OPTION 2: Write the event to Cloud Storage bucket. + Gsutil *GSUtil `json:"gsutil,omitempty"` // ServiceAccount: Service account needed for runtime plane to trigger IP // workflow. ServiceAccount string `json:"serviceAccount,omitempty"` @@ -2159,6 +2170,8 @@ type EventSubscriptionDestination struct { // Possible values: // "TYPE_UNSPECIFIED" - Default state. // "ENDPOINT" - Endpoint - Hit the value of endpoint when event is received + // "GCS" - Cloud Storage - Write the event to Cloud Storage bucket + // "PUBSUB" - Pub/Sub - Write the event to Pub/Sub topic Type string `json:"type,omitempty"` // ForceSendFields is a list of field names (e.g. "Endpoint") to // unconditionally include in API requests. By default, fields with empty or @@ -2258,14 +2271,14 @@ func (s EventType) MarshalJSON() ([]byte, error) { // EventingConfig: Eventing Configuration of a connection type EventingConfig struct { - // AdditionalVariables: Additional eventing related field values + // AdditionalVariables: Optional. Additional eventing related field values AdditionalVariables []*ConfigVariable `json:"additionalVariables,omitempty"` - // AuthConfig: Auth details for the webhook adapter. + // AuthConfig: Optional. Auth details for the webhook adapter. AuthConfig *AuthConfig `json:"authConfig,omitempty"` // DeadLetterConfig: Optional. Dead letter configuration for eventing of a // connection. DeadLetterConfig *DeadLetterConfig `json:"deadLetterConfig,omitempty"` - // EnrichmentEnabled: Enrichment Enabled. + // EnrichmentEnabled: Optional. Enrichment Enabled. EnrichmentEnabled bool `json:"enrichmentEnabled,omitempty"` // EventsListenerIngressEndpoint: Optional. Ingress endpoint of the event // listener. This is used only when private connectivity is enabled. @@ -2276,7 +2289,8 @@ type EventingConfig struct { PrivateConnectivityEnabled bool `json:"privateConnectivityEnabled,omitempty"` // ProxyDestinationConfig: Optional. Proxy for Eventing auto-registration. ProxyDestinationConfig *DestinationConfig `json:"proxyDestinationConfig,omitempty"` - // RegistrationDestinationConfig: Registration endpoint for auto registration. + // RegistrationDestinationConfig: Optional. Registration endpoint for auto + // registration. RegistrationDestinationConfig *DestinationConfig `json:"registrationDestinationConfig,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalVariables") to // unconditionally include in API requests. By default, fields with empty or @@ -2367,6 +2381,7 @@ type EventingDetails struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "TEST" - TEST. // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. LaunchStage string `json:"launchStage,omitempty"` // Name: Output only. Name of the Eventing trigger. @@ -2681,7 +2696,7 @@ func (s Field) MarshalJSON() ([]byte, error) { type FieldComparison struct { // BoolValue: Boolean value BoolValue bool `json:"boolValue,omitempty"` - // Comparator: Comparator to use for comparing the field value. + // Comparator: Optional. Comparator to use for comparing the field value. // // Possible values: // "COMPARATOR_UNSPECIFIED" - The default value. @@ -2690,7 +2705,7 @@ type FieldComparison struct { Comparator string `json:"comparator,omitempty"` // IntValue: Integer value IntValue int64 `json:"intValue,omitempty,string"` - // Key: Key of the field. + // Key: Optional. Key of the field. Key string `json:"key,omitempty"` // StringValue: String value StringValue string `json:"stringValue,omitempty"` @@ -2712,6 +2727,29 @@ func (s FieldComparison) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GSUtil: GSUtil message includes details of the Destination Cloud Storage +// bucket. +type GSUtil struct { + // GsutilUri: Required. The URI of the Cloud Storage bucket. + GsutilUri string `json:"gsutilUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "GsutilUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GsutilUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GSUtil) MarshalJSON() ([]byte, error) { + type NoMethod GSUtil + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // HPAConfig: Autoscaling config for connector deployment system metrics. type HPAConfig struct { // CpuUtilizationThreshold: Output only. Percent CPU utilization where HPA @@ -3688,12 +3726,12 @@ func (s LockConfig) MarshalJSON() ([]byte, error) { // LogicalExpression: Struct for representing boolean expressions. type LogicalExpression struct { - // FieldComparisons: A list of fields to be compared. + // FieldComparisons: Optional. A list of fields to be compared. FieldComparisons []*FieldComparison `json:"fieldComparisons,omitempty"` - // LogicalExpressions: A list of nested conditions to be compared. + // LogicalExpressions: Optional. A list of nested conditions to be compared. LogicalExpressions []*LogicalExpression `json:"logicalExpressions,omitempty"` - // LogicalOperator: The logical operator to use between the fields and - // conditions. + // LogicalOperator: Optional. The logical operator to use between the fields + // and conditions. // // Possible values: // "OPERATOR_UNSPECIFIED" - The default value. @@ -3907,6 +3945,34 @@ func (s ManagedZone) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// MarketplaceConnectorDetails: Marketplace connector details. +type MarketplaceConnectorDetails struct { + // MarketplaceProduct: Marketplace product name. + MarketplaceProduct string `json:"marketplaceProduct,omitempty"` + // MarketplaceProductId: Marketplace product ID. + MarketplaceProductId string `json:"marketplaceProductId,omitempty"` + // MarketplaceProductUri: Marketplace product URL. + MarketplaceProductUri string `json:"marketplaceProductUri,omitempty"` + // Partner: The name of the partner. + Partner string `json:"partner,omitempty"` + // ForceSendFields is a list of field names (e.g. "MarketplaceProduct") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MarketplaceProduct") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MarketplaceConnectorDetails) MarshalJSON() ([]byte, error) { + type NoMethod MarketplaceConnectorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // MultipleSelectConfig: MultipleSelectConfig represents the multiple options // for a config variable. type MultipleSelectConfig struct { @@ -4494,6 +4560,7 @@ type Provider struct { // "PREVIEW" - PREVIEW. // "GA" - GA. // "DEPRECATED" - DEPRECATED. + // "TEST" - TEST. // "PRIVATE_PREVIEW" - PRIVATE_PREVIEW. LaunchStage string `json:"launchStage,omitempty"` // Name: Output only. Resource name of the Provider. Format: @@ -4556,6 +4623,30 @@ func (s ProvisionedResource) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PublishCustomConnectorVersionRequest: Request message for +// ConnectorsService.PublishCustomConnectorVersion +type PublishCustomConnectorVersionRequest struct { + // PartnerMetadata: Required. Partner metadata details for validating and + // publishing the custom connector as a partner connector version. + PartnerMetadata *PartnerMetadata `json:"partnerMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "PartnerMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PartnerMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PublishCustomConnectorVersionRequest) MarshalJSON() ([]byte, error) { + type NoMethod PublishCustomConnectorVersionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // PublishStatus: Publish status of a custom connector. type PublishStatus struct { // PublishState: Output only. Publish state of the custom connector. @@ -4638,11 +4729,11 @@ type RepairEventingRequest struct { // Resource: Resource definition type Resource struct { - // PathTemplate: Template to uniquely represent a Google Cloud resource in a - // format IAM expects This is a template that can have references to other - // values provided in the config variable template. + // PathTemplate: Optional. Template to uniquely represent a Google Cloud + // resource in a format IAM expects This is a template that can have references + // to other values provided in the config variable template. PathTemplate string `json:"pathTemplate,omitempty"` - // Type: Different types of resource supported. + // Type: Optional. Different types of resource supported. // // Possible values: // "TYPE_UNSPECIFIED" - Value type is not specified. @@ -4814,10 +4905,10 @@ type RetryEventSubscriptionRequest struct { // used by the UI to render a 'grant' button to do the same on behalf of the // user. type RoleGrant struct { - // HelperTextTemplate: Template that UI can use to provide helper text to - // customers. + // HelperTextTemplate: Optional. Template that UI can use to provide helper + // text to customers. HelperTextTemplate string `json:"helperTextTemplate,omitempty"` - // Principal: Prinicipal/Identity for whom the role need to assigned. + // Principal: Optional. Prinicipal/Identity for whom the role need to assigned. // // Possible values: // "PRINCIPAL_UNSPECIFIED" - Value type is not specified. @@ -4825,9 +4916,10 @@ type RoleGrant struct { // is either the default service account if unspecified or Service Account // provided by Customers through BYOSA. Principal string `json:"principal,omitempty"` - // Resource: Resource on which the roles needs to be granted for the principal. + // Resource: Optional. Resource on which the roles needs to be granted for the + // principal. Resource *Resource `json:"resource,omitempty"` - // Roles: List of roles that need to be granted. + // Roles: Optional. List of roles that need to be granted. Roles []string `json:"roles,omitempty"` // ForceSendFields is a list of field names (e.g. "HelperTextTemplate") to // unconditionally include in API requests. By default, fields with empty or @@ -5311,45 +5403,45 @@ func (s SshPublicKey) MarshalJSON() ([]byte, error) { // SslConfig: SSL Configuration of a connection type SslConfig struct { - // AdditionalVariables: Additional SSL related field values + // AdditionalVariables: Optional. Additional SSL related field values AdditionalVariables []*ConfigVariable `json:"additionalVariables,omitempty"` - // ClientCertType: Type of Client Cert (PEM/JKS/.. etc.) + // ClientCertType: Optional. Type of Client Cert (PEM/JKS/.. etc.) // // Possible values: // "CERT_TYPE_UNSPECIFIED" - Cert type unspecified. // "PEM" - Privacy Enhanced Mail (PEM) Type ClientCertType string `json:"clientCertType,omitempty"` - // ClientCertificate: Client Certificate + // ClientCertificate: Optional. Client Certificate ClientCertificate *Secret `json:"clientCertificate,omitempty"` - // ClientPrivateKey: Client Private Key + // ClientPrivateKey: Optional. Client Private Key ClientPrivateKey *Secret `json:"clientPrivateKey,omitempty"` - // ClientPrivateKeyPass: Secret containing the passphrase protecting the Client - // Private Key + // ClientPrivateKeyPass: Optional. Secret containing the passphrase protecting + // the Client Private Key ClientPrivateKeyPass *Secret `json:"clientPrivateKeyPass,omitempty"` - // PrivateServerCertificate: Private Server Certificate. Needs to be specified - // if trust model is `PRIVATE`. + // PrivateServerCertificate: Optional. Private Server Certificate. Needs to be + // specified if trust model is `PRIVATE`. PrivateServerCertificate *Secret `json:"privateServerCertificate,omitempty"` - // ServerCertType: Type of Server Cert (PEM/JKS/.. etc.) + // ServerCertType: Optional. Type of Server Cert (PEM/JKS/.. etc.) // // Possible values: // "CERT_TYPE_UNSPECIFIED" - Cert type unspecified. // "PEM" - Privacy Enhanced Mail (PEM) Type ServerCertType string `json:"serverCertType,omitempty"` - // TrustModel: Trust Model of the SSL connection + // TrustModel: Optional. Trust Model of the SSL connection // // Possible values: // "PUBLIC" - Public Trust Model. Takes the Default Java trust store. // "PRIVATE" - Private Trust Model. Takes custom/private trust store. // "INSECURE" - Insecure Trust Model. Accept all certificates. TrustModel string `json:"trustModel,omitempty"` - // Type: Controls the ssl type for the given connector version. + // Type: Optional. Controls the ssl type for the given connector version. // // Possible values: // "SSL_TYPE_UNSPECIFIED" - No SSL configuration required. // "TLS" - TLS Handshake // "MTLS" - mutual TLS (MTLS) Handshake Type string `json:"type,omitempty"` - // UseSsl: Bool for enabling SSL + // UseSsl: Optional. Bool for enabling SSL UseSsl bool `json:"useSsl,omitempty"` // ForceSendFields is a list of field names (e.g. "AdditionalVariables") to // unconditionally include in API requests. By default, fields with empty or @@ -5819,6 +5911,11 @@ func (s WeeklyCycle) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// WithdrawCustomConnectorVersionRequest: Request message for +// ConnectorsService.WithdrawCustomConnectorVersion +type WithdrawCustomConnectorVersionRequest struct { +} + type ProjectsLocationsGetCall struct { s *Service name string @@ -9772,6 +9869,214 @@ func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsDeprecateCall) return ret, nil } +type ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall struct { + s *Service + name string + publishcustomconnectorversionrequest *PublishCustomConnectorVersionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Publish: Publish request for the CustomConnectorVersion. Once approved, the +// CustomConnectorVersion will be published as PartnerConnector. +// +// - name: Resource name of the form: +// `projects/{project}/locations/{location}/customConnectors/{custom_connector +// }/customConnectorVersions/{custom_connector_version}`. +func (r *ProjectsLocationsCustomConnectorsCustomConnectorVersionsService) Publish(name string, publishcustomconnectorversionrequest *PublishCustomConnectorVersionRequest) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall { + c := &ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.publishcustomconnectorversionrequest = publishcustomconnectorversionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall) Context(ctx context.Context) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publishcustomconnectorversionrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:publish") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "connectors.projects.locations.customConnectors.customConnectorVersions.publish" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsPublishCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall struct { + s *Service + name string + withdrawcustomconnectorversionrequest *WithdrawCustomConnectorVersionRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Withdraw: Withdraw the publish request for the CustomConnectorVersion. This +// can only be used before the CustomConnectorVersion is published. +// +// - name: Resource name of the form: +// `projects/{project}/locations/{location}/customConnectors/{custom_connector +// }/customConnectorVersions/{custom_connector_version}`. +func (r *ProjectsLocationsCustomConnectorsCustomConnectorVersionsService) Withdraw(name string, withdrawcustomconnectorversionrequest *WithdrawCustomConnectorVersionRequest) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall { + c := &ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.withdrawcustomconnectorversionrequest = withdrawcustomconnectorversionrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall) Context(ctx context.Context) *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.withdrawcustomconnectorversionrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:withdraw") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "connectors.projects.locations.customConnectors.customConnectorVersions.withdraw" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsCustomConnectorsCustomConnectorVersionsWithdrawCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsEndpointAttachmentsCreateCall struct { s *Service parent string @@ -12152,7 +12457,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index dd79fb29abf..86b662e15b6 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -1719,6 +1719,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", @@ -1802,6 +1836,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/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, + "type": "string" + } + }, + "path": "v1/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1869,6 +1931,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -2546,7 +2613,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -3278,6 +3345,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/engines/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:recommend", @@ -3361,6 +3462,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/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, + "type": "string" + } + }, + "path": "v1/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -3428,6 +3557,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -4984,6 +5118,40 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "patch": { + "description": "Updates a ServingConfig. Returns a NOT_FOUND error if the ServingConfig does not exist.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}", + "httpMethod": "PATCH", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/servingConfigs/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfig" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "recommend": { "description": "Makes a recommendation, which requires a contextual user event.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:recommend", @@ -5067,6 +5235,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/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, + "type": "string" + } + }, + "path": "v1/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -5134,6 +5330,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -5605,7 +5806,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -5949,7 +6150,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -6140,7 +6341,7 @@ } } }, - "revision": "20241123", + "revision": "20241205", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -6610,6 +6811,18 @@ "readOnly": true, "type": "string" }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.", + "format": "double", + "type": "number" + }, + "groundingSupports": { + "description": "Optional. Grounding supports.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerGroundingSupport" + }, + "type": "array" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" @@ -6693,6 +6906,39 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1AnswerGroundingSupport": { + "description": "Grounding support for a claim in `answer_text`.", + "id": "GoogleCloudDiscoveryengineV1AnswerGroundingSupport", + "properties": { + "endIndex": { + "description": "Required. End of the claim, exclusive.", + "format": "int64", + "type": "string" + }, + "groundingCheckRequired": { + "description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.", + "type": "boolean" + }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.", + "format": "double", + "type": "number" + }, + "sources": { + "description": "Optional. Citation sources for the claim.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1AnswerQueryRequest": { "description": "Request message for ConversationalSearchService.AnswerQuery method.", "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequest", @@ -6889,6 +7135,31 @@ "description": "Max rephrase steps. The max number is 5 steps. If not set or set to \u003c 1, it will be set to 1 by default.", "format": "int32", "type": "integer" + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "description": "Optional. Query Rephraser Model specification." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec": { + "description": "Query Rephraser Model specification.", + "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "properties": { + "modelType": { + "description": "Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.", + "enum": [ + "MODEL_TYPE_UNSPECIFIED", + "SMALL", + "LARGE" + ], + "enumDescriptions": [ + "Unspecified model type.", + "Small query rephraser model. Gemini 1.0 XS model.", + "Large query rephraser model. Gemini 1.0 Pro model." + ], + "type": "string" } }, "type": "object" @@ -6905,7 +7176,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec": { - "description": "Safety specification.", + "description": "Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.", "id": "GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec", "properties": { "enable": { @@ -9511,6 +9782,10 @@ "type": "string" }, "type": "array" + }, + "updateFromLatestPredefinedSchema": { + "description": "Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import.", + "type": "boolean" } }, "type": "object" @@ -11200,6 +11475,10 @@ "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", "id": "GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec", "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestBoostSpec", + "description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" @@ -11717,16 +11996,194 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1ServingConfig": { + "description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions). The ServingConfig is passed in the search and predict request and generates results.", + "id": "GoogleCloudDiscoveryengineV1ServingConfig", + "properties": { + "boostControlIds": { + "description": "Boost controls to use in serving path. All triggered boost controls will be applied. Boost controls must be in the same data store as the serving config. Maximum of 20 boost controls.", + "items": { + "type": "string" + }, + "type": "array" + }, + "createTime": { + "description": "Output only. ServingConfig created timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The human readable serving 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.", + "type": "string" + }, + "dissociateControlIds": { + "description": "Condition do not associate specifications. If multiple do not associate conditions match, all matching do not associate controls in the list will execute. Order does not matter. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "diversityLevel": { + "description": "How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "type": "string" + }, + "filterControlIds": { + "description": "Filter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls.", + "items": { + "type": "string" + }, + "type": "array" + }, + "genericConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", + "description": "The GenericConfig of the serving configuration." + }, + "ignoreControlIds": { + "description": "Condition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. Order does not matter. Maximum number of specifications is 100.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mediaConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", + "description": "The MediaConfig of the serving configuration." + }, + "modelId": { + "description": "The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "type": "string" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "type": "string" + }, + "onewaySynonymsControlIds": { + "description": "Condition oneway synonyms specifications. If multiple oneway synonyms conditions match, all matching oneway synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "promoteControlIds": { + "description": "Condition promote specifications. Maximum number of specifications is 100.", + "items": { + "type": "string" + }, + "type": "array" + }, + "rankingExpression": { + "description": "The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined 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)`.", + "type": "string" + }, + "redirectControlIds": { + "description": "IDs of the redirect controls. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "replacementControlIds": { + "description": "Condition replacement specifications. Applied according to the order in the list. A previously replaced term can not be re-replaced. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "solutionType": { + "description": "Required. Immutable. Specifies the solution type that a serving config can be associated with.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsControlIds": { + "description": "Condition synonyms specifications. If multiple synonyms conditions match, all matching synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. ServingConfig updated timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig": { + "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", + "properties": { + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", + "description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig": { + "description": "Specifies the configurations needed for Media Discovery. Currently we support: * `demote_content_watched`: Threshold for watched content demotion. Customers can specify if using watched content demotion or use viewed detail page. Using the content watched demotion, customers need to specify the watched minutes or percentage exceeds the threshold, the content will be demoted in the recommendation result. * `promote_fresh_content`: cutoff days for fresh content promotion. Customers can specify if using content freshness promotion. If the content was published within the cutoff days, the content will be promoted in the recommendation result. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", + "properties": { + "contentFreshnessCutoffDays": { + "description": "Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.", + "format": "int32", + "type": "integer" + }, + "contentWatchedPercentageThreshold": { + "description": "Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.", + "format": "float", + "type": "number" + }, + "contentWatchedSecondsThreshold": { + "description": "Specifies the content watched minutes threshold for demotion.", + "format": "float", + "type": "number" + }, + "demoteContentWatchedPastDays": { + "description": "Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.", + "format": "int32", + "type": "integer" + }, + "demotionEventType": { + "description": "Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1Session": { "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1Session", "properties": { + "displayName": { + "description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.", + "type": "string" + }, "endTime": { "description": "Output only. The time the session finished.", "format": "google-datetime", "readOnly": true, "type": "string" }, + "isPinned": { + "description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.", + "type": "boolean" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", "type": "string" @@ -12431,6 +12888,18 @@ "readOnly": true, "type": "string" }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.", + "format": "double", + "type": "number" + }, + "groundingSupports": { + "description": "Optional. Grounding supports.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport" + }, + "type": "array" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" @@ -12514,6 +12983,39 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport": { + "description": "Grounding support for a claim in `answer_text`.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport", + "properties": { + "endIndex": { + "description": "Required. End of the claim, exclusive.", + "format": "int64", + "type": "string" + }, + "groundingCheckRequired": { + "description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.", + "type": "boolean" + }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.", + "format": "double", + "type": "number" + }, + "sources": { + "description": "Optional. Citation sources for the claim.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": { "description": "Query understanding information.", "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", @@ -13584,6 +14086,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest": { + "description": "Request for DeleteSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest", + "properties": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata", @@ -14371,6 +14884,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaGetSessionRequest": { + "description": "Request for GetSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaGetSessionRequest", + "properties": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "type": "boolean" + }, + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": { "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.", "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse", @@ -14744,6 +15272,52 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListSessionsRequest": { + "description": "Request for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsRequest", + "properties": { + "filter": { + "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", + "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.", + "type": "string" + }, + "parent": { + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaListSessionsResponse": { + "description": "Response for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse", + "properties": { + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", + "type": "string" + }, + "sessions": { + "description": "All the Sessions for a given data store.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig": { "description": "Configuration for Natural Language Query Understanding.", "id": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig", @@ -15749,6 +16323,10 @@ "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec", "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" @@ -16014,12 +16592,20 @@ "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1alphaSession", "properties": { + "displayName": { + "description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.", + "type": "string" + }, "endTime": { "description": "Output only. The time the session finished.", "format": "google-datetime", "readOnly": true, "type": "string" }, + "isPinned": { + "description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.", + "type": "boolean" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", "type": "string" @@ -16353,6 +16939,22 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest": { + "description": "Request for UpdateSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest", + "properties": { + "session": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession", + "description": "Required. The Session to update." + }, + "updateMask": { + "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata", @@ -18647,6 +19249,10 @@ "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", "id": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec", "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", + "description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index 23d49afca66..b962aa081fd 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -1634,6 +1634,11 @@ type GoogleCloudDiscoveryengineV1Answer struct { CompleteTime string `json:"completeTime,omitempty"` // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded the + // answer is by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // GroundingSupports: Optional. Grounding supports. + GroundingSupports []*GoogleCloudDiscoveryengineV1AnswerGroundingSupport `json:"groundingSupports,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*/answers/*` @@ -1675,6 +1680,20 @@ func (s GoogleCloudDiscoveryengineV1Answer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1Answer) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1Answer + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1AnswerCitation: Citation info for a segment. type GoogleCloudDiscoveryengineV1AnswerCitation struct { // EndIndex: End of the attributed segment, exclusive. @@ -1724,6 +1743,57 @@ func (s GoogleCloudDiscoveryengineV1AnswerCitationSource) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1AnswerGroundingSupport: Grounding support for a +// claim in `answer_text`. +type GoogleCloudDiscoveryengineV1AnswerGroundingSupport struct { + // EndIndex: Required. End of the claim, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // GroundingCheckRequired: Indicates that this claim required grounding check. + // When the system decided this claim didn't require attribution/grounding + // check, this field is set to false. In that case, no grounding check was done + // for the claim and therefore `grounding_score`, `sources` is not returned. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded is a + // specific claim by the references. Higher value means that the claim is + // better supported by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // Sources: Optional. Citation sources for the claim. + Sources []*GoogleCloudDiscoveryengineV1AnswerCitationSource `json:"sources,omitempty"` + // StartIndex: Required. Index indicates the start of the claim, measured in + // bytes (UTF-8 unicode). + StartIndex int64 `json:"startIndex,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndIndex") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1AnswerGroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AnswerGroundingSupport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1AnswerGroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1AnswerGroundingSupport + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1AnswerQueryRequest: Request message for // ConversationalSearchService.AnswerQuery method. type GoogleCloudDiscoveryengineV1AnswerQueryRequest struct { @@ -2002,6 +2072,8 @@ type GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRe // MaxRephraseSteps: Max rephrase steps. The max number is 5 steps. If not set // or set to < 1, it will be set to 1 by default. MaxRephraseSteps int64 `json:"maxRephraseSteps,omitempty"` + // ModelSpec: Optional. Query Rephraser Model specification. + ModelSpec *GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec `json:"modelSpec,omitempty"` // ForceSendFields is a list of field names (e.g. "Disable") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -2020,6 +2092,35 @@ func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQuer return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryReph +// raserSpecModelSpec: Query Rephraser Model specification. +type GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec struct { + // ModelType: Optional. Enabled query rephraser model type. If not set, it will + // use LARGE by default. + // + // Possible values: + // "MODEL_TYPE_UNSPECIFIED" - Unspecified model type. + // "SMALL" - Small query rephraser model. Gemini 1.0 XS model. + // "LARGE" - Large query rephraser model. Gemini 1.0 Pro model. + ModelType string `json:"modelType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ModelType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ModelType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1AnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1AnswerQueryRequestRelatedQuestionsSpec: Related // questions specification. type GoogleCloudDiscoveryengineV1AnswerQueryRequestRelatedQuestionsSpec struct { @@ -2044,7 +2145,10 @@ func (s GoogleCloudDiscoveryengineV1AnswerQueryRequestRelatedQuestionsSpec) Mars } // GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec: Safety -// specification. +// specification. There are two use cases: 1. when only safety_spec.enable is +// set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. +// 2. when safety_spec.enable is set and some safety_settings are set, only +// specified safety_settings are applied. type GoogleCloudDiscoveryengineV1AnswerQueryRequestSafetySpec struct { // Enable: Enable the safety filtering on the answer response. It is false by // default. @@ -5611,6 +5715,13 @@ type GoogleCloudDiscoveryengineV1FhirStoreSource struct { // (https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). // Default to all supported FHIR resource types if empty. ResourceTypes []string `json:"resourceTypes,omitempty"` + // UpdateFromLatestPredefinedSchema: Optional. Whether to update the DataStore + // schema to the latest predefined schema. If true, the DataStore schema will + // be updated to include any FHIR fields or resource types that have been added + // since the last import and corresponding FHIR resources will be imported from + // the FHIR store. Note this field cannot be used in conjunction with + // `resource_types`. It should be used after initial import. + UpdateFromLatestPredefinedSchema bool `json:"updateFromLatestPredefinedSchema,omitempty"` // ForceSendFields is a list of field names (e.g. "FhirStore") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -8246,6 +8357,10 @@ func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecMod // data stores to filter on in a search call and configurations for those data // stores. Otherwise, an `INVALID_ARGUMENT` error is returned. type GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec struct { + // BoostSpec: Optional. Boost specification to boost certain documents. For + // more information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1SearchRequestBoostSpec `json:"boostSpec,omitempty"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -8255,13 +8370,13 @@ type GoogleCloudDiscoveryengineV1SearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStore") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -9026,10 +9141,233 @@ func (s GoogleCloudDiscoveryengineV1SearchResponseSummarySummaryWithMetadata) Ma return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1ServingConfig: Configures metadata that is used +// to generate serving time results (e.g. search results or recommendation +// predictions). The ServingConfig is passed in the search and predict request +// and generates results. +type GoogleCloudDiscoveryengineV1ServingConfig struct { + // BoostControlIds: Boost controls to use in serving path. All triggered boost + // controls will be applied. Boost controls must be in the same data store as + // the serving config. Maximum of 20 boost controls. + BoostControlIds []string `json:"boostControlIds,omitempty"` + // CreateTime: Output only. ServingConfig created timestamp. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Required. The human readable serving 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"` + // DissociateControlIds: Condition do not associate specifications. If multiple + // do not associate conditions match, all matching do not associate controls in + // the list will execute. Order does not matter. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + DissociateControlIds []string `json:"dissociateControlIds,omitempty"` + // DiversityLevel: How much diversity to use in recommendation model results + // e.g. `medium-diversity` or `high-diversity`. Currently supported values: * + // `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * + // `auto-diversity` If not specified, we choose default based on recommendation + // model type. Default value: `no-diversity`. Can only be set if SolutionType + // is SOLUTION_TYPE_RECOMMENDATION. + DiversityLevel string `json:"diversityLevel,omitempty"` + // FilterControlIds: Filter controls to use in serving path. All triggered + // filter controls will be applied. Filter controls must be in the same data + // store as the serving config. Maximum of 20 filter controls. + FilterControlIds []string `json:"filterControlIds,omitempty"` + // GenericConfig: The GenericConfig of the serving configuration. + GenericConfig *GoogleCloudDiscoveryengineV1ServingConfigGenericConfig `json:"genericConfig,omitempty"` + // IgnoreControlIds: Condition ignore specifications. If multiple ignore + // conditions match, all matching ignore controls in the list will execute. + // Order does not matter. Maximum number of specifications is 100. + IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` + // MediaConfig: The MediaConfig of the serving configuration. + MediaConfig *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig `json:"mediaConfig,omitempty"` + // ModelId: The id of the model to use at serving time. Currently only + // RecommendationModels are supported. Can be changed but only to a compatible + // model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required + // when SolutionType is SOLUTION_TYPE_RECOMMENDATION. + ModelId string `json:"modelId,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}/servingConfigs/{serving_config_id}` + Name string `json:"name,omitempty"` + // OnewaySynonymsControlIds: Condition oneway synonyms specifications. If + // multiple oneway synonyms conditions match, all matching oneway synonyms + // controls in the list will execute. Maximum number of specifications is 100. + // Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. + OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"` + // PromoteControlIds: Condition promote specifications. Maximum number of + // specifications is 100. + PromoteControlIds []string `json:"promoteControlIds,omitempty"` + // RankingExpression: The ranking expression controls the customized ranking on + // retrieval documents. To leverage this, document embedding is required. The + // ranking expression setting in ServingConfig applies to all search requests + // served by the serving config. However, if SearchRequest.ranking_expression + // is specified, it overrides the ServingConfig ranking expression. The ranking + // expression is a single function or multiple functions that are joined 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"` + // RedirectControlIds: IDs of the redirect controls. Only the first triggered + // redirect action is applied, even if multiple apply. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + RedirectControlIds []string `json:"redirectControlIds,omitempty"` + // ReplacementControlIds: Condition replacement specifications. Applied + // according to the order in the list. A previously replaced term can not be + // re-replaced. Maximum number of specifications is 100. Can only be set if + // SolutionType is SOLUTION_TYPE_SEARCH. + ReplacementControlIds []string `json:"replacementControlIds,omitempty"` + // SolutionType: Required. Immutable. Specifies the solution type that a + // serving config can be associated with. + // + // 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. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsControlIds: Condition synonyms specifications. If multiple synonyms + // conditions match, all matching synonyms controls in the list will execute. + // Maximum number of specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + SynonymsControlIds []string `json:"synonymsControlIds,omitempty"` + // UpdateTime: Output only. ServingConfig updated timestamp. + 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. "BoostControlIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BoostControlIds") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigGenericConfig: Specifies the +// configurations needed for Generic Discovery.Currently we support: * +// `content_search_spec`: configuration for generic content search. +type GoogleCloudDiscoveryengineV1ServingConfigGenericConfig struct { + // ContentSearchSpec: Specifies the expected behavior of content search. Only + // valid for content-search enabled data store. + ContentSearchSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentSearchSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContentSearchSpec") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfigGenericConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigGenericConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigMediaConfig: Specifies the +// configurations needed for Media Discovery. Currently we support: * +// `demote_content_watched`: Threshold for watched content demotion. Customers +// can specify if using watched content demotion or use viewed detail page. +// Using the content watched demotion, customers need to specify the watched +// minutes or percentage exceeds the threshold, the content will be demoted in +// the recommendation result. * `promote_fresh_content`: cutoff days for fresh +// content promotion. Customers can specify if using content freshness +// promotion. If the content was published within the cutoff days, the content +// will be promoted in the recommendation result. Can only be set if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +type GoogleCloudDiscoveryengineV1ServingConfigMediaConfig struct { + // ContentFreshnessCutoffDays: Specifies the content freshness used for + // recommendation result. Contents will be demoted if contents were published + // for more than content freshness cutoff days. + ContentFreshnessCutoffDays int64 `json:"contentFreshnessCutoffDays,omitempty"` + // ContentWatchedPercentageThreshold: Specifies the content watched percentage + // threshold for demotion. Threshold value must be between [0, 1.0] inclusive. + ContentWatchedPercentageThreshold float64 `json:"contentWatchedPercentageThreshold,omitempty"` + // ContentWatchedSecondsThreshold: Specifies the content watched minutes + // threshold for demotion. + ContentWatchedSecondsThreshold float64 `json:"contentWatchedSecondsThreshold,omitempty"` + // DemoteContentWatchedPastDays: Optional. Specifies the number of days to look + // back for demoting watched content. If set to zero or unset, defaults to the + // maximum of 365 days. + DemoteContentWatchedPastDays int64 `json:"demoteContentWatchedPastDays,omitempty"` + // DemotionEventType: Specifies the event type used for demoting recommendation + // result. Currently supported values: * `view-item`: Item viewed. * + // `media-play`: Start/resume watching a video, playing a song, etc. * + // `media-complete`: Finished or stopped midway through a video, song, etc. If + // unset, watch history demotion will not be applied. Content freshness + // demotion will still be applied. + DemotionEventType string `json:"demotionEventType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentFreshnessCutoffDays") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContentFreshnessCutoffDays") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + var s1 struct { + ContentWatchedPercentageThreshold gensupport.JSONFloat64 `json:"contentWatchedPercentageThreshold"` + ContentWatchedSecondsThreshold gensupport.JSONFloat64 `json:"contentWatchedSecondsThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ContentWatchedPercentageThreshold = float64(s1.ContentWatchedPercentageThreshold) + s.ContentWatchedSecondsThreshold = float64(s1.ContentWatchedSecondsThreshold) + return nil +} + // GoogleCloudDiscoveryengineV1Session: External session proto definition. type GoogleCloudDiscoveryengineV1Session struct { + // DisplayName: Optional. The display name of the session. This field is used + // to identify the session in the UI. By default, the display name is the first + // turn query text in the session. + DisplayName string `json:"displayName,omitempty"` // EndTime: Output only. The time the session finished. EndTime string `json:"endTime,omitempty"` + // IsPinned: Optional. Whether the session is pinned, pinned session will be + // displayed on the top of the session list. + IsPinned bool `json:"isPinned,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*` @@ -9049,13 +9387,13 @@ type GoogleCloudDiscoveryengineV1Session struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -9994,6 +10332,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { CompleteTime string `json:"completeTime,omitempty"` // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded the + // answer is by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // GroundingSupports: Optional. Grounding supports. + GroundingSupports []*GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport `json:"groundingSupports,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*/answers/*` @@ -10032,6 +10375,20 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1alphaAnswer) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswer + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerCitation: Citation info for a // segment. type GoogleCloudDiscoveryengineV1alphaAnswerCitation struct { @@ -10082,6 +10439,57 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerCitationSource) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport: Grounding support +// for a claim in `answer_text`. +type GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport struct { + // EndIndex: Required. End of the claim, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // GroundingCheckRequired: Indicates that this claim required grounding check. + // When the system decided this claim didn't require attribution/grounding + // check, this field is set to false. In that case, no grounding check was done + // for the claim and therefore `grounding_score`, `sources` is not returned. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded is a + // specific claim by the references. Higher value means that the claim is + // better supported by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // Sources: Optional. Citation sources for the claim. + Sources []*GoogleCloudDiscoveryengineV1alphaAnswerCitationSource `json:"sources,omitempty"` + // StartIndex: Required. Index indicates the start of the claim, measured in + // bytes (UTF-8 unicode). + StartIndex int64 `json:"startIndex,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndIndex") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo: Query // understanding information. type GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo struct { @@ -11494,6 +11902,31 @@ func (s GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest: Request for +// DeleteSession method. +type GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest struct { + // Name: Required. The resource name of the Session to delete. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata: Metadata related to // the progress of the SiteSearchEngineService.DeleteSitemap operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -12562,6 +12995,34 @@ func (s GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaGetSessionRequest: Request for GetSession +// method. +type GoogleCloudDiscoveryengineV1alphaGetSessionRequest struct { + // IncludeAnswerDetails: Optional. If set to true, the full session including + // all answer details will be returned. + IncludeAnswerDetails bool `json:"includeAnswerDetails,omitempty"` + // Name: Required. The resource name of the Session to get. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "IncludeAnswerDetails") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IncludeAnswerDetails") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaGetSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGetSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse: Response // message for SiteSearchEngineService.GetUriPatternDocumentData method. type GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse struct { @@ -13070,6 +13531,70 @@ func (s GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListSessionsRequest: Request for +// ListSessions method. +type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { + // Filter: A filter to apply on the list results. The supported features are: + // user_pseudo_id, state. Example: "user_pseudo_id = some_id" + Filter string `json:"filter,omitempty"` + // 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` * `session_name` Example: "update_time desc" + // "create_time" + OrderBy string `json:"orderBy,omitempty"` + // PageSize: Maximum number of results to return. If unspecified, defaults to + // 50. Max allowed value is 1000. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: A page token, received from a previous `ListSessions` call. + // Provide this to retrieve the subsequent page. + PageToken string `json:"pageToken,omitempty"` + // Parent: Required. The data store resource name. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}` + Parent string `json:"parent,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaListSessionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSessionsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaListSessionsResponse: Response for +// ListSessions method. +type GoogleCloudDiscoveryengineV1alphaListSessionsResponse struct { + // NextPageToken: Pagination token, if not returned indicates the last page. + NextPageToken string `json:"nextPageToken,omitempty"` + // Sessions: All the Sessions for a given data store. + Sessions []*GoogleCloudDiscoveryengineV1alphaSession `json:"sessions,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaListSessionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSessionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig: // Configuration for Natural Language Query Understanding. type GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig struct { @@ -14539,6 +15064,10 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySp // define data stores to filter on in a search call and configurations for // those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { + // BoostSpec: Optional. Boost specification to boost certain documents. For + // more information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -14548,13 +15077,13 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStore") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -14987,8 +15516,15 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) Marsh // GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. type GoogleCloudDiscoveryengineV1alphaSession struct { + // DisplayName: Optional. The display name of the session. This field is used + // to identify the session in the UI. By default, the display name is the first + // turn query text in the session. + DisplayName string `json:"displayName,omitempty"` // EndTime: Output only. The time the session finished. EndTime string `json:"endTime,omitempty"` + // IsPinned: Optional. Whether the session is pinned, pinned session will be + // displayed on the top of the session list. + IsPinned bool `json:"isPinned,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*` @@ -15005,13 +15541,13 @@ type GoogleCloudDiscoveryengineV1alphaSession struct { Turns []*GoogleCloudDiscoveryengineV1alphaSessionTurn `json:"turns,omitempty"` // UserPseudoId: A unique identifier for tracking users. UserPseudoId string `json:"userPseudoId,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -15415,6 +15951,33 @@ func (s GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest: Request for +// UpdateSession method. +type GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest struct { + // Session: Required. The Session to update. + Session *GoogleCloudDiscoveryengineV1alphaSession `json:"session,omitempty"` + // UpdateMask: Indicates which fields in the provided Session to update. The + // following are NOT supported: * Session.name If not set or empty, all + // supported fields are updated. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Session") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Session") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata: Metadata related // to the progress of the SiteSearchEngineService.UpdateTargetSite operation. // This will be returned by the google.longrunning.Operation.metadata field. @@ -18609,6 +19172,10 @@ func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpe // define data stores to filter on in a search call and configurations for // those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { + // BoostSpec: Optional. Boost specification to boost certain documents. For + // more information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -18618,13 +19185,13 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStore") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -25599,6 +26166,119 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsAnswerCall) Do(opts return ret, nil } +type ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. +// +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1servingconfig = googleclouddiscoveryenginev1servingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided ServingConfig to update. The following are NOT supported: * +// ServingConfig.name If not set, all supported fields are updated. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1servingconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ServingConfig.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ServingConfig, 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 := &GoogleCloudDiscoveryengineV1ServingConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsDataStoresServingConfigsRecommendCall struct { s *Service servingConfig string @@ -25974,6 +26654,115 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Pag } } +type ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1answerqueryrequest = googleclouddiscoveryenginev1answerqueryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1answerqueryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:streamAnswer") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1AnswerQueryResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1AnswerQueryResponse, 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 := &GoogleCloudDiscoveryengineV1AnswerQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { s *Service parent string @@ -26198,6 +26987,13 @@ func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -28668,9 +29464,12 @@ type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -31372,6 +32171,119 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsAnswerCall) Do(opts .. return ret, nil } +type ProjectsLocationsCollectionsEnginesServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. +// +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) Patch(name string, googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1servingconfig = googleclouddiscoveryenginev1servingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided ServingConfig to update. The following are NOT supported: * +// ServingConfig.name If not set, all supported fields are updated. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1servingconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ServingConfig.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ServingConfig, 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 := &GoogleCloudDiscoveryengineV1ServingConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsEnginesServingConfigsRecommendCall struct { s *Service servingConfig string @@ -31593,7 +32505,143 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) 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 *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1searchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1searchrequest.PageToken) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleclouddiscoveryenginev1searchrequest.PageToken = x.NextPageToken + } +} + +type ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchLite: Performs a search. Similar to the SearchService.Search method, +// but a lite version that allows API key for authentication, where OAuth and +// IAM checks are not required. Only public website search is supported by this +// method. If data stores and engines not associated with public website search +// are specified, a `FAILED_PRECONDITION` error is returned. This method can be +// used for easy onboarding without having to implement an authentication +// backend. However, it is strongly recommended to use SearchService.Search +// instead with required OAuth and IAM checks to provide better data security. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_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) SearchLite(servingConfig string, googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1searchrequest = googleclouddiscoveryenginev1searchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1searchrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:searchLite") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.searchLite" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1SearchResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1SearchResponse, 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 := &GoogleCloudDiscoveryengineV1SearchResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { c.ctx_ = ctx defer func(pt string) { c.googleclouddiscoveryenginev1searchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1searchrequest.PageToken) for { @@ -31611,71 +32659,65 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchCall) Pages(ctx } } -type ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SearchLite: Performs a search. Similar to the SearchService.Search method, -// but a lite version that allows API key for authentication, where OAuth and -// IAM checks are not required. Only public website search is supported by this -// method. If data stores and engines not associated with public website search -// are specified, a `FAILED_PRECONDITION` error is returned. This method can be -// used for easy onboarding without having to implement an authentication -// backend. However, it is strongly recommended to use SearchService.Search -// instead with required OAuth and IAM checks to provide better data security. +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. // // - servingConfig: The resource name of the Search serving config, such as // `projects/*/locations/global/collections/default_collection/engines/*/servi // ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_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) SearchLite(servingConfig string, googleclouddiscoveryenginev1searchrequest *GoogleCloudDiscoveryengineV1SearchRequest) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { - c := &ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1searchrequest = googleclouddiscoveryenginev1searchrequest + c.googleclouddiscoveryenginev1answerqueryrequest = googleclouddiscoveryenginev1answerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1searchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1answerqueryrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:searchLite") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:streamAnswer") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -31688,13 +32730,13 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) doRequ return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.searchLite" call. +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1SearchResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudDiscoveryengineV1AnswerQueryResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1SearchResponse, error) { +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1AnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31713,7 +32755,7 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1SearchResponse{ + ret := &GoogleCloudDiscoveryengineV1AnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31726,27 +32768,6 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Do(opt return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1SearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1searchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1searchrequest.PageToken) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googleclouddiscoveryenginev1searchrequest.PageToken = x.NextPageToken - } -} - type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { s *Service parent string @@ -31971,6 +32992,13 @@ func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *P return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -37648,6 +38676,119 @@ func (c *ProjectsLocationsDataStoresServingConfigsAnswerCall) Do(opts ...googlea return ret, nil } +type ProjectsLocationsDataStoresServingConfigsPatchCall struct { + s *Service + name string + googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a ServingConfig. Returns a NOT_FOUND error if the +// ServingConfig does not exist. +// +// - name: Immutable. Fully qualified name +// `projects/{project}/locations/{location}/collections/{collection_id}/engine +// s/{engine_id}/servingConfigs/{serving_config_id}`. +func (r *ProjectsLocationsDataStoresServingConfigsService) Patch(name string, googleclouddiscoveryenginev1servingconfig *GoogleCloudDiscoveryengineV1ServingConfig) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c := &ProjectsLocationsDataStoresServingConfigsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googleclouddiscoveryenginev1servingconfig = googleclouddiscoveryenginev1servingconfig + return c +} + +// UpdateMask sets the optional parameter "updateMask": Indicates which fields +// in the provided ServingConfig to update. The following are NOT supported: * +// ServingConfig.name If not set, all supported fields are updated. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1servingconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1ServingConfig.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1ServingConfig, 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 := &GoogleCloudDiscoveryengineV1ServingConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDataStoresServingConfigsRecommendCall struct { s *Service servingConfig string @@ -38023,6 +39164,115 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchLiteCall) Pages(ctx cont } } +type ProjectsLocationsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsDataStoresServingConfigsService) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1answerqueryrequest *GoogleCloudDiscoveryengineV1AnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsDataStoresServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1answerqueryrequest = googleclouddiscoveryenginev1answerqueryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1answerqueryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+servingConfig}:streamAnswer") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1AnswerQueryResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1AnswerQueryResponse, 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 := &GoogleCloudDiscoveryengineV1AnswerQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDataStoresSessionsCreateCall struct { s *Service parent string @@ -38247,6 +39497,13 @@ func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsL return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -39938,9 +41195,12 @@ type ProjectsLocationsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. func (r *ProjectsLocationsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -41133,9 +42393,12 @@ type ProjectsLocationsUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. func (r *ProjectsLocationsUserEventsService) Collect(parent string) *ProjectsLocationsUserEventsCollectCall { c := &ProjectsLocationsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index ac881c8379c..f2b363cd040 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -2391,6 +2391,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/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, + "type": "string" + } + }, + "path": "v1alpha/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -2458,6 +2486,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -3245,7 +3278,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -4271,6 +4304,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/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, + "type": "string" + } + }, + "path": "v1alpha/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -4338,6 +4399,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -6285,6 +6351,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/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, + "type": "string" + } + }, + "path": "v1alpha/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -6352,6 +6446,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -6911,7 +7010,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -7820,7 +7919,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -8057,7 +8156,7 @@ } } }, - "revision": "20241123", + "revision": "20241205", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -9825,6 +9924,353 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec": { + "description": "A specification for configuring the behavior of content search.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", + "properties": { + "chunkSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec", + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS" + }, + "extractiveContentSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec", + "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." + }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." + ], + "type": "string" + }, + "snippetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec", + "description": "If `snippetSpec` is not specified, snippets are not included in the search response." + }, + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec", + "description": "If `summarySpec` is not specified, summaries are not included in the search response." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec": { + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec", + "properties": { + "numNextChunks": { + "description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.", + "format": "int32", + "type": "integer" + }, + "numPreviousChunks": { + "description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec": { + "description": "A specification for configuring the extractive content in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec", + "properties": { + "maxExtractiveAnswerCount": { + "description": "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 five answers are returned for each SearchResult.", + "format": "int32", + "type": "integer" + }, + "maxExtractiveSegmentCount": { + "description": "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`.", + "format": "int32", + "type": "integer" + }, + "numNextSegments": { + "description": "Return at most `num_next_segments` segments after each selected segments.", + "format": "int32", + "type": "integer" + }, + "numPreviousSegments": { + "description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.", + "format": "int32", + "type": "integer" + }, + "returnExtractiveSegmentScore": { + "description": "Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec": { + "description": "A specification for configuring snippets in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec", + "properties": { + "maxSnippetCount": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count \u003e 0.", + "format": "int32", + "type": "integer" + }, + "referenceOnly": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated and will have no affect on the snippet.", + "type": "boolean" + }, + "returnSnippet": { + "description": "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.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec": { + "description": "A specification for configuring a summary returned in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec", + "properties": { + "ignoreAdversarialQuery": { + "description": "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.", + "type": "boolean" + }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, + "ignoreLowRelevantContent": { + "description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.", + "type": "boolean" + }, + "ignoreNonSummarySeekingQuery": { + "description": "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.", + "type": "boolean" + }, + "includeCitations": { + "description": "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.", + "type": "boolean" + }, + "languageCode": { + "description": "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.", + "type": "string" + }, + "modelPromptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "description": "If specified, the spec will be used to modify the prompt provided to the LLM." + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec", + "description": "If specified, the spec will be used to modify the model specification provided to the LLM." + }, + "summaryResultCount": { + "description": "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 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.", + "format": "int32", + "type": "integer" + }, + "useSemanticChunks": { + "description": "If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec": { + "description": "Specification of the prompt to use with the model.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "properties": { + "preamble": { + "description": "Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec": { + "description": "Specification of the model.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec", + "properties": { + "version": { + "description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfig": { + "description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions). The ServingConfig is passed in the search and predict request and generates results.", + "id": "GoogleCloudDiscoveryengineV1ServingConfig", + "properties": { + "boostControlIds": { + "description": "Boost controls to use in serving path. All triggered boost controls will be applied. Boost controls must be in the same data store as the serving config. Maximum of 20 boost controls.", + "items": { + "type": "string" + }, + "type": "array" + }, + "createTime": { + "description": "Output only. ServingConfig created timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The human readable serving 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.", + "type": "string" + }, + "dissociateControlIds": { + "description": "Condition do not associate specifications. If multiple do not associate conditions match, all matching do not associate controls in the list will execute. Order does not matter. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "diversityLevel": { + "description": "How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "type": "string" + }, + "filterControlIds": { + "description": "Filter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls.", + "items": { + "type": "string" + }, + "type": "array" + }, + "genericConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", + "description": "The GenericConfig of the serving configuration." + }, + "ignoreControlIds": { + "description": "Condition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. Order does not matter. Maximum number of specifications is 100.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mediaConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", + "description": "The MediaConfig of the serving configuration." + }, + "modelId": { + "description": "The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "type": "string" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "type": "string" + }, + "onewaySynonymsControlIds": { + "description": "Condition oneway synonyms specifications. If multiple oneway synonyms conditions match, all matching oneway synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "promoteControlIds": { + "description": "Condition promote specifications. Maximum number of specifications is 100.", + "items": { + "type": "string" + }, + "type": "array" + }, + "rankingExpression": { + "description": "The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined 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)`.", + "type": "string" + }, + "redirectControlIds": { + "description": "IDs of the redirect controls. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "replacementControlIds": { + "description": "Condition replacement specifications. Applied according to the order in the list. A previously replaced term can not be re-replaced. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "solutionType": { + "description": "Required. Immutable. Specifies the solution type that a serving config can be associated with.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsControlIds": { + "description": "Condition synonyms specifications. If multiple synonyms conditions match, all matching synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. ServingConfig updated timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig": { + "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", + "properties": { + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", + "description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig": { + "description": "Specifies the configurations needed for Media Discovery. Currently we support: * `demote_content_watched`: Threshold for watched content demotion. Customers can specify if using watched content demotion or use viewed detail page. Using the content watched demotion, customers need to specify the watched minutes or percentage exceeds the threshold, the content will be demoted in the recommendation result. * `promote_fresh_content`: cutoff days for fresh content promotion. Customers can specify if using content freshness promotion. If the content was published within the cutoff days, the content will be promoted in the recommendation result. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", + "properties": { + "contentFreshnessCutoffDays": { + "description": "Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.", + "format": "int32", + "type": "integer" + }, + "contentWatchedPercentageThreshold": { + "description": "Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.", + "format": "float", + "type": "number" + }, + "contentWatchedSecondsThreshold": { + "description": "Specifies the content watched minutes threshold for demotion.", + "format": "float", + "type": "number" + }, + "demoteContentWatchedPastDays": { + "description": "Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.", + "format": "int32", + "type": "integer" + }, + "demotionEventType": { + "description": "Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1SiteVerificationInfo": { "description": "Verification information for target sites in advanced site search.", "id": "GoogleCloudDiscoveryengineV1SiteVerificationInfo", @@ -10449,6 +10895,18 @@ "readOnly": true, "type": "string" }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.", + "format": "double", + "type": "number" + }, + "groundingSupports": { + "description": "Optional. Grounding supports.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport" + }, + "type": "array" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" @@ -10532,6 +10990,39 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport": { + "description": "Grounding support for a claim in `answer_text`.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport", + "properties": { + "endIndex": { + "description": "Required. End of the claim, exclusive.", + "format": "int64", + "type": "string" + }, + "groundingCheckRequired": { + "description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.", + "type": "boolean" + }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.", + "format": "double", + "type": "number" + }, + "sources": { + "description": "Optional. Citation sources for the claim.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest": { "description": "Request message for ConversationalSearchService.AnswerQuery method.", "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest", @@ -10728,6 +11219,31 @@ "description": "Max rephrase steps. The max number is 5 steps. If not set or set to \u003c 1, it will be set to 1 by default.", "format": "int32", "type": "integer" + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "description": "Optional. Query Rephraser Model specification." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec": { + "description": "Query Rephraser Model specification.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "properties": { + "modelType": { + "description": "Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.", + "enum": [ + "MODEL_TYPE_UNSPECIFIED", + "SMALL", + "LARGE" + ], + "enumDescriptions": [ + "Unspecified model type.", + "Small query rephraser model. Gemini 1.0 XS model.", + "Large query rephraser model. Gemini 1.0 Pro model." + ], + "type": "string" } }, "type": "object" @@ -10744,7 +11260,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec": { - "description": "Safety specification.", + "description": "Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.", "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec", "properties": { "enable": { @@ -12949,6 +13465,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest": { + "description": "Request for DeleteSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest", + "properties": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata", @@ -13923,6 +14450,10 @@ "type": "string" }, "type": "array" + }, + "updateFromLatestPredefinedSchema": { + "description": "Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import.", + "type": "boolean" } }, "type": "object" @@ -14125,6 +14656,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaGetSessionRequest": { + "description": "Request for GetSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaGetSessionRequest", + "properties": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "type": "boolean" + }, + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": { "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.", "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse", @@ -15011,6 +15557,34 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListSessionsRequest": { + "description": "Request for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsRequest", + "properties": { + "filter": { + "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", + "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.", + "type": "string" + }, + "parent": { + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaListSessionsResponse": { "description": "Response for ListSessions method.", "id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse", @@ -16768,6 +17342,10 @@ "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec", "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" @@ -17852,12 +18430,20 @@ "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1alphaSession", "properties": { + "displayName": { + "description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.", + "type": "string" + }, "endTime": { "description": "Output only. The time the session finished.", "format": "google-datetime", "readOnly": true, "type": "string" }, + "isPinned": { + "description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.", + "type": "boolean" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", "type": "string" @@ -18386,6 +18972,22 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest": { + "description": "Request for UpdateSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest", + "properties": { + "session": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession", + "description": "Required. The Session to update." + }, + "updateMask": { + "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata", @@ -20791,6 +21393,10 @@ "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", "id": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec", "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", + "description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 21ce63980cc..91fe69cbaf3 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -3589,6 +3589,522 @@ func (s GoogleCloudDiscoveryengineV1SearchLinkPromotion) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec: A specification +// for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec struct { + // ChunkSpec: Specifies the chunk spec to be returned from the search response. + // Only available if the SearchRequest.ContentSearchSpec.search_result_mode is + // set to CHUNKS + ChunkSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` + // ExtractiveContentSpec: If there is no extractive_content_spec provided, + // there will be no extractive answer in the search response. + ExtractiveContentSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode defaults to `DOCUMENTS`. + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` + // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in + // the search response. + SnippetSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` + // SummarySpec: If `summarySpec` is not specified, summaries are not included + // in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec: +// Specifies the chunk spec to be returned from the search response. Only +// available if the SearchRequest.ContentSearchSpec.search_result_mode is set +// to CHUNKS +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec struct { + // NumNextChunks: The number of next chunks to be returned of the current + // chunk. The maximum allowed value is 3. If not specified, no next chunks will + // be returned. + NumNextChunks int64 `json:"numNextChunks,omitempty"` + // NumPreviousChunks: The number of previous chunks to be returned of the + // current chunk. The maximum allowed value is 3. If not specified, no previous + // chunks will be returned. + NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NumNextChunks") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NumNextChunks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSp +// ec: A specification for configuring the extractive content in a search +// response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec 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 five answers + // are returned for each SearchResult. + MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,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"` + // NumNextSegments: Return at most `num_next_segments` segments after each + // selected segments. + NumNextSegments int64 `json:"numNextSegments,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"` + // ReturnExtractiveSegmentScore: Specifies whether to return the confidence + // score from the extractive segments in each search result. This feature is + // available only for new or allowlisted data stores. To allowlist your data + // store, contact your Customer Engineer. The default value is `false`. + ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec: A +// specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec 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"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxSnippetCount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec: A +// specification for configuring a summary returned in a search response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec 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"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` + // IgnoreLowRelevantContent: Specifies whether to filter out queries that have + // low relevance. The default value is `false`. If this field is set to + // `false`, all search results are used regardless of relevance to generate + // answers. If set to `true`, only queries with high relevance search results + // will generate answers. + IgnoreLowRelevantContent bool `json:"ignoreLowRelevantContent,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"` + // ModelPromptSpec: If specified, the spec will be used to modify the prompt + // provided to the LLM. + ModelPromptSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` + // ModelSpec: If specified, the spec will be used to modify the model + // specification provided to the LLM. + ModelSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,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 10 results for + // documents mode, or 50 for chunks mode, can be used to generate a summary. + // The chunks mode is used when + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + SummaryResultCount int64 `json:"summaryResultCount,omitempty"` + // UseSemanticChunks: If true, answer will be generated from most relevant + // chunks from top search results. This feature will improve summary quality. + // Note that with this feature enabled, not all top search results will be + // referenced and included in the reference list, so the citation source index + // only points to the search results listed in the reference list. + UseSemanticChunks bool `json:"useSemanticChunks,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IgnoreAdversarialQuery") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPro +// mptSpec: Specification of the prompt to use with the model. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { + // Preamble: Text at the beginning of the prompt that instructs the assistant. + // Examples are available in the user guide. + Preamble string `json:"preamble,omitempty"` + // ForceSendFields is a list of field names (e.g. "Preamble") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Preamble") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpe +// c: Specification of the model. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec struct { + // Version: The model version used to generate the summary. Supported values + // are: * `stable`: string. Default value when no value is specified. Uses a + // generally available, fine-tuned model. For more information, see Answer + // generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + // * `preview`: string. (Public preview) Uses a preview model. For more + // information, see Answer generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Version") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfig: Configures metadata that is used +// to generate serving time results (e.g. search results or recommendation +// predictions). The ServingConfig is passed in the search and predict request +// and generates results. +type GoogleCloudDiscoveryengineV1ServingConfig struct { + // BoostControlIds: Boost controls to use in serving path. All triggered boost + // controls will be applied. Boost controls must be in the same data store as + // the serving config. Maximum of 20 boost controls. + BoostControlIds []string `json:"boostControlIds,omitempty"` + // CreateTime: Output only. ServingConfig created timestamp. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Required. The human readable serving 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"` + // DissociateControlIds: Condition do not associate specifications. If multiple + // do not associate conditions match, all matching do not associate controls in + // the list will execute. Order does not matter. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + DissociateControlIds []string `json:"dissociateControlIds,omitempty"` + // DiversityLevel: How much diversity to use in recommendation model results + // e.g. `medium-diversity` or `high-diversity`. Currently supported values: * + // `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * + // `auto-diversity` If not specified, we choose default based on recommendation + // model type. Default value: `no-diversity`. Can only be set if SolutionType + // is SOLUTION_TYPE_RECOMMENDATION. + DiversityLevel string `json:"diversityLevel,omitempty"` + // FilterControlIds: Filter controls to use in serving path. All triggered + // filter controls will be applied. Filter controls must be in the same data + // store as the serving config. Maximum of 20 filter controls. + FilterControlIds []string `json:"filterControlIds,omitempty"` + // GenericConfig: The GenericConfig of the serving configuration. + GenericConfig *GoogleCloudDiscoveryengineV1ServingConfigGenericConfig `json:"genericConfig,omitempty"` + // IgnoreControlIds: Condition ignore specifications. If multiple ignore + // conditions match, all matching ignore controls in the list will execute. + // Order does not matter. Maximum number of specifications is 100. + IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` + // MediaConfig: The MediaConfig of the serving configuration. + MediaConfig *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig `json:"mediaConfig,omitempty"` + // ModelId: The id of the model to use at serving time. Currently only + // RecommendationModels are supported. Can be changed but only to a compatible + // model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required + // when SolutionType is SOLUTION_TYPE_RECOMMENDATION. + ModelId string `json:"modelId,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}/servingConfigs/{serving_config_id}` + Name string `json:"name,omitempty"` + // OnewaySynonymsControlIds: Condition oneway synonyms specifications. If + // multiple oneway synonyms conditions match, all matching oneway synonyms + // controls in the list will execute. Maximum number of specifications is 100. + // Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. + OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"` + // PromoteControlIds: Condition promote specifications. Maximum number of + // specifications is 100. + PromoteControlIds []string `json:"promoteControlIds,omitempty"` + // RankingExpression: The ranking expression controls the customized ranking on + // retrieval documents. To leverage this, document embedding is required. The + // ranking expression setting in ServingConfig applies to all search requests + // served by the serving config. However, if SearchRequest.ranking_expression + // is specified, it overrides the ServingConfig ranking expression. The ranking + // expression is a single function or multiple functions that are joined 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"` + // RedirectControlIds: IDs of the redirect controls. Only the first triggered + // redirect action is applied, even if multiple apply. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + RedirectControlIds []string `json:"redirectControlIds,omitempty"` + // ReplacementControlIds: Condition replacement specifications. Applied + // according to the order in the list. A previously replaced term can not be + // re-replaced. Maximum number of specifications is 100. Can only be set if + // SolutionType is SOLUTION_TYPE_SEARCH. + ReplacementControlIds []string `json:"replacementControlIds,omitempty"` + // SolutionType: Required. Immutable. Specifies the solution type that a + // serving config can be associated with. + // + // 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. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsControlIds: Condition synonyms specifications. If multiple synonyms + // conditions match, all matching synonyms controls in the list will execute. + // Maximum number of specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + SynonymsControlIds []string `json:"synonymsControlIds,omitempty"` + // UpdateTime: Output only. ServingConfig updated timestamp. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoostControlIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BoostControlIds") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigGenericConfig: Specifies the +// configurations needed for Generic Discovery.Currently we support: * +// `content_search_spec`: configuration for generic content search. +type GoogleCloudDiscoveryengineV1ServingConfigGenericConfig struct { + // ContentSearchSpec: Specifies the expected behavior of content search. Only + // valid for content-search enabled data store. + ContentSearchSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentSearchSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContentSearchSpec") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfigGenericConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigGenericConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigMediaConfig: Specifies the +// configurations needed for Media Discovery. Currently we support: * +// `demote_content_watched`: Threshold for watched content demotion. Customers +// can specify if using watched content demotion or use viewed detail page. +// Using the content watched demotion, customers need to specify the watched +// minutes or percentage exceeds the threshold, the content will be demoted in +// the recommendation result. * `promote_fresh_content`: cutoff days for fresh +// content promotion. Customers can specify if using content freshness +// promotion. If the content was published within the cutoff days, the content +// will be promoted in the recommendation result. Can only be set if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +type GoogleCloudDiscoveryengineV1ServingConfigMediaConfig struct { + // ContentFreshnessCutoffDays: Specifies the content freshness used for + // recommendation result. Contents will be demoted if contents were published + // for more than content freshness cutoff days. + ContentFreshnessCutoffDays int64 `json:"contentFreshnessCutoffDays,omitempty"` + // ContentWatchedPercentageThreshold: Specifies the content watched percentage + // threshold for demotion. Threshold value must be between [0, 1.0] inclusive. + ContentWatchedPercentageThreshold float64 `json:"contentWatchedPercentageThreshold,omitempty"` + // ContentWatchedSecondsThreshold: Specifies the content watched minutes + // threshold for demotion. + ContentWatchedSecondsThreshold float64 `json:"contentWatchedSecondsThreshold,omitempty"` + // DemoteContentWatchedPastDays: Optional. Specifies the number of days to look + // back for demoting watched content. If set to zero or unset, defaults to the + // maximum of 365 days. + DemoteContentWatchedPastDays int64 `json:"demoteContentWatchedPastDays,omitempty"` + // DemotionEventType: Specifies the event type used for demoting recommendation + // result. Currently supported values: * `view-item`: Item viewed. * + // `media-play`: Start/resume watching a video, playing a song, etc. * + // `media-complete`: Finished or stopped midway through a video, song, etc. If + // unset, watch history demotion will not be applied. Content freshness + // demotion will still be applied. + DemotionEventType string `json:"demotionEventType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentFreshnessCutoffDays") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContentFreshnessCutoffDays") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + var s1 struct { + ContentWatchedPercentageThreshold gensupport.JSONFloat64 `json:"contentWatchedPercentageThreshold"` + ContentWatchedSecondsThreshold gensupport.JSONFloat64 `json:"contentWatchedSecondsThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ContentWatchedPercentageThreshold = float64(s1.ContentWatchedPercentageThreshold) + s.ContentWatchedSecondsThreshold = float64(s1.ContentWatchedSecondsThreshold) + return nil +} + // GoogleCloudDiscoveryengineV1SiteVerificationInfo: Verification information // for target sites in advanced site search. type GoogleCloudDiscoveryengineV1SiteVerificationInfo struct { @@ -4379,6 +4895,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { CompleteTime string `json:"completeTime,omitempty"` // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded the + // answer is by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // GroundingSupports: Optional. Grounding supports. + GroundingSupports []*GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport `json:"groundingSupports,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*/answers/*` @@ -4420,6 +4941,20 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1alphaAnswer) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswer + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerCitation: Citation info for a // segment. type GoogleCloudDiscoveryengineV1alphaAnswerCitation struct { @@ -4470,6 +5005,57 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerCitationSource) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport: Grounding support +// for a claim in `answer_text`. +type GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport struct { + // EndIndex: Required. End of the claim, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // GroundingCheckRequired: Indicates that this claim required grounding check. + // When the system decided this claim didn't require attribution/grounding + // check, this field is set to false. In that case, no grounding check was done + // for the claim and therefore `grounding_score`, `sources` is not returned. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded is a + // specific claim by the references. Higher value means that the claim is + // better supported by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // Sources: Optional. Citation sources for the claim. + Sources []*GoogleCloudDiscoveryengineV1alphaAnswerCitationSource `json:"sources,omitempty"` + // StartIndex: Required. Index indicates the start of the claim, measured in + // bytes (UTF-8 unicode). + StartIndex int64 `json:"startIndex,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndIndex") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest: Request message for // ConversationalSearchService.AnswerQuery method. type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest struct { @@ -4747,6 +5333,8 @@ type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQu // MaxRephraseSteps: Max rephrase steps. The max number is 5 steps. If not set // or set to < 1, it will be set to 1 by default. MaxRephraseSteps int64 `json:"maxRephraseSteps,omitempty"` + // ModelSpec: Optional. Query Rephraser Model specification. + ModelSpec *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec `json:"modelSpec,omitempty"` // ForceSendFields is a list of field names (e.g. "Disable") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -4765,6 +5353,35 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpe return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQuer +// yRephraserSpecModelSpec: Query Rephraser Model specification. +type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec struct { + // ModelType: Optional. Enabled query rephraser model type. If not set, it will + // use LARGE by default. + // + // Possible values: + // "MODEL_TYPE_UNSPECIFIED" - Unspecified model type. + // "SMALL" - Small query rephraser model. Gemini 1.0 XS model. + // "LARGE" - Large query rephraser model. Gemini 1.0 Pro model. + ModelType string `json:"modelType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ModelType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ModelType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec: // Related questions specification. type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec struct { @@ -4789,7 +5406,10 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestRelatedQuestionsSpec) } // GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec: Safety -// specification. +// specification. There are two use cases: 1. when only safety_spec.enable is +// set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. +// 2. when safety_spec.enable is set and some safety_settings are set, only +// specified safety_settings are applied. type GoogleCloudDiscoveryengineV1alphaAnswerQueryRequestSafetySpec struct { // Enable: Enable the safety filtering on the answer response. It is false by // default. @@ -7832,6 +8452,31 @@ func (s GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest: Request for +// DeleteSession method. +type GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest struct { + // Name: Required. The resource name of the Session to delete. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata: Metadata related to // the progress of the SiteSearchEngineService.DeleteSitemap operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -9245,6 +9890,13 @@ type GoogleCloudDiscoveryengineV1alphaFhirStoreSource struct { // (https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). // Default to all supported FHIR resource types if empty. ResourceTypes []string `json:"resourceTypes,omitempty"` + // UpdateFromLatestPredefinedSchema: Optional. Whether to update the DataStore + // schema to the latest predefined schema. If true, the DataStore schema will + // be updated to include any FHIR fields or resource types that have been added + // since the last import and corresponding FHIR resources will be imported from + // the FHIR store. Note this field cannot be used in conjunction with + // `resource_types`. It should be used after initial import. + UpdateFromLatestPredefinedSchema bool `json:"updateFromLatestPredefinedSchema,omitempty"` // ForceSendFields is a list of field names (e.g. "FhirStore") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -9514,6 +10166,34 @@ func (s GoogleCloudDiscoveryengineV1alphaGcsSource) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaGetSessionRequest: Request for GetSession +// method. +type GoogleCloudDiscoveryengineV1alphaGetSessionRequest struct { + // IncludeAnswerDetails: Optional. If set to true, the full session including + // all answer details will be returned. + IncludeAnswerDetails bool `json:"includeAnswerDetails,omitempty"` + // Name: Required. The resource name of the Session to get. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "IncludeAnswerDetails") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IncludeAnswerDetails") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaGetSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGetSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse: Response // message for SiteSearchEngineService.GetUriPatternDocumentData method. type GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse struct { @@ -10812,6 +11492,45 @@ func (s GoogleCloudDiscoveryengineV1alphaListServingConfigsResponse) MarshalJSON return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListSessionsRequest: Request for +// ListSessions method. +type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { + // Filter: A filter to apply on the list results. The supported features are: + // user_pseudo_id, state. Example: "user_pseudo_id = some_id" + Filter string `json:"filter,omitempty"` + // 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` * `session_name` Example: "update_time desc" + // "create_time" + OrderBy string `json:"orderBy,omitempty"` + // PageSize: Maximum number of results to return. If unspecified, defaults to + // 50. Max allowed value is 1000. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: A page token, received from a previous `ListSessions` call. + // Provide this to retrieve the subsequent page. + PageToken string `json:"pageToken,omitempty"` + // Parent: Required. The data store resource name. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}` + Parent string `json:"parent,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaListSessionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSessionsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaListSessionsResponse: Response for // ListSessions method. type GoogleCloudDiscoveryengineV1alphaListSessionsResponse struct { @@ -13476,6 +14195,10 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySp // define data stores to filter on in a search call and configurations for // those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { + // BoostSpec: Optional. Boost specification to boost certain documents. For + // more information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -13485,13 +14208,13 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStore") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -15025,8 +15748,15 @@ func (s *GoogleCloudDiscoveryengineV1alphaServingConfigMediaConfig) UnmarshalJSO // GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. type GoogleCloudDiscoveryengineV1alphaSession struct { + // DisplayName: Optional. The display name of the session. This field is used + // to identify the session in the UI. By default, the display name is the first + // turn query text in the session. + DisplayName string `json:"displayName,omitempty"` // EndTime: Output only. The time the session finished. EndTime string `json:"endTime,omitempty"` + // IsPinned: Optional. Whether the session is pinned, pinned session will be + // displayed on the top of the session list. + IsPinned bool `json:"isPinned,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*` @@ -15046,13 +15776,13 @@ type GoogleCloudDiscoveryengineV1alphaSession struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -15760,6 +16490,33 @@ func (s GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest: Request for +// UpdateSession method. +type GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest struct { + // Session: Required. The Session to update. + Session *GoogleCloudDiscoveryengineV1alphaSession `json:"session,omitempty"` + // UpdateMask: Indicates which fields in the provided Session to update. The + // following are NOT supported: * Session.name If not set or empty, all + // supported fields are updated. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Session") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Session") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata: Metadata related // to the progress of the SiteSearchEngineService.UpdateTargetSite operation. // This will be returned by the google.longrunning.Operation.metadata field. @@ -19122,6 +19879,10 @@ func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpe // define data stores to filter on in a search call and configurations for // those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { + // BoostSpec: Optional. Boost specification to boost certain documents. For + // more information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -19131,13 +19892,13 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStore") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -28602,7 +29363,143 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { +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) + 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 ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchLite: Performs a search. Similar to the SearchService.Search method, +// but a lite version that allows API key for authentication, where OAuth and +// IAM checks are not required. Only public website search is supported by this +// method. If data stores and engines not associated with public website search +// are specified, a `FAILED_PRECONDITION` error is returned. This method can be +// used for easy onboarding without having to implement an authentication +// backend. However, it is strongly recommended to use SearchService.Search +// instead with required OAuth and IAM checks to provide better data security. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_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) SearchLite(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall{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 +// details. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:searchLite") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.searchLite" call. +// 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, 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 := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { c.ctx_ = ctx defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) for { @@ -28620,71 +29517,65 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(c } } -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SearchLite: Performs a search. Similar to the SearchService.Search method, -// but a lite version that allows API key for authentication, where OAuth and -// IAM checks are not required. Only public website search is supported by this -// method. If data stores and engines not associated with public website search -// are specified, a `FAILED_PRECONDITION` error is returned. This method can be -// used for easy onboarding without having to implement an authentication -// backend. However, it is strongly recommended to use SearchService.Search -// instead with required OAuth and IAM checks to provide better data security. +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. // // - servingConfig: The resource name of the Search serving config, such as // `projects/*/locations/global/collections/default_collection/engines/*/servi // ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_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) SearchLite(servingConfig string, googleclouddiscoveryenginev1alphasearchrequest *GoogleCloudDiscoveryengineV1alphaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1alphasearchrequest = googleclouddiscoveryenginev1alphasearchrequest + c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphasearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaanswerqueryrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:searchLite") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:streamAnswer") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -28697,13 +29588,13 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.searchLite" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer" call. // 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 +// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaSearchResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28722,7 +29613,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1alphaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28735,27 +29626,6 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do( return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1alphaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1alphasearchrequest.PageToken) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googleclouddiscoveryenginev1alphasearchrequest.PageToken = x.NextPageToken - } -} - type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { s *Service parent string @@ -28980,6 +29850,13 @@ func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -31868,9 +32745,12 @@ type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -35740,6 +36620,115 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Pages( } } +type ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaanswerqueryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:streamAnswer") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, 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 := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { s *Service parent string @@ -35964,6 +36953,13 @@ func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *P return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -43138,6 +44134,115 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchLiteCall) Pages(ctx cont } } +type ProjectsLocationsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsDataStoresServingConfigsService) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1alphaanswerqueryrequest *GoogleCloudDiscoveryengineV1alphaAnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsDataStoresServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1alphaanswerqueryrequest = googleclouddiscoveryenginev1alphaanswerqueryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1alphaanswerqueryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1alpha/{+servingConfig}:streamAnswer") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse, 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 := &GoogleCloudDiscoveryengineV1alphaAnswerQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDataStoresSessionsCreateCall struct { s *Service parent string @@ -43362,6 +44467,13 @@ func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsL return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -45375,9 +46487,12 @@ type ProjectsLocationsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. func (r *ProjectsLocationsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -48718,9 +49833,12 @@ type ProjectsLocationsUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. func (r *ProjectsLocationsUserEventsService) Collect(parent string) *ProjectsLocationsUserEventsCollectCall { c := &ProjectsLocationsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index a437a6601c2..8258b95e126 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -1929,6 +1929,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/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, + "type": "string" + } + }, + "path": "v1beta/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1996,6 +2024,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -2730,7 +2763,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+$", "required": true, @@ -3756,6 +3789,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}/engines/{enginesId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/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, + "type": "string" + } + }, + "path": "v1beta/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -3823,6 +3884,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -5589,6 +5655,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamAnswer": { + "description": "Answer query method (streaming). It takes one AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a stream.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/dataStores/{dataStoresId}/servingConfigs/{servingConfigsId}:streamAnswer", + "httpMethod": "POST", + "id": "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer", + "parameterOrder": [ + "servingConfig" + ], + "parameters": { + "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/*/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, + "type": "string" + } + }, + "path": "v1beta/{+servingConfig}:streamAnswer", + "request": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest" + }, + "response": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -5656,6 +5750,11 @@ "name" ], "parameters": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "location": "query", + "type": "boolean" + }, "name": { "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", "location": "path", @@ -6215,7 +6314,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+/dataStores/[^/]+$", "required": true, @@ -7092,7 +7191,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent DataStore resource name, such as `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`.", + "description": "Required. The parent resource name. If the collect user event action is applied in DataStore level, the format is: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}`. If the collect user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: `projects/{project}/locations/{location}`.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -7255,7 +7354,7 @@ } } }, - "revision": "20241123", + "revision": "20241205", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -8927,97 +9026,444 @@ "format": "int64", "type": "string" }, - "purgeSample": { - "description": "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": { + "description": "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.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata": { + "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", + "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata", + "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" + }, + "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse": { + "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", + "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse", + "properties": { + "errorSamples": { + "description": "A sample of errors encountered while processing the request.", + "items": { + "$ref": "GoogleRpcStatus" + }, + "type": "array" + }, + "purgeCount": { + "description": "Number of suggestion deny list entries purged.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1Schema": { + "description": "Defines the structure and layout of a type of document data.", + "id": "GoogleCloudDiscoveryengineV1Schema", + "properties": { + "jsonSchema": { + "description": "The JSON representation of the schema.", + "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.", + "type": "string" + }, + "structSchema": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "The structured representation of the schema.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchLinkPromotion": { + "description": "Promotion proto includes uri and other helping information to display the promotion.", + "id": "GoogleCloudDiscoveryengineV1SearchLinkPromotion", + "properties": { + "description": { + "description": "Optional. The Promotion description. Maximum length: 200 characters.", + "type": "string" + }, + "enabled": { + "description": "Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only.", + "type": "boolean" + }, + "imageUri": { + "description": "Optional. The promotion thumbnail image url.", + "type": "string" + }, + "title": { + "description": "Required. The title of the promotion. Maximum length: 160 characters.", + "type": "string" + }, + "uri": { + "description": "Required. The URL for the page the user wants to promote.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec": { + "description": "A specification for configuring the behavior of content search.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", + "properties": { + "chunkSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec", + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS" + }, + "extractiveContentSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec", + "description": "If there is no extractive_content_spec provided, there will be no extractive answer in the search response." + }, + "searchResultMode": { + "description": "Specifies the search result mode. If unspecified, the search result mode defaults to `DOCUMENTS`.", + "enum": [ + "SEARCH_RESULT_MODE_UNSPECIFIED", + "DOCUMENTS", + "CHUNKS" + ], + "enumDescriptions": [ + "Default value.", + "Returns documents in the search result.", + "Returns chunks in the search result. Only available if the DocumentProcessingConfig.chunking_config is specified." + ], + "type": "string" + }, + "snippetSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec", + "description": "If `snippetSpec` is not specified, snippets are not included in the search response." + }, + "summarySpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec", + "description": "If `summarySpec` is not specified, summaries are not included in the search response." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec": { + "description": "Specifies the chunk spec to be returned from the search response. Only available if the SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec", + "properties": { + "numNextChunks": { + "description": "The number of next chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no next chunks will be returned.", + "format": "int32", + "type": "integer" + }, + "numPreviousChunks": { + "description": "The number of previous chunks to be returned of the current chunk. The maximum allowed value is 3. If not specified, no previous chunks will be returned.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec": { + "description": "A specification for configuring the extractive content in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec", + "properties": { + "maxExtractiveAnswerCount": { + "description": "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 five answers are returned for each SearchResult.", + "format": "int32", + "type": "integer" + }, + "maxExtractiveSegmentCount": { + "description": "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`.", + "format": "int32", + "type": "integer" + }, + "numNextSegments": { + "description": "Return at most `num_next_segments` segments after each selected segments.", + "format": "int32", + "type": "integer" + }, + "numPreviousSegments": { + "description": "Specifies whether to also include the adjacent from each selected segments. Return at most `num_previous_segments` segments before each selected segments.", + "format": "int32", + "type": "integer" + }, + "returnExtractiveSegmentScore": { + "description": "Specifies whether to return the confidence score from the extractive segments in each search result. This feature is available only for new or allowlisted data stores. To allowlist your data store, contact your Customer Engineer. The default value is `false`.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec": { + "description": "A specification for configuring snippets in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec", + "properties": { + "maxSnippetCount": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated. To control snippet return, use `return_snippet` field. For backwards compatibility, we will return snippet if max_snippet_count \u003e 0.", + "format": "int32", + "type": "integer" + }, + "referenceOnly": { + "deprecated": true, + "description": "[DEPRECATED] This field is deprecated and will have no affect on the snippet.", + "type": "boolean" + }, + "returnSnippet": { + "description": "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.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec": { + "description": "A specification for configuring a summary returned in a search response.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec", + "properties": { + "ignoreAdversarialQuery": { + "description": "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.", + "type": "boolean" + }, + "ignoreJailBreakingQuery": { + "description": "Optional. Specifies whether to filter out jail-breaking queries. The default value is `false`. Google employs search-query classification to detect jail-breaking queries. No summary is returned if the search query is classified as a jail-breaking query. A user might add instructions to the query to change the tone, style, language, content of the answer, or ask the model to act as a different entity, e.g. \"Reply in the tone of a competing company's CEO\". If this field is set to `true`, we skip generating summaries for jail-breaking queries and return fallback messages instead.", + "type": "boolean" + }, + "ignoreLowRelevantContent": { + "description": "Specifies whether to filter out queries that have low relevance. The default value is `false`. If this field is set to `false`, all search results are used regardless of relevance to generate answers. If set to `true`, only queries with high relevance search results will generate answers.", + "type": "boolean" + }, + "ignoreNonSummarySeekingQuery": { + "description": "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.", + "type": "boolean" + }, + "includeCitations": { + "description": "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.", + "type": "boolean" + }, + "languageCode": { + "description": "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.", + "type": "string" + }, + "modelPromptSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "description": "If specified, the spec will be used to modify the prompt provided to the LLM." + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec", + "description": "If specified, the spec will be used to modify the model specification provided to the LLM." + }, + "summaryResultCount": { + "description": "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 10 results for documents mode, or 50 for chunks mode, can be used to generate a summary. The chunks mode is used when SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS.", + "format": "int32", + "type": "integer" + }, + "useSemanticChunks": { + "description": "If true, answer will be generated from most relevant chunks from top search results. This feature will improve summary quality. Note that with this feature enabled, not all top search results will be referenced and included in the reference list, so the citation source index only points to the search results listed in the reference list.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec": { + "description": "Specification of the prompt to use with the model.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec", + "properties": { + "preamble": { + "description": "Text at the beginning of the prompt that instructs the assistant. Examples are available in the user guide.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec": { + "description": "Specification of the model.", + "id": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec", + "properties": { + "version": { + "description": "The model version used to generate the summary. Supported values are: * `stable`: string. Default value when no value is specified. Uses a generally available, fine-tuned model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). * `preview`: string. (Public preview) Uses a preview model. For more information, see [Answer generation model versions and lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1ServingConfig": { + "description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions). The ServingConfig is passed in the search and predict request and generates results.", + "id": "GoogleCloudDiscoveryengineV1ServingConfig", + "properties": { + "boostControlIds": { + "description": "Boost controls to use in serving path. All triggered boost controls will be applied. Boost controls must be in the same data store as the serving config. Maximum of 20 boost controls.", + "items": { + "type": "string" + }, + "type": "array" + }, + "createTime": { + "description": "Output only. ServingConfig created timestamp.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "displayName": { + "description": "Required. The human readable serving 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.", + "type": "string" + }, + "dissociateControlIds": { + "description": "Condition do not associate specifications. If multiple do not associate conditions match, all matching do not associate controls in the list will execute. Order does not matter. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "diversityLevel": { + "description": "How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "type": "string" + }, + "filterControlIds": { + "description": "Filter controls to use in serving path. All triggered filter controls will be applied. Filter controls must be in the same data store as the serving config. Maximum of 20 filter controls.", + "items": { + "type": "string" + }, + "type": "array" + }, + "genericConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", + "description": "The GenericConfig of the serving configuration." + }, + "ignoreControlIds": { + "description": "Condition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. Order does not matter. Maximum number of specifications is 100.", + "items": { + "type": "string" + }, + "type": "array" + }, + "mediaConfig": { + "$ref": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", + "description": "The MediaConfig of the serving configuration." + }, + "modelId": { + "description": "The id of the model to use at serving time. Currently only RecommendationModels are supported. Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "type": "string" + }, + "name": { + "description": "Immutable. Fully qualified name `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`", + "type": "string" + }, + "onewaySynonymsControlIds": { + "description": "Condition oneway synonyms specifications. If multiple oneway synonyms conditions match, all matching oneway synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "promoteControlIds": { + "description": "Condition promote specifications. Maximum number of specifications is 100.", + "items": { + "type": "string" + }, + "type": "array" + }, + "rankingExpression": { + "description": "The ranking expression controls the customized ranking on retrieval documents. To leverage this, document embedding is required. The ranking expression setting in ServingConfig applies to all search requests served by the serving config. However, if SearchRequest.ranking_expression is specified, it overrides the ServingConfig ranking expression. The ranking expression is a single function or multiple functions that are joined 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)`.", + "type": "string" + }, + "redirectControlIds": { + "description": "IDs of the redirect controls. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "replacementControlIds": { + "description": "Condition replacement specifications. Applied according to the order in the list. A previously replaced term can not be re-replaced. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", + "items": { + "type": "string" + }, + "type": "array" + }, + "solutionType": { + "description": "Required. Immutable. Specifies the solution type that a serving config can be associated with.", + "enum": [ + "SOLUTION_TYPE_UNSPECIFIED", + "SOLUTION_TYPE_RECOMMENDATION", + "SOLUTION_TYPE_SEARCH", + "SOLUTION_TYPE_CHAT", + "SOLUTION_TYPE_GENERATIVE_CHAT" + ], + "enumDescriptions": [ + "Default value.", + "Used for Recommendations AI.", + "Used for Discovery Search.", + "Used for use cases related to the Generative AI agent.", + "Used for use cases related to the Generative Chat agent. It's used for Generative chat engine only, the associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution." + ], + "type": "string" + }, + "synonymsControlIds": { + "description": "Condition synonyms specifications. If multiple synonyms conditions match, all matching synonyms controls in the list will execute. Maximum number of specifications is 100. Can only be set if SolutionType is SOLUTION_TYPE_SEARCH.", "items": { "type": "string" }, "type": "array" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata": { - "description": "Metadata related to the progress of the PurgeSuggestionDenyListEntries operation. This is returned by the google.longrunning.Operation.metadata field.", - "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesMetadata", - "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.", + "description": "Output only. ServingConfig updated timestamp.", "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse": { - "description": "Response message for CompletionService.PurgeSuggestionDenyListEntries method.", - "id": "GoogleCloudDiscoveryengineV1PurgeSuggestionDenyListEntriesResponse", - "properties": { - "errorSamples": { - "description": "A sample of errors encountered while processing the request.", - "items": { - "$ref": "GoogleRpcStatus" - }, - "type": "array" - }, - "purgeCount": { - "description": "Number of suggestion deny list entries purged.", - "format": "int64", - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudDiscoveryengineV1Schema": { - "description": "Defines the structure and layout of a type of document data.", - "id": "GoogleCloudDiscoveryengineV1Schema", + "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig": { + "description": "Specifies the configurations needed for Generic Discovery.Currently we support: * `content_search_spec`: configuration for generic content search.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigGenericConfig", "properties": { - "jsonSchema": { - "description": "The JSON representation of the schema.", - "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.", - "type": "string" - }, - "structSchema": { - "additionalProperties": { - "description": "Properties of the object.", - "type": "any" - }, - "description": "The structured representation of the schema.", - "type": "object" + "contentSearchSpec": { + "$ref": "GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec", + "description": "Specifies the expected behavior of content search. Only valid for content-search enabled data store." } }, "type": "object" }, - "GoogleCloudDiscoveryengineV1SearchLinkPromotion": { - "description": "Promotion proto includes uri and other helping information to display the promotion.", - "id": "GoogleCloudDiscoveryengineV1SearchLinkPromotion", + "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig": { + "description": "Specifies the configurations needed for Media Discovery. Currently we support: * `demote_content_watched`: Threshold for watched content demotion. Customers can specify if using watched content demotion or use viewed detail page. Using the content watched demotion, customers need to specify the watched minutes or percentage exceeds the threshold, the content will be demoted in the recommendation result. * `promote_fresh_content`: cutoff days for fresh content promotion. Customers can specify if using content freshness promotion. If the content was published within the cutoff days, the content will be promoted in the recommendation result. Can only be set if SolutionType is SOLUTION_TYPE_RECOMMENDATION.", + "id": "GoogleCloudDiscoveryengineV1ServingConfigMediaConfig", "properties": { - "description": { - "description": "Optional. The Promotion description. Maximum length: 200 characters.", - "type": "string" + "contentFreshnessCutoffDays": { + "description": "Specifies the content freshness used for recommendation result. Contents will be demoted if contents were published for more than content freshness cutoff days.", + "format": "int32", + "type": "integer" }, - "enabled": { - "description": "Optional. The enabled promotion will be returned for any serving configs associated with the parent of the control this promotion is attached to. This flag is used for basic site search only.", - "type": "boolean" + "contentWatchedPercentageThreshold": { + "description": "Specifies the content watched percentage threshold for demotion. Threshold value must be between [0, 1.0] inclusive.", + "format": "float", + "type": "number" }, - "imageUri": { - "description": "Optional. The promotion thumbnail image url.", - "type": "string" + "contentWatchedSecondsThreshold": { + "description": "Specifies the content watched minutes threshold for demotion.", + "format": "float", + "type": "number" }, - "title": { - "description": "Required. The title of the promotion. Maximum length: 160 characters.", - "type": "string" + "demoteContentWatchedPastDays": { + "description": "Optional. Specifies the number of days to look back for demoting watched content. If set to zero or unset, defaults to the maximum of 365 days.", + "format": "int32", + "type": "integer" }, - "uri": { - "description": "Required. The URL for the page the user wants to promote.", + "demotionEventType": { + "description": "Specifies the event type used for demoting recommendation result. Currently supported values: * `view-item`: Item viewed. * `media-play`: Start/resume watching a video, playing a song, etc. * `media-complete`: Finished or stopped midway through a video, song, etc. If unset, watch history demotion will not be applied. Content freshness demotion will still be applied.", "type": "string" } }, @@ -9386,6 +9832,18 @@ "readOnly": true, "type": "string" }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.", + "format": "double", + "type": "number" + }, + "groundingSupports": { + "description": "Optional. Grounding supports.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport" + }, + "type": "array" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" @@ -9469,6 +9927,39 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport": { + "description": "Grounding support for a claim in `answer_text`.", + "id": "GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport", + "properties": { + "endIndex": { + "description": "Required. End of the claim, exclusive.", + "format": "int64", + "type": "string" + }, + "groundingCheckRequired": { + "description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.", + "type": "boolean" + }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.", + "format": "double", + "type": "number" + }, + "sources": { + "description": "Optional. Citation sources for the claim.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaAnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo": { "description": "Query understanding information.", "id": "GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo", @@ -10539,6 +11030,17 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest": { + "description": "Request for DeleteSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest", + "properties": { + "name": { + "description": "Required. The resource name of the Session to delete. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.DeleteSitemap operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata", @@ -11326,6 +11828,21 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaGetSessionRequest": { + "description": "Request for GetSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaGetSessionRequest", + "properties": { + "includeAnswerDetails": { + "description": "Optional. If set to true, the full session including all answer details will be returned.", + "type": "boolean" + }, + "name": { + "description": "Required. The resource name of the Session to get. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse": { "description": "Response message for SiteSearchEngineService.GetUriPatternDocumentData method.", "id": "GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse", @@ -11699,6 +12216,52 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaListSessionsRequest": { + "description": "Request for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsRequest", + "properties": { + "filter": { + "description": "A filter to apply on the list results. The supported features are: user_pseudo_id, state. Example: \"user_pseudo_id = some_id\"", + "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "type": "string" + }, + "pageSize": { + "description": "Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", + "format": "int32", + "type": "integer" + }, + "pageToken": { + "description": "A page token, received from a previous `ListSessions` call. Provide this to retrieve the subsequent page.", + "type": "string" + }, + "parent": { + "description": "Required. The data store resource name. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store_id}`", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1alphaListSessionsResponse": { + "description": "Response for ListSessions method.", + "id": "GoogleCloudDiscoveryengineV1alphaListSessionsResponse", + "properties": { + "nextPageToken": { + "description": "Pagination token, if not returned indicates the last page.", + "type": "string" + }, + "sessions": { + "description": "All the Sessions for a given data store.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig": { "description": "Configuration for Natural Language Query Understanding.", "id": "GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig", @@ -12704,6 +13267,10 @@ "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", "id": "GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec", "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec", + "description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" @@ -12969,12 +13536,20 @@ "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1alphaSession", "properties": { + "displayName": { + "description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.", + "type": "string" + }, "endTime": { "description": "Output only. The time the session finished.", "format": "google-datetime", "readOnly": true, "type": "string" }, + "isPinned": { + "description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.", + "type": "boolean" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", "type": "string" @@ -13308,6 +13883,22 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest": { + "description": "Request for UpdateSession method.", + "id": "GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest", + "properties": { + "session": { + "$ref": "GoogleCloudDiscoveryengineV1alphaSession", + "description": "Required. The Session to update." + }, + "updateMask": { + "description": "Indicates which fields in the provided Session to update. The following are NOT supported: * Session.name If not set or empty, all supported fields are updated.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata": { "description": "Metadata related to the progress of the SiteSearchEngineService.UpdateTargetSite operation. This will be returned by the google.longrunning.Operation.metadata field.", "id": "GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata", @@ -13708,6 +14299,18 @@ "readOnly": true, "type": "string" }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded the answer is by the reference chunks.", + "format": "double", + "type": "number" + }, + "groundingSupports": { + "description": "Optional. Grounding supports.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport" + }, + "type": "array" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*/answers/*`", "type": "string" @@ -13791,6 +14394,39 @@ }, "type": "object" }, + "GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport": { + "description": "Grounding support for a claim in `answer_text`.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport", + "properties": { + "endIndex": { + "description": "Required. End of the claim, exclusive.", + "format": "int64", + "type": "string" + }, + "groundingCheckRequired": { + "description": "Indicates that this claim required grounding check. When the system decided this claim didn't require attribution/grounding check, this field is set to false. In that case, no grounding check was done for the claim and therefore `grounding_score`, `sources` is not returned.", + "type": "boolean" + }, + "groundingScore": { + "description": "A score in the range of [0, 1] describing how grounded is a specific claim by the references. Higher value means that the claim is better supported by the reference chunks.", + "format": "double", + "type": "number" + }, + "sources": { + "description": "Optional. Citation sources for the claim.", + "items": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerCitationSource" + }, + "type": "array" + }, + "startIndex": { + "description": "Required. Index indicates the start of the claim, measured in bytes (UTF-8 unicode).", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest": { "description": "Request message for ConversationalSearchService.AnswerQuery method.", "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequest", @@ -13987,6 +14623,31 @@ "description": "Max rephrase steps. The max number is 5 steps. If not set or set to \u003c 1, it will be set to 1 by default.", "format": "int32", "type": "integer" + }, + "modelSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "description": "Optional. Query Rephraser Model specification." + } + }, + "type": "object" + }, + "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec": { + "description": "Query Rephraser Model specification.", + "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec", + "properties": { + "modelType": { + "description": "Optional. Enabled query rephraser model type. If not set, it will use LARGE by default.", + "enum": [ + "MODEL_TYPE_UNSPECIFIED", + "SMALL", + "LARGE" + ], + "enumDescriptions": [ + "Unspecified model type.", + "Small query rephraser model. Gemini 1.0 XS model.", + "Large query rephraser model. Gemini 1.0 Pro model." + ], + "type": "string" } }, "type": "object" @@ -14003,7 +14664,7 @@ "type": "object" }, "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec": { - "description": "Safety specification.", + "description": "Safety specification. There are two use cases: 1. when only safety_spec.enable is set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. 2. when safety_spec.enable is set and some safety_settings are set, only specified safety_settings are applied.", "id": "GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec", "properties": { "enable": { @@ -16809,6 +17470,10 @@ "type": "string" }, "type": "array" + }, + "updateFromLatestPredefinedSchema": { + "description": "Optional. Whether to update the DataStore schema to the latest predefined schema. If true, the DataStore schema will be updated to include any FHIR fields or resource types that have been added since the last import and corresponding FHIR resources will be imported from the FHIR store. Note this field cannot be used in conjunction with `resource_types`. It should be used after initial import.", + "type": "boolean" } }, "type": "object" @@ -18939,6 +19604,10 @@ "description": "A struct to define data stores to filter on in a search call and configurations for those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned.", "id": "GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec", "properties": { + "boostSpec": { + "$ref": "GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec", + "description": "Optional. Boost specification to boost certain documents. For more information on boosting, see [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)" + }, "dataStore": { "description": "Required. Full resource name of DataStore, such as `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.", "type": "string" @@ -20015,12 +20684,20 @@ "description": "External session proto definition.", "id": "GoogleCloudDiscoveryengineV1betaSession", "properties": { + "displayName": { + "description": "Optional. The display name of the session. This field is used to identify the session in the UI. By default, the display name is the first turn query text in the session.", + "type": "string" + }, "endTime": { "description": "Output only. The time the session finished.", "format": "google-datetime", "readOnly": true, "type": "string" }, + "isPinned": { + "description": "Optional. Whether the session is pinned, pinned session will be displayed on the top of the session list.", + "type": "boolean" + }, "name": { "description": "Immutable. Fully qualified name `projects/{project}/locations/global/collections/{collection}/engines/{engine}/sessions/*`", "type": "string" diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 7deb7a4adce..9f263cac975 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -3517,6 +3517,522 @@ func (s GoogleCloudDiscoveryengineV1SearchLinkPromotion) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec: A specification +// for configuring the behavior of content search. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec struct { + // ChunkSpec: Specifies the chunk spec to be returned from the search response. + // Only available if the SearchRequest.ContentSearchSpec.search_result_mode is + // set to CHUNKS + ChunkSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec `json:"chunkSpec,omitempty"` + // ExtractiveContentSpec: If there is no extractive_content_spec provided, + // there will be no extractive answer in the search response. + ExtractiveContentSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec `json:"extractiveContentSpec,omitempty"` + // SearchResultMode: Specifies the search result mode. If unspecified, the + // search result mode defaults to `DOCUMENTS`. + // + // Possible values: + // "SEARCH_RESULT_MODE_UNSPECIFIED" - Default value. + // "DOCUMENTS" - Returns documents in the search result. + // "CHUNKS" - Returns chunks in the search result. Only available if the + // DocumentProcessingConfig.chunking_config is specified. + SearchResultMode string `json:"searchResultMode,omitempty"` + // SnippetSpec: If `snippetSpec` is not specified, snippets are not included in + // the search response. + SnippetSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec `json:"snippetSpec,omitempty"` + // SummarySpec: If `summarySpec` is not specified, summaries are not included + // in the search response. + SummarySpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec `json:"summarySpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ChunkSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ChunkSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec: +// Specifies the chunk spec to be returned from the search response. Only +// available if the SearchRequest.ContentSearchSpec.search_result_mode is set +// to CHUNKS +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec struct { + // NumNextChunks: The number of next chunks to be returned of the current + // chunk. The maximum allowed value is 3. If not specified, no next chunks will + // be returned. + NumNextChunks int64 `json:"numNextChunks,omitempty"` + // NumPreviousChunks: The number of previous chunks to be returned of the + // current chunk. The maximum allowed value is 3. If not specified, no previous + // chunks will be returned. + NumPreviousChunks int64 `json:"numPreviousChunks,omitempty"` + // ForceSendFields is a list of field names (e.g. "NumNextChunks") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NumNextChunks") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecChunkSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSp +// ec: A specification for configuring the extractive content in a search +// response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec 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 five answers + // are returned for each SearchResult. + MaxExtractiveAnswerCount int64 `json:"maxExtractiveAnswerCount,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"` + // NumNextSegments: Return at most `num_next_segments` segments after each + // selected segments. + NumNextSegments int64 `json:"numNextSegments,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"` + // ReturnExtractiveSegmentScore: Specifies whether to return the confidence + // score from the extractive segments in each search result. This feature is + // available only for new or allowlisted data stores. To allowlist your data + // store, contact your Customer Engineer. The default value is `false`. + ReturnExtractiveSegmentScore bool `json:"returnExtractiveSegmentScore,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxExtractiveAnswerCount") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecExtractiveContentSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec: A +// specification for configuring snippets in a search response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec 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"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxSnippetCount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSnippetSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec: A +// specification for configuring a summary returned in a search response. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec 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"` + // IgnoreJailBreakingQuery: Optional. Specifies whether to filter out + // jail-breaking queries. The default value is `false`. Google employs + // search-query classification to detect jail-breaking queries. No summary is + // returned if the search query is classified as a jail-breaking query. A user + // might add instructions to the query to change the tone, style, language, + // content of the answer, or ask the model to act as a different entity, e.g. + // "Reply in the tone of a competing company's CEO". If this field is set to + // `true`, we skip generating summaries for jail-breaking queries and return + // fallback messages instead. + IgnoreJailBreakingQuery bool `json:"ignoreJailBreakingQuery,omitempty"` + // IgnoreLowRelevantContent: Specifies whether to filter out queries that have + // low relevance. The default value is `false`. If this field is set to + // `false`, all search results are used regardless of relevance to generate + // answers. If set to `true`, only queries with high relevance search results + // will generate answers. + IgnoreLowRelevantContent bool `json:"ignoreLowRelevantContent,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"` + // ModelPromptSpec: If specified, the spec will be used to modify the prompt + // provided to the LLM. + ModelPromptSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec `json:"modelPromptSpec,omitempty"` + // ModelSpec: If specified, the spec will be used to modify the model + // specification provided to the LLM. + ModelSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec `json:"modelSpec,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 10 results for + // documents mode, or 50 for chunks mode, can be used to generate a summary. + // The chunks mode is used when + // SearchRequest.ContentSearchSpec.search_result_mode is set to CHUNKS. + SummaryResultCount int64 `json:"summaryResultCount,omitempty"` + // UseSemanticChunks: If true, answer will be generated from most relevant + // chunks from top search results. This feature will improve summary quality. + // Note that with this feature enabled, not all top search results will be + // referenced and included in the reference list, so the citation source index + // only points to the search results listed in the reference list. + UseSemanticChunks bool `json:"useSemanticChunks,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IgnoreAdversarialQuery") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPro +// mptSpec: Specification of the prompt to use with the model. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec struct { + // Preamble: Text at the beginning of the prompt that instructs the assistant. + // Examples are available in the user guide. + Preamble string `json:"preamble,omitempty"` + // ForceSendFields is a list of field names (e.g. "Preamble") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Preamble") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelPromptSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpe +// c: Specification of the model. +type GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec struct { + // Version: The model version used to generate the summary. Supported values + // are: * `stable`: string. Default value when no value is specified. Uses a + // generally available, fine-tuned model. For more information, see Answer + // generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + // * `preview`: string. (Public preview) Uses a preview model. For more + // information, see Answer generation model versions and lifecycle + // (https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models). + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "Version") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Version") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpecSummarySpecModelSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfig: Configures metadata that is used +// to generate serving time results (e.g. search results or recommendation +// predictions). The ServingConfig is passed in the search and predict request +// and generates results. +type GoogleCloudDiscoveryengineV1ServingConfig struct { + // BoostControlIds: Boost controls to use in serving path. All triggered boost + // controls will be applied. Boost controls must be in the same data store as + // the serving config. Maximum of 20 boost controls. + BoostControlIds []string `json:"boostControlIds,omitempty"` + // CreateTime: Output only. ServingConfig created timestamp. + CreateTime string `json:"createTime,omitempty"` + // DisplayName: Required. The human readable serving 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"` + // DissociateControlIds: Condition do not associate specifications. If multiple + // do not associate conditions match, all matching do not associate controls in + // the list will execute. Order does not matter. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + DissociateControlIds []string `json:"dissociateControlIds,omitempty"` + // DiversityLevel: How much diversity to use in recommendation model results + // e.g. `medium-diversity` or `high-diversity`. Currently supported values: * + // `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * + // `auto-diversity` If not specified, we choose default based on recommendation + // model type. Default value: `no-diversity`. Can only be set if SolutionType + // is SOLUTION_TYPE_RECOMMENDATION. + DiversityLevel string `json:"diversityLevel,omitempty"` + // FilterControlIds: Filter controls to use in serving path. All triggered + // filter controls will be applied. Filter controls must be in the same data + // store as the serving config. Maximum of 20 filter controls. + FilterControlIds []string `json:"filterControlIds,omitempty"` + // GenericConfig: The GenericConfig of the serving configuration. + GenericConfig *GoogleCloudDiscoveryengineV1ServingConfigGenericConfig `json:"genericConfig,omitempty"` + // IgnoreControlIds: Condition ignore specifications. If multiple ignore + // conditions match, all matching ignore controls in the list will execute. + // Order does not matter. Maximum number of specifications is 100. + IgnoreControlIds []string `json:"ignoreControlIds,omitempty"` + // MediaConfig: The MediaConfig of the serving configuration. + MediaConfig *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig `json:"mediaConfig,omitempty"` + // ModelId: The id of the model to use at serving time. Currently only + // RecommendationModels are supported. Can be changed but only to a compatible + // model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required + // when SolutionType is SOLUTION_TYPE_RECOMMENDATION. + ModelId string `json:"modelId,omitempty"` + // Name: Immutable. Fully qualified name + // `projects/{project}/locations/{location}/collections/{collection_id}/engines/ + // {engine_id}/servingConfigs/{serving_config_id}` + Name string `json:"name,omitempty"` + // OnewaySynonymsControlIds: Condition oneway synonyms specifications. If + // multiple oneway synonyms conditions match, all matching oneway synonyms + // controls in the list will execute. Maximum number of specifications is 100. + // Can only be set if SolutionType is SOLUTION_TYPE_SEARCH. + OnewaySynonymsControlIds []string `json:"onewaySynonymsControlIds,omitempty"` + // PromoteControlIds: Condition promote specifications. Maximum number of + // specifications is 100. + PromoteControlIds []string `json:"promoteControlIds,omitempty"` + // RankingExpression: The ranking expression controls the customized ranking on + // retrieval documents. To leverage this, document embedding is required. The + // ranking expression setting in ServingConfig applies to all search requests + // served by the serving config. However, if SearchRequest.ranking_expression + // is specified, it overrides the ServingConfig ranking expression. The ranking + // expression is a single function or multiple functions that are joined 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"` + // RedirectControlIds: IDs of the redirect controls. Only the first triggered + // redirect action is applied, even if multiple apply. Maximum number of + // specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + RedirectControlIds []string `json:"redirectControlIds,omitempty"` + // ReplacementControlIds: Condition replacement specifications. Applied + // according to the order in the list. A previously replaced term can not be + // re-replaced. Maximum number of specifications is 100. Can only be set if + // SolutionType is SOLUTION_TYPE_SEARCH. + ReplacementControlIds []string `json:"replacementControlIds,omitempty"` + // SolutionType: Required. Immutable. Specifies the solution type that a + // serving config can be associated with. + // + // 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. + // "SOLUTION_TYPE_GENERATIVE_CHAT" - Used for use cases related to the + // Generative Chat agent. It's used for Generative chat engine only, the + // associated data stores must enrolled with `SOLUTION_TYPE_CHAT` solution. + SolutionType string `json:"solutionType,omitempty"` + // SynonymsControlIds: Condition synonyms specifications. If multiple synonyms + // conditions match, all matching synonyms controls in the list will execute. + // Maximum number of specifications is 100. Can only be set if SolutionType is + // SOLUTION_TYPE_SEARCH. + SynonymsControlIds []string `json:"synonymsControlIds,omitempty"` + // UpdateTime: Output only. ServingConfig updated timestamp. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "BoostControlIds") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BoostControlIds") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigGenericConfig: Specifies the +// configurations needed for Generic Discovery.Currently we support: * +// `content_search_spec`: configuration for generic content search. +type GoogleCloudDiscoveryengineV1ServingConfigGenericConfig struct { + // ContentSearchSpec: Specifies the expected behavior of content search. Only + // valid for content-search enabled data store. + ContentSearchSpec *GoogleCloudDiscoveryengineV1SearchRequestContentSearchSpec `json:"contentSearchSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentSearchSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContentSearchSpec") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfigGenericConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigGenericConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1ServingConfigMediaConfig: Specifies the +// configurations needed for Media Discovery. Currently we support: * +// `demote_content_watched`: Threshold for watched content demotion. Customers +// can specify if using watched content demotion or use viewed detail page. +// Using the content watched demotion, customers need to specify the watched +// minutes or percentage exceeds the threshold, the content will be demoted in +// the recommendation result. * `promote_fresh_content`: cutoff days for fresh +// content promotion. Customers can specify if using content freshness +// promotion. If the content was published within the cutoff days, the content +// will be promoted in the recommendation result. Can only be set if +// SolutionType is SOLUTION_TYPE_RECOMMENDATION. +type GoogleCloudDiscoveryengineV1ServingConfigMediaConfig struct { + // ContentFreshnessCutoffDays: Specifies the content freshness used for + // recommendation result. Contents will be demoted if contents were published + // for more than content freshness cutoff days. + ContentFreshnessCutoffDays int64 `json:"contentFreshnessCutoffDays,omitempty"` + // ContentWatchedPercentageThreshold: Specifies the content watched percentage + // threshold for demotion. Threshold value must be between [0, 1.0] inclusive. + ContentWatchedPercentageThreshold float64 `json:"contentWatchedPercentageThreshold,omitempty"` + // ContentWatchedSecondsThreshold: Specifies the content watched minutes + // threshold for demotion. + ContentWatchedSecondsThreshold float64 `json:"contentWatchedSecondsThreshold,omitempty"` + // DemoteContentWatchedPastDays: Optional. Specifies the number of days to look + // back for demoting watched content. If set to zero or unset, defaults to the + // maximum of 365 days. + DemoteContentWatchedPastDays int64 `json:"demoteContentWatchedPastDays,omitempty"` + // DemotionEventType: Specifies the event type used for demoting recommendation + // result. Currently supported values: * `view-item`: Item viewed. * + // `media-play`: Start/resume watching a video, playing a song, etc. * + // `media-complete`: Finished or stopped midway through a video, song, etc. If + // unset, watch history demotion will not be applied. Content freshness + // demotion will still be applied. + DemotionEventType string `json:"demotionEventType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ContentFreshnessCutoffDays") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContentFreshnessCutoffDays") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1ServingConfigMediaConfig) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1ServingConfigMediaConfig + var s1 struct { + ContentWatchedPercentageThreshold gensupport.JSONFloat64 `json:"contentWatchedPercentageThreshold"` + ContentWatchedSecondsThreshold gensupport.JSONFloat64 `json:"contentWatchedSecondsThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ContentWatchedPercentageThreshold = float64(s1.ContentWatchedPercentageThreshold) + s.ContentWatchedSecondsThreshold = float64(s1.ContentWatchedSecondsThreshold) + return nil +} + // GoogleCloudDiscoveryengineV1SiteVerificationInfo: Verification information // for target sites in advanced site search. type GoogleCloudDiscoveryengineV1SiteVerificationInfo struct { @@ -3947,6 +4463,11 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { CompleteTime string `json:"completeTime,omitempty"` // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded the + // answer is by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // GroundingSupports: Optional. Grounding supports. + GroundingSupports []*GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport `json:"groundingSupports,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*/answers/*` @@ -3985,6 +4506,20 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1alphaAnswer) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswer + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerCitation: Citation info for a // segment. type GoogleCloudDiscoveryengineV1alphaAnswerCitation struct { @@ -4035,6 +4570,57 @@ func (s GoogleCloudDiscoveryengineV1alphaAnswerCitationSource) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport: Grounding support +// for a claim in `answer_text`. +type GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport struct { + // EndIndex: Required. End of the claim, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // GroundingCheckRequired: Indicates that this claim required grounding check. + // When the system decided this claim didn't require attribution/grounding + // check, this field is set to false. In that case, no grounding check was done + // for the claim and therefore `grounding_score`, `sources` is not returned. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded is a + // specific claim by the references. Higher value means that the claim is + // better supported by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // Sources: Optional. Citation sources for the claim. + Sources []*GoogleCloudDiscoveryengineV1alphaAnswerCitationSource `json:"sources,omitempty"` + // StartIndex: Required. Index indicates the start of the claim, measured in + // bytes (UTF-8 unicode). + StartIndex int64 `json:"startIndex,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndIndex") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1alphaAnswerGroundingSupport + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo: Query // understanding information. type GoogleCloudDiscoveryengineV1alphaAnswerQueryUnderstandingInfo struct { @@ -5447,6 +6033,31 @@ func (s GoogleCloudDiscoveryengineV1alphaDeleteSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest: Request for +// DeleteSession method. +type GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest struct { + // Name: Required. The resource name of the Session to delete. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaDeleteSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaDeleteSitemapMetadata: Metadata related to // the progress of the SiteSearchEngineService.DeleteSitemap operation. This // will be returned by the google.longrunning.Operation.metadata field. @@ -6515,6 +7126,34 @@ func (s GoogleCloudDiscoveryengineV1alphaFieldConfig) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaGetSessionRequest: Request for GetSession +// method. +type GoogleCloudDiscoveryengineV1alphaGetSessionRequest struct { + // IncludeAnswerDetails: Optional. If set to true, the full session including + // all answer details will be returned. + IncludeAnswerDetails bool `json:"includeAnswerDetails,omitempty"` + // Name: Required. The resource name of the Session to get. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}/sessions/{session_id}` + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "IncludeAnswerDetails") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IncludeAnswerDetails") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaGetSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaGetSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse: Response // message for SiteSearchEngineService.GetUriPatternDocumentData method. type GoogleCloudDiscoveryengineV1alphaGetUriPatternDocumentDataResponse struct { @@ -7023,6 +7662,70 @@ func (s GoogleCloudDiscoveryengineV1alphaListCustomModelsResponse) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaListSessionsRequest: Request for +// ListSessions method. +type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { + // Filter: A filter to apply on the list results. The supported features are: + // user_pseudo_id, state. Example: "user_pseudo_id = some_id" + Filter string `json:"filter,omitempty"` + // 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` * `session_name` Example: "update_time desc" + // "create_time" + OrderBy string `json:"orderBy,omitempty"` + // PageSize: Maximum number of results to return. If unspecified, defaults to + // 50. Max allowed value is 1000. + PageSize int64 `json:"pageSize,omitempty"` + // PageToken: A page token, received from a previous `ListSessions` call. + // Provide this to retrieve the subsequent page. + PageToken string `json:"pageToken,omitempty"` + // Parent: Required. The data store resource name. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {data_store_id}` + Parent string `json:"parent,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Filter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaListSessionsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSessionsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudDiscoveryengineV1alphaListSessionsResponse: Response for +// ListSessions method. +type GoogleCloudDiscoveryengineV1alphaListSessionsResponse struct { + // NextPageToken: Pagination token, if not returned indicates the last page. + NextPageToken string `json:"nextPageToken,omitempty"` + // Sessions: All the Sessions for a given data store. + Sessions []*GoogleCloudDiscoveryengineV1alphaSession `json:"sessions,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaListSessionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaListSessionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig: // Configuration for Natural Language Query Understanding. type GoogleCloudDiscoveryengineV1alphaNaturalLanguageQueryUnderstandingConfig struct { @@ -8492,6 +9195,10 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestContentSearchSpecSummarySp // define data stores to filter on in a search call and configurations for // those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { + // BoostSpec: Optional. Boost specification to boost certain documents. For + // more information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1alphaSearchRequestBoostSpec `json:"boostSpec,omitempty"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -8501,13 +9208,13 @@ type GoogleCloudDiscoveryengineV1alphaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStore") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -8940,8 +9647,15 @@ func (s GoogleCloudDiscoveryengineV1alphaSearchRequestSpellCorrectionSpec) Marsh // GoogleCloudDiscoveryengineV1alphaSession: External session proto definition. type GoogleCloudDiscoveryengineV1alphaSession struct { + // DisplayName: Optional. The display name of the session. This field is used + // to identify the session in the UI. By default, the display name is the first + // turn query text in the session. + DisplayName string `json:"displayName,omitempty"` // EndTime: Output only. The time the session finished. EndTime string `json:"endTime,omitempty"` + // IsPinned: Optional. Whether the session is pinned, pinned session will be + // displayed on the top of the session list. + IsPinned bool `json:"isPinned,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*` @@ -8958,13 +9672,13 @@ type GoogleCloudDiscoveryengineV1alphaSession struct { Turns []*GoogleCloudDiscoveryengineV1alphaSessionTurn `json:"turns,omitempty"` // UserPseudoId: A unique identifier for tracking users. UserPseudoId string `json:"userPseudoId,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -9368,6 +10082,33 @@ func (s GoogleCloudDiscoveryengineV1alphaUpdateSchemaMetadata) MarshalJSON() ([] return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest: Request for +// UpdateSession method. +type GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest struct { + // Session: Required. The Session to update. + Session *GoogleCloudDiscoveryengineV1alphaSession `json:"session,omitempty"` + // UpdateMask: Indicates which fields in the provided Session to update. The + // following are NOT supported: * Session.name If not set or empty, all + // supported fields are updated. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Session") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Session") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1alphaUpdateSessionRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1alphaUpdateTargetSiteMetadata: Metadata related // to the progress of the SiteSearchEngineService.UpdateTargetSite operation. // This will be returned by the google.longrunning.Operation.metadata field. @@ -9874,6 +10615,11 @@ type GoogleCloudDiscoveryengineV1betaAnswer struct { CompleteTime string `json:"completeTime,omitempty"` // CreateTime: Output only. Answer creation timestamp. CreateTime string `json:"createTime,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded the + // answer is by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // GroundingSupports: Optional. Grounding supports. + GroundingSupports []*GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport `json:"groundingSupports,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*/answers/*` @@ -9915,6 +10661,20 @@ func (s GoogleCloudDiscoveryengineV1betaAnswer) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +func (s *GoogleCloudDiscoveryengineV1betaAnswer) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswer + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1betaAnswerCitation: Citation info for a segment. type GoogleCloudDiscoveryengineV1betaAnswerCitation struct { // EndIndex: End of the attributed segment, exclusive. @@ -9964,6 +10724,57 @@ func (s GoogleCloudDiscoveryengineV1betaAnswerCitationSource) MarshalJSON() ([]b return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport: Grounding support +// for a claim in `answer_text`. +type GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport struct { + // EndIndex: Required. End of the claim, exclusive. + EndIndex int64 `json:"endIndex,omitempty,string"` + // GroundingCheckRequired: Indicates that this claim required grounding check. + // When the system decided this claim didn't require attribution/grounding + // check, this field is set to false. In that case, no grounding check was done + // for the claim and therefore `grounding_score`, `sources` is not returned. + GroundingCheckRequired bool `json:"groundingCheckRequired,omitempty"` + // GroundingScore: A score in the range of [0, 1] describing how grounded is a + // specific claim by the references. Higher value means that the claim is + // better supported by the reference chunks. + GroundingScore float64 `json:"groundingScore,omitempty"` + // Sources: Optional. Citation sources for the claim. + Sources []*GoogleCloudDiscoveryengineV1betaAnswerCitationSource `json:"sources,omitempty"` + // StartIndex: Required. Index indicates the start of the claim, measured in + // bytes (UTF-8 unicode). + StartIndex int64 `json:"startIndex,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "EndIndex") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndIndex") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerGroundingSupport + var s1 struct { + GroundingScore gensupport.JSONFloat64 `json:"groundingScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.GroundingScore = float64(s1.GroundingScore) + return nil +} + // GoogleCloudDiscoveryengineV1betaAnswerQueryRequest: Request message for // ConversationalSearchService.AnswerQuery method. type GoogleCloudDiscoveryengineV1betaAnswerQueryRequest struct { @@ -10241,6 +11052,8 @@ type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQue // MaxRephraseSteps: Max rephrase steps. The max number is 5 steps. If not set // or set to < 1, it will be set to 1 by default. MaxRephraseSteps int64 `json:"maxRephraseSteps,omitempty"` + // ModelSpec: Optional. Query Rephraser Model specification. + ModelSpec *GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec `json:"modelSpec,omitempty"` // ForceSendFields is a list of field names (e.g. "Disable") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -10259,6 +11072,35 @@ func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQuery +// RephraserSpecModelSpec: Query Rephraser Model specification. +type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec struct { + // ModelType: Optional. Enabled query rephraser model type. If not set, it will + // use LARGE by default. + // + // Possible values: + // "MODEL_TYPE_UNSPECIFIED" - Unspecified model type. + // "SMALL" - Small query rephraser model. Gemini 1.0 XS model. + // "LARGE" - Large query rephraser model. Gemini 1.0 Pro model. + ModelType string `json:"modelType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ModelType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ModelType") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudDiscoveryengineV1betaAnswerQueryRequestQueryUnderstandingSpecQueryRephraserSpecModelSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec: // Related questions specification. type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec struct { @@ -10283,7 +11125,10 @@ func (s GoogleCloudDiscoveryengineV1betaAnswerQueryRequestRelatedQuestionsSpec) } // GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec: Safety -// specification. +// specification. There are two use cases: 1. when only safety_spec.enable is +// set, the BLOCK_LOW_AND_ABOVE threshold will be applied for all categories. +// 2. when safety_spec.enable is set and some safety_settings are set, only +// specified safety_settings are applied. type GoogleCloudDiscoveryengineV1betaAnswerQueryRequestSafetySpec struct { // Enable: Enable the safety filtering on the answer response. It is false by // default. @@ -14145,6 +14990,13 @@ type GoogleCloudDiscoveryengineV1betaFhirStoreSource struct { // (https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification). // Default to all supported FHIR resource types if empty. ResourceTypes []string `json:"resourceTypes,omitempty"` + // UpdateFromLatestPredefinedSchema: Optional. Whether to update the DataStore + // schema to the latest predefined schema. If true, the DataStore schema will + // be updated to include any FHIR fields or resource types that have been added + // since the last import and corresponding FHIR resources will be imported from + // the FHIR store. Note this field cannot be used in conjunction with + // `resource_types`. It should be used after initial import. + UpdateFromLatestPredefinedSchema bool `json:"updateFromLatestPredefinedSchema,omitempty"` // ForceSendFields is a list of field names (e.g. "FhirStore") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -17426,6 +18278,10 @@ func (s GoogleCloudDiscoveryengineV1betaSearchRequestContentSearchSpecSummarySpe // define data stores to filter on in a search call and configurations for // those data stores. Otherwise, an `INVALID_ARGUMENT` error is returned. type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { + // BoostSpec: Optional. Boost specification to boost certain documents. For + // more information on boosting, see Boosting + // (https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results) + BoostSpec *GoogleCloudDiscoveryengineV1betaSearchRequestBoostSpec `json:"boostSpec,omitempty"` // DataStore: Required. Full resource name of DataStore, such as // `projects/{project}/locations/{location}/collections/{collection_id}/dataStor // es/{data_store_id}`. @@ -17435,13 +18291,13 @@ type GoogleCloudDiscoveryengineV1betaSearchRequestDataStoreSpec struct { // Filtering // (https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) Filter string `json:"filter,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataStore") to + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataStore") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -18969,8 +19825,15 @@ func (s *GoogleCloudDiscoveryengineV1betaServingConfigMediaConfig) UnmarshalJSON // GoogleCloudDiscoveryengineV1betaSession: External session proto definition. type GoogleCloudDiscoveryengineV1betaSession struct { + // DisplayName: Optional. The display name of the session. This field is used + // to identify the session in the UI. By default, the display name is the first + // turn query text in the session. + DisplayName string `json:"displayName,omitempty"` // EndTime: Output only. The time the session finished. EndTime string `json:"endTime,omitempty"` + // IsPinned: Optional. Whether the session is pinned, pinned session will be + // displayed on the top of the session list. + IsPinned bool `json:"isPinned,omitempty"` // Name: Immutable. Fully qualified name // `projects/{project}/locations/global/collections/{collection}/engines/{engine // }/sessions/*` @@ -18990,13 +19853,13 @@ type GoogleCloudDiscoveryengineV1betaSession struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API + // 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. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. @@ -26721,7 +27584,143 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) 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 *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { + c.ctx_ = ctx + defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken + } +} + +type ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchLite: Performs a search. Similar to the SearchService.Search method, +// but a lite version that allows API key for authentication, where OAuth and +// IAM checks are not required. Only public website search is supported by this +// method. If data stores and engines not associated with public website search +// are specified, a `FAILED_PRECONDITION` error is returned. This method can be +// used for easy onboarding without having to implement an authentication +// backend. However, it is strongly recommended to use SearchService.Search +// instead with required OAuth and IAM checks to provide better data security. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/defa +// ult_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) SearchLite(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:searchLite") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.searchLite" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, 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 := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { c.ctx_ = ctx defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) for { @@ -26739,71 +27738,65 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchCall) Pages(c } } -type ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall struct { - s *Service - servingConfig string - googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SearchLite: Performs a search. Similar to the SearchService.Search method, -// but a lite version that allows API key for authentication, where OAuth and -// IAM checks are not required. Only public website search is supported by this -// method. If data stores and engines not associated with public website search -// are specified, a `FAILED_PRECONDITION` error is returned. This method can be -// used for easy onboarding without having to implement an authentication -// backend. However, it is strongly recommended to use SearchService.Search -// instead with required OAuth and IAM checks to provide better data security. +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. // // - servingConfig: The resource name of the Search serving config, such as // `projects/*/locations/global/collections/default_collection/engines/*/servi // ngConfigs/default_serving_config`, or -// `projects/*/locations/global/collections/default_collection/dataStores/defa -// ult_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) SearchLite(servingConfig string, googleclouddiscoveryenginev1betasearchrequest *GoogleCloudDiscoveryengineV1betaSearchRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { - c := &ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsDataStoresServingConfigsService) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.servingConfig = servingConfig - c.googleclouddiscoveryenginev1betasearchrequest = googleclouddiscoveryenginev1betasearchrequest + c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Header() http.Header { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betasearchrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaanswerqueryrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:searchLite") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:streamAnswer") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -26816,13 +27809,13 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.searchLite" call. +// Do executes the "discoveryengine.projects.locations.collections.dataStores.servingConfigs.streamAnswer" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudDiscoveryengineV1betaSearchResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaSearchResponse, error) { +func (c *ProjectsLocationsCollectionsDataStoresServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26841,7 +27834,7 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudDiscoveryengineV1betaSearchResponse{ + ret := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26854,27 +27847,6 @@ func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Do( return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCollectionsDataStoresServingConfigsSearchLiteCall) Pages(ctx context.Context, f func(*GoogleCloudDiscoveryengineV1betaSearchResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { c.googleclouddiscoveryenginev1betasearchrequest.PageToken = pt }(c.googleclouddiscoveryenginev1betasearchrequest.PageToken) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googleclouddiscoveryenginev1betasearchrequest.PageToken = x.NextPageToken - } -} - type ProjectsLocationsCollectionsDataStoresSessionsCreateCall struct { s *Service parent string @@ -27099,6 +28071,13 @@ func (r *ProjectsLocationsCollectionsDataStoresSessionsService) Get(name string) return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -29773,9 +30752,12 @@ type ProjectsLocationsCollectionsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. func (r *ProjectsLocationsCollectionsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsCollectionsDataStoresUserEventsCollectCall { c := &ProjectsLocationsCollectionsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -33645,6 +34627,115 @@ func (c *ProjectsLocationsCollectionsEnginesServingConfigsSearchLiteCall) Pages( } } +type ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsCollectionsEnginesServingConfigsService) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c := &ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaanswerqueryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:streamAnswer") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.collections.engines.servingConfigs.streamAnswer" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCollectionsEnginesServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, 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 := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsCollectionsEnginesSessionsCreateCall struct { s *Service parent string @@ -33869,6 +34960,13 @@ func (r *ProjectsLocationsCollectionsEnginesSessionsService) Get(name string) *P return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsCollectionsEnginesSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsCollectionsEnginesSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -40401,6 +41499,115 @@ func (c *ProjectsLocationsDataStoresServingConfigsSearchLiteCall) Pages(ctx cont } } +type ProjectsLocationsDataStoresServingConfigsStreamAnswerCall struct { + s *Service + servingConfig string + googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamAnswer: Answer query method (streaming). It takes one +// AnswerQueryRequest and returns multiple AnswerQueryResponse messages in a +// stream. +// +// - servingConfig: The resource name of the Search serving config, such as +// `projects/*/locations/global/collections/default_collection/engines/*/servi +// ngConfigs/default_serving_config`, or +// `projects/*/locations/global/collections/default_collection/dataStores/*/se +// rvingConfigs/default_serving_config`. This field is used to identify the +// serving configuration name, set of models used to make the search. +func (r *ProjectsLocationsDataStoresServingConfigsService) StreamAnswer(servingConfig string, googleclouddiscoveryenginev1betaanswerqueryrequest *GoogleCloudDiscoveryengineV1betaAnswerQueryRequest) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c := &ProjectsLocationsDataStoresServingConfigsStreamAnswerCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.servingConfig = servingConfig + c.googleclouddiscoveryenginev1betaanswerqueryrequest = googleclouddiscoveryenginev1betaanswerqueryrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Context(ctx context.Context) *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleclouddiscoveryenginev1betaanswerqueryrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/{+servingConfig}:streamAnswer") + 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{ + "servingConfig": c.servingConfig, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "discoveryengine.projects.locations.dataStores.servingConfigs.streamAnswer" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudDiscoveryengineV1betaAnswerQueryResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataStoresServingConfigsStreamAnswerCall) Do(opts ...googleapi.CallOption) (*GoogleCloudDiscoveryengineV1betaAnswerQueryResponse, 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 := &GoogleCloudDiscoveryengineV1betaAnswerQueryResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsDataStoresSessionsCreateCall struct { s *Service parent string @@ -40625,6 +41832,13 @@ func (r *ProjectsLocationsDataStoresSessionsService) Get(name string) *ProjectsL return c } +// IncludeAnswerDetails sets the optional parameter "includeAnswerDetails": If +// set to true, the full session including all answer details will be returned. +func (c *ProjectsLocationsDataStoresSessionsGetCall) IncludeAnswerDetails(includeAnswerDetails bool) *ProjectsLocationsDataStoresSessionsGetCall { + c.urlParams_.Set("includeAnswerDetails", fmt.Sprint(includeAnswerDetails)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. @@ -42636,9 +43850,12 @@ type ProjectsLocationsDataStoresUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. func (r *ProjectsLocationsDataStoresUserEventsService) Collect(parent string) *ProjectsLocationsDataStoresUserEventsCollectCall { c := &ProjectsLocationsDataStoresUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent @@ -45878,9 +47095,12 @@ type ProjectsLocationsUserEventsCollectCall struct { // 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 +// - parent: The parent resource name. If the collect user event action is +// applied in DataStore level, the format is: // `projects/{project}/locations/{location}/collections/{collection}/dataStore -// s/{data_store}`. +// s/{data_store}`. If the collect user event action is applied in Location +// level, for example, the event with Document across multiple DataStore, the +// format is: `projects/{project}/locations/{location}`. func (r *ProjectsLocationsUserEventsService) Collect(parent string) *ProjectsLocationsUserEventsCollectCall { c := &ProjectsLocationsUserEventsCollectCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/displayvideo/v2/displayvideo-api.json b/displayvideo/v2/displayvideo-api.json index 1a0b489547a..1ace7acfb2a 100644 --- a/displayvideo/v2/displayvideo-api.json +++ b/displayvideo/v2/displayvideo-api.json @@ -6322,7 +6322,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `5000`. If unspecified, this value defaults to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -9267,7 +9267,7 @@ } } }, - "revision": "20241114", + "revision": "20241205", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActivateManualTriggerRequest": { @@ -14114,6 +14114,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -14200,6 +14201,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -14311,6 +14313,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -14397,6 +14400,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -14509,6 +14513,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -14595,6 +14600,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -14708,6 +14714,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -14794,6 +14801,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "readOnly": true, @@ -15758,6 +15766,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -15844,6 +15853,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -16673,6 +16683,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -16759,6 +16770,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" diff --git a/displayvideo/v2/displayvideo-gen.go b/displayvideo/v2/displayvideo-gen.go index 9ec44d3bd89..cc5d34eb0bc 100644 --- a/displayvideo/v2/displayvideo-gen.go +++ b/displayvideo/v2/displayvideo-gen.go @@ -6834,6 +6834,7 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -6968,6 +6969,7 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GoogleAdManagerAgencyId: Output only. Agency ID of Google Ad Manager. The @@ -7086,6 +7088,7 @@ type ExchangeReviewStatus struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // Status: Status of the exchange review. @@ -7207,6 +7210,7 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -8241,6 +8245,7 @@ type GuaranteedOrder struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Output only. The unique identifier of the guaranteed @@ -9027,6 +9032,7 @@ type InventorySource struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Immutable. The ID of the guaranteed order that this @@ -29523,8 +29529,8 @@ func (c *FirstAndThirdPartyAudiencesListCall) OrderBy(orderBy string) *FirstAndT } // PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `200`. If unspecified will default to `100`. Returns -// error code `INVALID_ARGUMENT` if an invalid value is specified. +// be between `1` and `5000`. If unspecified, this value defaults to `100`. +// Returns error code `INVALID_ARGUMENT` if an invalid value is specified. func (c *FirstAndThirdPartyAudiencesListCall) PageSize(pageSize int64) *FirstAndThirdPartyAudiencesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c diff --git a/displayvideo/v3/displayvideo-api.json b/displayvideo/v3/displayvideo-api.json index a0282f27785..98a596b82db 100644 --- a/displayvideo/v3/displayvideo-api.json +++ b/displayvideo/v3/displayvideo-api.json @@ -6271,7 +6271,7 @@ "type": "string" }, "pageSize": { - "description": "Requested page size. Must be between `1` and `200`. If unspecified will default to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", + "description": "Requested page size. Must be between `1` and `5000`. If unspecified, this value defaults to `100`. Returns error code `INVALID_ARGUMENT` if an invalid value is specified.", "format": "int32", "location": "query", "type": "integer" @@ -9222,7 +9222,7 @@ } } }, - "revision": "20241114", + "revision": "20241205", "rootUrl": "https://displayvideo.googleapis.com/", "schemas": { "ActiveViewVideoViewabilityMetricConfig": { @@ -10321,6 +10321,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -10407,6 +10408,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -10566,10 +10568,10 @@ "enumDescriptions": [ "Unknown operator.", "Values are equal.", - "First value is greater than the comparison value.", - "First value is less than the second.", - "First value is greater than or equal to the second.", - "First value is less or equals to the comparison value." + "Signal value is greater than the comparison value.", + "Signal value is less than the second.", + "Signal value is greater than or equal to the second.", + "Signal value is less or equals to the comparison value." ], "type": "string" }, @@ -15103,6 +15105,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -15189,6 +15192,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -15300,6 +15304,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -15386,6 +15391,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -15498,6 +15504,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -15584,6 +15591,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -15697,6 +15705,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -15783,6 +15792,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "readOnly": true, @@ -16747,6 +16757,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -16833,6 +16844,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" @@ -17676,6 +17688,7 @@ "EXCHANGE_ADMOST_GBID", "EXCHANGE_TOPON_GBID", "EXCHANGE_NETFLIX", + "EXCHANGE_CORE", "EXCHANGE_TUBI" ], "enumDescriptions": [ @@ -17762,6 +17775,7 @@ "AdMost.", "TopOn.", "Netflix.", + "Core.", "Tubi." ], "type": "string" diff --git a/displayvideo/v3/displayvideo-gen.go b/displayvideo/v3/displayvideo-gen.go index db1141f3463..a0f344163d1 100644 --- a/displayvideo/v3/displayvideo-gen.go +++ b/displayvideo/v3/displayvideo-gen.go @@ -1871,6 +1871,7 @@ type AlgorithmRulesComparisonValue struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. ExchangeValue string `json:"exchangeValue,omitempty"` // Int64Value: Integer value. @@ -2083,11 +2084,11 @@ type AlgorithmRulesSignalComparison struct { // Possible values: // "COMPARISON_OPERATOR_UNSPECIFIED" - Unknown operator. // "EQUAL" - Values are equal. - // "GREATER_THAN" - First value is greater than the comparison value. - // "LESS_THAN" - First value is less than the second. - // "GREATER_THAN_OR_EQUAL_TO" - First value is greater than or equal to the + // "GREATER_THAN" - Signal value is greater than the comparison value. + // "LESS_THAN" - Signal value is less than the second. + // "GREATER_THAN_OR_EQUAL_TO" - Signal value is greater than or equal to the // second. - // "LESS_THAN_OR_EQUAL_TO" - First value is less or equals to the comparison + // "LESS_THAN_OR_EQUAL_TO" - Signal value is less or equals to the comparison // value. ComparisonOperator string `json:"comparisonOperator,omitempty"` // ComparisonValue: Value to compare signal to. @@ -7800,6 +7801,7 @@ type ExchangeAssignedTargetingOptionDetails struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -7934,6 +7936,7 @@ type ExchangeConfigEnabledExchange struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GoogleAdManagerAgencyId: Output only. Agency ID of Google Ad Manager. The @@ -8052,6 +8055,7 @@ type ExchangeReviewStatus struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // Status: Status of the exchange review. @@ -8173,6 +8177,7 @@ type ExchangeTargetingOptionDetails struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // ForceSendFields is a list of field names (e.g. "Exchange") to @@ -9207,6 +9212,7 @@ type GuaranteedOrder struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Output only. The unique identifier of the guaranteed @@ -10009,6 +10015,7 @@ type InventorySource struct { // "EXCHANGE_ADMOST_GBID" - AdMost. // "EXCHANGE_TOPON_GBID" - TopOn. // "EXCHANGE_NETFLIX" - Netflix. + // "EXCHANGE_CORE" - Core. // "EXCHANGE_TUBI" - Tubi. Exchange string `json:"exchange,omitempty"` // GuaranteedOrderId: Immutable. The ID of the guaranteed order that this @@ -30152,8 +30159,8 @@ func (c *FirstAndThirdPartyAudiencesListCall) OrderBy(orderBy string) *FirstAndT } // PageSize sets the optional parameter "pageSize": Requested page size. Must -// be between `1` and `200`. If unspecified will default to `100`. Returns -// error code `INVALID_ARGUMENT` if an invalid value is specified. +// be between `1` and `5000`. If unspecified, this value defaults to `100`. +// Returns error code `INVALID_ARGUMENT` if an invalid value is specified. func (c *FirstAndThirdPartyAudiencesListCall) PageSize(pageSize int64) *FirstAndThirdPartyAudiencesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c diff --git a/dlp/v2/dlp-api.json b/dlp/v2/dlp-api.json index 8d2e39b07ef..ba6580c68b7 100644 --- a/dlp/v2/dlp-api.json +++ b/dlp/v2/dlp-api.json @@ -5015,7 +5015,7 @@ } } }, - "revision": "20241110", + "revision": "20241204", "rootUrl": "https://dlp.googleapis.com/", "schemas": { "GooglePrivacyDlpV2Action": { @@ -9042,6 +9042,10 @@ "description": "Human readable form of the infoType name.", "type": "string" }, + "example": { + "description": "A sample true positive for this infoType.", + "type": "string" + }, "name": { "description": "Internal name of the infoType.", "type": "string" diff --git a/dlp/v2/dlp-gen.go b/dlp/v2/dlp-gen.go index 5fc4c7ad188..57fcf20a3a9 100644 --- a/dlp/v2/dlp-gen.go +++ b/dlp/v2/dlp-gen.go @@ -6079,6 +6079,8 @@ type GooglePrivacyDlpV2InfoTypeDescription struct { Description string `json:"description,omitempty"` // DisplayName: Human readable form of the infoType name. DisplayName string `json:"displayName,omitempty"` + // Example: A sample true positive for this infoType. + Example string `json:"example,omitempty"` // Name: Internal name of the infoType. Name string `json:"name,omitempty"` // SensitivityScore: The default sensitivity of the infoType. diff --git a/firebaseml/v2beta/firebaseml-api.json b/firebaseml/v2beta/firebaseml-api.json index 2b603067360..eea596f53ad 100644 --- a/firebaseml/v2beta/firebaseml-api.json +++ b/firebaseml/v2beta/firebaseml-api.json @@ -206,7 +206,7 @@ } } }, - "revision": "20241203", + "revision": "20241204", "rootUrl": "https://firebaseml.googleapis.com/", "schemas": { "Date": { @@ -812,6 +812,22 @@ "format": "int32", "type": "integer" }, + "mediaResolution": { + "description": "Optional. If specified, the media resolution specified will be used.", + "enum": [ + "MEDIA_RESOLUTION_UNSPECIFIED", + "MEDIA_RESOLUTION_LOW", + "MEDIA_RESOLUTION_MEDIUM", + "MEDIA_RESOLUTION_HIGH" + ], + "enumDescriptions": [ + "Media resolution has not been set.", + "Media resolution set to low (64 tokens).", + "Media resolution set to medium (256 tokens).", + "Media resolution set to high (zoomed reframing with 256 tokens)." + ], + "type": "string" + }, "presencePenalty": { "description": "Optional. Positive penalties.", "format": "float", @@ -873,22 +889,6 @@ "format": "float", "type": "number" }, - "tokenResolution": { - "description": "Optional. If specified, the token resolution specified will be used.", - "enum": [ - "TOKEN_RESOLUTION_UNSPECIFIED", - "TOKEN_RESOLUTION_LOW", - "TOKEN_RESOLUTION_MEDIUM", - "TOKEN_RESOLUTION_HIGH" - ], - "enumDescriptions": [ - "Token resolution has not been set.", - "Token resolution set to low (64 tokens).", - "Token resolution set to medium (256 tokens).", - "Token resolution set to high (P\u0026S with 256 tokens)." - ], - "type": "string" - }, "topK": { "description": "Optional. If specified, top-k sampling will be used.", "format": "float", diff --git a/firebaseml/v2beta/firebaseml-gen.go b/firebaseml/v2beta/firebaseml-gen.go index d06c755cb94..4f87f27bc58 100644 --- a/firebaseml/v2beta/firebaseml-gen.go +++ b/firebaseml/v2beta/firebaseml-gen.go @@ -949,6 +949,16 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { // MaxOutputTokens: Optional. The maximum number of output tokens to generate // per message. MaxOutputTokens int64 `json:"maxOutputTokens,omitempty"` + // MediaResolution: Optional. If specified, the media resolution specified will + // be used. + // + // Possible values: + // "MEDIA_RESOLUTION_UNSPECIFIED" - Media resolution has not been set. + // "MEDIA_RESOLUTION_LOW" - Media resolution set to low (64 tokens). + // "MEDIA_RESOLUTION_MEDIUM" - Media resolution set to medium (256 tokens). + // "MEDIA_RESOLUTION_HIGH" - Media resolution set to high (zoomed reframing + // with 256 tokens). + MediaResolution string `json:"mediaResolution,omitempty"` // PresencePenalty: Optional. Positive penalties. PresencePenalty float64 `json:"presencePenalty,omitempty"` // ResponseLogprobs: Optional. If true, export the logprobs results in @@ -985,16 +995,6 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. Temperature float64 `json:"temperature,omitempty"` - // TokenResolution: Optional. If specified, the token resolution specified will - // be used. - // - // Possible values: - // "TOKEN_RESOLUTION_UNSPECIFIED" - Token resolution has not been set. - // "TOKEN_RESOLUTION_LOW" - Token resolution set to low (64 tokens). - // "TOKEN_RESOLUTION_MEDIUM" - Token resolution set to medium (256 tokens). - // "TOKEN_RESOLUTION_HIGH" - Token resolution set to high (P&S with 256 - // tokens). - TokenResolution string `json:"tokenResolution,omitempty"` // TopK: Optional. If specified, top-k sampling will be used. TopK float64 `json:"topK,omitempty"` // TopP: Optional. If specified, nucleus sampling will be used. diff --git a/metastore/v1alpha/metastore-api.json b/metastore/v1alpha/metastore-api.json index 641eece5597..b1c5ca8962e 100644 --- a/metastore/v1alpha/metastore-api.json +++ b/metastore/v1alpha/metastore-api.json @@ -1796,7 +1796,7 @@ } } }, - "revision": "20240709", + "revision": "20241203", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -3232,7 +3232,7 @@ "type": "string" }, "requestedCancellation": { - "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", "readOnly": true, "type": "boolean" }, @@ -3397,7 +3397,7 @@ "type": "object" }, "RestoreServiceRequest": { - "description": "Request message for DataprocMetastore.Restore.", + "description": "Request message for DataprocMetastore.RestoreService.", "id": "RestoreServiceRequest", "properties": { "backup": { diff --git a/metastore/v1alpha/metastore-gen.go b/metastore/v1alpha/metastore-gen.go index 211fea3bdd1..5b72491f8ad 100644 --- a/metastore/v1alpha/metastore-gen.go +++ b/metastore/v1alpha/metastore-gen.go @@ -2163,8 +2163,8 @@ type OperationMetadata struct { EndTime string `json:"endTime,omitempty"` // RequestedCancellation: Output only. Identifies whether the caller has // requested cancellation of the operation. Operations that have successfully - // been cancelled have Operation.error value with a google.rpc.Status.code of - // 1, corresponding to Code.CANCELLED. + // been cancelled have google.longrunning.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"` @@ -2430,7 +2430,7 @@ func (s Restore) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// RestoreServiceRequest: Request message for DataprocMetastore.Restore. +// RestoreServiceRequest: Request message for DataprocMetastore.RestoreService. type RestoreServiceRequest struct { // Backup: Optional. The relative resource name of the metastore service backup // to restore from, in the following diff --git a/metastore/v2/metastore-api.json b/metastore/v2/metastore-api.json new file mode 100644 index 00000000000..dd95c53399a --- /dev/null +++ b/metastore/v2/metastore-api.json @@ -0,0 +1,1813 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://metastore.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Dataproc Metastore", + "description": "The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/dataproc-metastore/docs", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "metastore:v2", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://metastore.mtls.googleapis.com/", + "name": "metastore", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "services": { + "methods": { + "alterLocation": { + "description": "Alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata resource and does not transfer any existing data to the new location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterLocation", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterLocation", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:alterLocation", + "request": { + "$ref": "GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "alterTableProperties": { + "description": "Alter metadata table properties.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterTableProperties", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterTableProperties", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the Dataproc Metastore service that's being used to mutate metadata table properties, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:alterTableProperties", + "request": { + "$ref": "GoogleCloudMetastoreV2AlterTablePropertiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a metastore service in a project and location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "serviceId": { + "description": "Required. The ID of the metastore service, which is used as the final component of the metastore service's name.This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+parent}/services", + "request": { + "$ref": "GoogleCloudMetastoreV2Service" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "exportMetadata": { + "description": "Exports metadata from a service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:exportMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.exportMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:exportMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2ExportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a single service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2Service" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "importMetadata": { + "description": "Imports Metadata into a Dataproc Metastore service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:importMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.importMetadata", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service to run import, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:importMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2ImportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists services in a project and location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/services", + "response": { + "$ref": "GoogleCloudMetastoreV2ListServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "moveTableToDatabase": { + "description": "Move a table to another database.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:moveTableToDatabase", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.moveTableToDatabase", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:moveTableToDatabase", + "request": { + "$ref": "GoogleCloudMetastoreV2MoveTableToDatabaseRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "PATCH", + "id": "metastore.projects.locations.services.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. A field mask used to specify the fields to be overwritten in the metastore service resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "request": { + "$ref": "GoogleCloudMetastoreV2Service" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "queryMetadata": { + "description": "Query Dataproc Metastore metadata.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:queryMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.queryMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to query metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:queryMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2QueryMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a service from a backup.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:restore", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.restore", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run restore, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+service}:restore", + "request": { + "$ref": "GoogleCloudMetastoreV2RestoreServiceRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a new backup in a given project and location.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. The ID of the backup, which is used as the final component of the backup's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service in which to create a backup of the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+parent}/backups", + "request": { + "$ref": "GoogleCloudMetastoreV2Backup" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single backup.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single backup.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2Backup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists backups in a service.", + "flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of backups to return. The response may contain less than the maximum number. If unspecified, no more than 500 backups are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListBackups call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListBackups must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose backups to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+parent}/backups", + "response": { + "$ref": "GoogleCloudMetastoreV2ListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20241203", + "rootUrl": "https://metastore.googleapis.com/", + "schemas": { + "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1CustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1CustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1ErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1ErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1HiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1HiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1LocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1LocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1CustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1MultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1HiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1MoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1MoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1MultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1MultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1OperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1QueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1QueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1alphaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1alphaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1alphaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1alphaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1betaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1betaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1betaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1betaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1betaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1betaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest": { + "description": "Request message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest", + "properties": { + "locationUri": { + "description": "Required. The new location URI for the metadata resource.", + "type": "string" + }, + "resourceName": { + "description": "Required. The relative metadata resource name in the following format.databases/{database_id} or databases/{database_id}/tables/{table_id} or databases/{database_id}/tables/{table_id}/partitions/{partition_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2AlterTablePropertiesRequest": { + "description": "Request message for DataprocMetastore.AlterTableProperties.", + "id": "GoogleCloudMetastoreV2AlterTablePropertiesRequest", + "properties": { + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that describes the desired values to mutate. If update_mask is empty, the properties will not update. Otherwise, the properties only alters the value whose associated paths exist in the update mask", + "type": "object" + }, + "tableName": { + "description": "Required. The name of the table containing the properties you're altering in the following format.databases/{database_id}/tables/{table_id}", + "type": "string" + }, + "updateMask": { + "description": "A field mask that specifies the metadata table properties that are overwritten by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.For example, given the target properties: properties { a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if the field mask is:paths: \"properties.b\", \"properties.c\"then the result will be: properties { a: 1 b: 3 c: 4 } ", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2AuxiliaryVersionConfig": { + "description": "Configuration information for the auxiliary service versions.", + "id": "GoogleCloudMetastoreV2AuxiliaryVersionConfig", + "properties": { + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "A mapping of Hive metastore configuration key-value pairs to apply to the auxiliary Hive metastore (configured in hive-site.xml) in addition to the primary version's overrides. If keys are present in both the auxiliary version's overrides and the primary version's overrides, the value from the auxiliary version's overrides takes precedence.", + "type": "object" + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the auxiliary metastore service, includes version and region data.", + "items": { + "$ref": "GoogleCloudMetastoreV2Endpoint" + }, + "readOnly": true, + "type": "array" + }, + "version": { + "description": "The Hive metastore version of the auxiliary service. It must be less than the primary Hive metastore service's version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2Backup": { + "description": "The details of a backup resource.", + "id": "GoogleCloudMetastoreV2Backup", + "properties": { + "createTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the backup.", + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the backup finished creating.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}", + "type": "string" + }, + "restoringServices": { + "description": "Output only. Services that are restoring from the backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "serviceRevision": { + "$ref": "GoogleCloudMetastoreV2Service", + "description": "Output only. The revision of the service at the time of backup.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "DELETING", + "ACTIVE", + "FAILED", + "RESTORING" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is being created.", + "The backup is being deleted.", + "The backup is active and ready to use.", + "The backup failed.", + "The backup is being restored." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2DataCatalogConfig": { + "description": "Specifies how metastore metadata should be integrated with the Data Catalog service.", + "id": "GoogleCloudMetastoreV2DataCatalogConfig", + "properties": { + "enabled": { + "description": "Optional. Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2DatabaseDump": { + "description": "A specification of the location of and metadata about a database dump from a relational database management system.", + "id": "GoogleCloudMetastoreV2DatabaseDump", + "properties": { + "gcsUri": { + "description": "Required. A Cloud Storage object or folder URI that specifies the source from which to import metadata. It must begin with gs://.", + "type": "string" + }, + "type": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2EncryptionConfig": { + "description": "Encryption settings for the service.", + "id": "GoogleCloudMetastoreV2EncryptionConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2Endpoint": { + "description": "An endpoint used to access the metastore service.", + "id": "GoogleCloudMetastoreV2Endpoint", + "properties": { + "endpointUri": { + "description": "Output only. The URI of the endpoint used to access the metastore service.", + "readOnly": true, + "type": "string" + }, + "region": { + "description": "Output only. The region where the endpoint is located.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ExportMetadataRequest": { + "description": "Request message for DataprocMetastore.ExportMetadata.", + "id": "GoogleCloudMetastoreV2ExportMetadataRequest", + "properties": { + "databaseDumpType": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + }, + "destinationGcsFolder": { + "description": "A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2HiveMetastoreConfig": { + "description": "Specifies configuration information specific to running Hive metastore software as the metastore service.", + "id": "GoogleCloudMetastoreV2HiveMetastoreConfig", + "properties": { + "auxiliaryVersions": { + "additionalProperties": { + "$ref": "GoogleCloudMetastoreV2AuxiliaryVersionConfig" + }, + "description": "Optional. A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen.", + "type": "object" + }, + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig.", + "type": "object" + }, + "endpointProtocol": { + "description": "Optional. The protocol to use for the metastore service endpoint. If unspecified, defaults to GRPC.", + "enum": [ + "ENDPOINT_PROTOCOL_UNSPECIFIED", + "THRIFT", + "GRPC" + ], + "enumDescriptions": [ + "The protocol is not set.", + "Use the legacy Apache Thrift protocol for the metastore service endpoint.", + "Use the modernized gRPC protocol for the metastore service endpoint." + ], + "type": "string" + }, + "version": { + "description": "Immutable. The Hive metastore schema version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ImportMetadataRequest": { + "description": "Request message for DataprocMetastore.CreateMetadataImport.", + "id": "GoogleCloudMetastoreV2ImportMetadataRequest", + "properties": { + "databaseDump": { + "$ref": "GoogleCloudMetastoreV2DatabaseDump", + "description": "Immutable. A database dump from a pre-existing metastore's database." + }, + "description": { + "description": "Optional. The description of the metadata import.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2LatestBackup": { + "description": "The details of the latest scheduled backup.", + "id": "GoogleCloudMetastoreV2LatestBackup", + "properties": { + "backupId": { + "description": "Output only. The ID of an in-progress scheduled backup. Empty if no backup is in progress.", + "readOnly": true, + "type": "string" + }, + "duration": { + "description": "Output only. The duration of the backup completion.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is in progress.", + "The backup completed.", + "The backup failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ListBackupsResponse": { + "description": "Response message for DataprocMetastore.ListBackups.", + "id": "GoogleCloudMetastoreV2ListBackupsResponse", + "properties": { + "backups": { + "description": "The backups of the specified service.", + "items": { + "$ref": "GoogleCloudMetastoreV2Backup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that 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.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ListServicesResponse": { + "description": "Response message for DataprocMetastore.ListServices.", + "id": "GoogleCloudMetastoreV2ListServicesResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "services": { + "description": "The services in the specified location.", + "items": { + "$ref": "GoogleCloudMetastoreV2Service" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2MetadataIntegration": { + "description": "Specifies how metastore metadata should be integrated with external services.", + "id": "GoogleCloudMetastoreV2MetadataIntegration", + "properties": { + "dataCatalogConfig": { + "$ref": "GoogleCloudMetastoreV2DataCatalogConfig", + "description": "Optional. The integration config for the Data Catalog service." + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2MoveTableToDatabaseRequest": { + "description": "Request message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV2MoveTableToDatabaseRequest", + "properties": { + "dbName": { + "description": "Required. The name of the database where the table resides.", + "type": "string" + }, + "destinationDbName": { + "description": "Required. The name of the database where the table should be moved.", + "type": "string" + }, + "tableName": { + "description": "Required. The name of the table to be moved.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2QueryMetadataRequest": { + "description": "Request message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV2QueryMetadataRequest", + "properties": { + "query": { + "description": "Required. A read-only SQL query to execute against the metadata database. The query cannot change or mutate the data.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2RestoreServiceRequest": { + "description": "Request message for DataprocMetastore.Restore.", + "id": "GoogleCloudMetastoreV2RestoreServiceRequest", + "properties": { + "backup": { + "description": "Optional. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}. Mutually exclusive with backup_location, and exactly one of the two must be set.", + "type": "string" + }, + "backupLocation": { + "description": "Optional. A Cloud Storage URI specifying the location of the backup artifacts, namely - backup avro files under \"avro/\", backup_metastore.json and service.json, in the following form:gs://. Mutually exclusive with backup, and exactly one of the two must be set.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + }, + "restoreType": { + "description": "Optional. The type of restore. If unspecified, defaults to METADATA_ONLY.", + "enum": [ + "RESTORE_TYPE_UNSPECIFIED", + "FULL", + "METADATA_ONLY" + ], + "enumDescriptions": [ + "The restore type is unknown.", + "The service's metadata and configuration are restored.", + "Only the service's metadata is restored." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ScalingConfig": { + "description": "Represents the scaling configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2ScalingConfig", + "properties": { + "scalingFactor": { + "description": "Optional. Scaling factor from 1 to 5, increments of 1.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2ScheduledBackup": { + "description": "This specifies the configuration of scheduled backup.", + "id": "GoogleCloudMetastoreV2ScheduledBackup", + "properties": { + "backupLocation": { + "description": "Optional. A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing backup files will be stored below it.", + "type": "string" + }, + "cronSchedule": { + "description": "Optional. The scheduled interval in Cron format, see https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is not enabled. Must be specified to enable scheduled backups.", + "type": "string" + }, + "enabled": { + "description": "Optional. Defines whether the scheduled backup is enabled. The default value is false.", + "type": "boolean" + }, + "latestBackup": { + "$ref": "GoogleCloudMetastoreV2LatestBackup", + "description": "Output only. The details of the latest scheduled backup.", + "readOnly": true + }, + "nextScheduledTime": { + "description": "Output only. The time when the next backups execution is scheduled to start.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "timeZone": { + "description": "Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is UTC.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2Service": { + "description": "A managed metastore service that serves metadata queries.", + "id": "GoogleCloudMetastoreV2Service", + "properties": { + "createTime": { + "description": "Output only. The time when the metastore service was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "encryptionConfig": { + "$ref": "GoogleCloudMetastoreV2EncryptionConfig", + "description": "Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated." + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the metastore service.", + "items": { + "$ref": "GoogleCloudMetastoreV2Endpoint" + }, + "readOnly": true, + "type": "array" + }, + "hiveMetastoreConfig": { + "$ref": "GoogleCloudMetastoreV2HiveMetastoreConfig", + "description": "Configuration information specific to running Hive metastore software as the metastore service." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels for the metastore service.", + "type": "object" + }, + "metadataIntegration": { + "$ref": "GoogleCloudMetastoreV2MetadataIntegration", + "description": "Optional. The setting that defines how metastore metadata should be integrated with external services and systems." + }, + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "type": "string" + }, + "scalingConfig": { + "$ref": "GoogleCloudMetastoreV2ScalingConfig", + "description": "Optional. Scaling configuration of the metastore service." + }, + "scheduledBackup": { + "$ref": "GoogleCloudMetastoreV2ScheduledBackup", + "description": "Optional. The configuration of scheduled backup for the metastore service." + }, + "state": { + "description": "Output only. The current state of the metastore service.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "SUSPENDING", + "SUSPENDED", + "UPDATING", + "DELETING", + "ERROR" + ], + "enumDescriptions": [ + "The state of the metastore service is unknown.", + "The metastore service is in the process of being created.", + "The metastore service is running and ready to serve queries.", + "The metastore service is entering suspension. Its query-serving availability may cease unexpectedly.", + "The metastore service is suspended and unable to serve queries.", + "The metastore service is being updated. It remains usable but cannot accept additional update requests or be deleted at this time.", + "The metastore service is undergoing deletion. It cannot be used.", + "The metastore service has encountered an error and cannot be used. The metastore service should be deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the metastore service, if available.", + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The globally unique resource identifier of the metastore service.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the metastore service was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "warehouseGcsUri": { + "description": "Required. A Cloud Storage URI (starting with gs://) that specifies the default warehouse directory of the Hive Metastore.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Dataproc Metastore API", + "version": "v2", + "version_module": true +} \ No newline at end of file diff --git a/metastore/v2/metastore-gen.go b/metastore/v2/metastore-gen.go new file mode 100644 index 00000000000..133f37961e6 --- /dev/null +++ b/metastore/v2/metastore-gen.go @@ -0,0 +1,3639 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package metastore provides access to the Dataproc Metastore API. +// +// For product documentation, see: https://cloud.google.com/dataproc-metastore/docs +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/metastore/v2" +// ... +// ctx := context.Background() +// metastoreService, err := metastore.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// metastoreService, err := metastore.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// metastoreService, err := metastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package metastore // import "google.golang.org/api/metastore/v2" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "metastore:v2" +const apiName = "metastore" +const apiVersion = "v2" +const basePath = "https://metastore.googleapis.com/" +const basePathTemplate = "https://metastore.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://metastore.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Services = NewProjectsLocationsServicesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Services *ProjectsLocationsServicesService +} + +func NewProjectsLocationsServicesService(s *Service) *ProjectsLocationsServicesService { + rs := &ProjectsLocationsServicesService{s: s} + rs.Backups = NewProjectsLocationsServicesBackupsService(s) + return rs +} + +type ProjectsLocationsServicesService struct { + s *Service + + Backups *ProjectsLocationsServicesBackupsService +} + +func NewProjectsLocationsServicesBackupsService(s *Service) *ProjectsLocationsServicesBackupsService { + rs := &ProjectsLocationsServicesBackupsService{s: s} + return rs +} + +type ProjectsLocationsServicesBackupsService struct { + s *Service +} + +// GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1CustomRegionMetadata: Metadata about a custom region. +// This is only populated if the region is a custom region. For single/multi +// regions, it will be empty. +type GoogleCloudMetastoreV1CustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1CustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1CustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1ErrorDetails: Error details in public error message +// for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1ErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1ErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1ErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1HiveMetastoreVersion: A specification of a supported +// version of the Hive Metastore software. +type GoogleCloudMetastoreV1HiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1HiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1HiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1LocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1LocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1CustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1MultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1HiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1LocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1LocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1MoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1MoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1MultiRegionMetadata: The metadata for the multi-region +// that includes the constituent regions. The metadata is only populated if the +// region is multi-region. For single region or custom dual region, it will be +// empty. +type GoogleCloudMetastoreV1MultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1MultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1MultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1OperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1OperationMetadata 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. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1OperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1QueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1QueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1QueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1QueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1alphaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1alphaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1alphaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1alphaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1alphaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1alphaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1alphaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1alphaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1alphaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1alphaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1alphaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1alphaOperationMetadata 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. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1betaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1betaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1betaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1betaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1betaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1betaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1betaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1betaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1betaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1betaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1betaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1betaOperationMetadata 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. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest: Request message +// for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest struct { + // LocationUri: Required. The new location URI for the metadata resource. + LocationUri string `json:"locationUri,omitempty"` + // ResourceName: Required. The relative metadata resource name in the following + // format.databases/{database_id} or databases/{database_id}/tables/{table_id} + // or databases/{database_id}/tables/{table_id}/partitions/{partition_id} + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "LocationUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LocationUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2AlterTablePropertiesRequest: Request message for +// DataprocMetastore.AlterTableProperties. +type GoogleCloudMetastoreV2AlterTablePropertiesRequest struct { + // Properties: A map that describes the desired values to mutate. If + // update_mask is empty, the properties will not update. Otherwise, the + // properties only alters the value whose associated paths exist in the update + // mask + Properties map[string]string `json:"properties,omitempty"` + // TableName: Required. The name of the table containing the properties you're + // altering in the following format.databases/{database_id}/tables/{table_id} + TableName string `json:"tableName,omitempty"` + // UpdateMask: A field mask that specifies the metadata table properties that + // are overwritten by the update. Fields specified in the update_mask are + // relative to the resource (not to the full request). A field is overwritten + // if it is in the mask.For example, given the target properties: properties { + // a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if + // the field mask is:paths: "properties.b", "properties.c"then the result will + // be: properties { a: 1 b: 3 c: 4 } + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Properties") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Properties") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2AlterTablePropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2AlterTablePropertiesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2AuxiliaryVersionConfig: Configuration information for +// the auxiliary service versions. +type GoogleCloudMetastoreV2AuxiliaryVersionConfig struct { + // ConfigOverrides: A mapping of Hive metastore configuration key-value pairs + // to apply to the auxiliary Hive metastore (configured in hive-site.xml) in + // addition to the primary version's overrides. If keys are present in both the + // auxiliary version's overrides and the primary version's overrides, the value + // from the auxiliary version's overrides takes precedence. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the auxiliary + // metastore service, includes version and region data. + Endpoints []*GoogleCloudMetastoreV2Endpoint `json:"endpoints,omitempty"` + // Version: The Hive metastore version of the auxiliary service. It must be + // less than the primary Hive metastore service's version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConfigOverrides") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConfigOverrides") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2AuxiliaryVersionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2AuxiliaryVersionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2Backup: The details of a backup resource. +type GoogleCloudMetastoreV2Backup struct { + // CreateTime: Output only. The time when the backup was started. + CreateTime string `json:"createTime,omitempty"` + // Description: The description of the backup. + Description string `json:"description,omitempty"` + // EndTime: Output only. The time when the backup finished creating. + EndTime string `json:"endTime,omitempty"` + // Name: Immutable. The relative resource name of the backup, in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // backups/{backup_id} + Name string `json:"name,omitempty"` + // RestoringServices: Output only. Services that are restoring from the backup. + RestoringServices []string `json:"restoringServices,omitempty"` + // ServiceRevision: Output only. The revision of the service at the time of + // backup. + ServiceRevision *GoogleCloudMetastoreV2Service `json:"serviceRevision,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "CREATING" - The backup is being created. + // "DELETING" - The backup is being deleted. + // "ACTIVE" - The backup is active and ready to use. + // "FAILED" - The backup failed. + // "RESTORING" - The backup is being restored. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2Backup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2Backup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2DataCatalogConfig: Specifies how metastore metadata +// should be integrated with the Data Catalog service. +type GoogleCloudMetastoreV2DataCatalogConfig struct { + // Enabled: Optional. Defines whether the metastore metadata should be synced + // to Data Catalog. The default value is to disable syncing metastore metadata + // to Data Catalog. + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2DataCatalogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2DataCatalogConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2DatabaseDump: A specification of the location of and +// metadata about a database dump from a relational database management system. +type GoogleCloudMetastoreV2DatabaseDump struct { + // GcsUri: Required. A Cloud Storage object or folder URI that specifies the + // source from which to import metadata. It must begin with gs://. + GcsUri string `json:"gcsUri,omitempty"` + // Type: Optional. The type of the database dump. If unspecified, defaults to + // MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsUri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcsUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2DatabaseDump) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2DatabaseDump + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2EncryptionConfig: Encryption settings for the service. +type GoogleCloudMetastoreV2EncryptionConfig struct { +} + +// GoogleCloudMetastoreV2Endpoint: An endpoint used to access the metastore +// service. +type GoogleCloudMetastoreV2Endpoint struct { + // EndpointUri: Output only. The URI of the endpoint used to access the + // metastore service. + EndpointUri string `json:"endpointUri,omitempty"` + // Region: Output only. The region where the endpoint is located. + Region string `json:"region,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndpointUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndpointUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2Endpoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2Endpoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ExportMetadataRequest: Request message for +// DataprocMetastore.ExportMetadata. +type GoogleCloudMetastoreV2ExportMetadataRequest struct { + // DatabaseDumpType: Optional. The type of the database dump. If unspecified, + // defaults to MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + DatabaseDumpType string `json:"databaseDumpType,omitempty"` + // DestinationGcsFolder: A Cloud Storage URI of a folder, in the format gs:///. + // A sub-folder containing exported files will be created below it. + DestinationGcsFolder string `json:"destinationGcsFolder,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDumpType") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ExportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ExportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2HiveMetastoreConfig: Specifies configuration +// information specific to running Hive metastore software as the metastore +// service. +type GoogleCloudMetastoreV2HiveMetastoreConfig struct { + // AuxiliaryVersions: Optional. A mapping of Hive metastore version to the + // auxiliary version configuration. When specified, a secondary Hive metastore + // service is created along with the primary service. All auxiliary versions + // must be less than the service's primary version. The key is the auxiliary + // service name and it must match the regular expression a-z?. This means that + // the first character must be a lowercase letter, and all the following + // characters must be hyphens, lowercase letters, or digits, except the last + // character, which cannot be a hyphen. + AuxiliaryVersions map[string]GoogleCloudMetastoreV2AuxiliaryVersionConfig `json:"auxiliaryVersions,omitempty"` + // ConfigOverrides: Optional. A mapping of Hive metastore configuration + // key-value pairs to apply to the Hive metastore (configured in + // hive-site.xml). The mappings override system defaults (some keys cannot be + // overridden). These overrides are also applied to auxiliary versions and can + // be further customized in the auxiliary version's AuxiliaryVersionConfig. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // EndpointProtocol: Optional. The protocol to use for the metastore service + // endpoint. If unspecified, defaults to GRPC. + // + // Possible values: + // "ENDPOINT_PROTOCOL_UNSPECIFIED" - The protocol is not set. + // "THRIFT" - Use the legacy Apache Thrift protocol for the metastore service + // endpoint. + // "GRPC" - Use the modernized gRPC protocol for the metastore service + // endpoint. + EndpointProtocol string `json:"endpointProtocol,omitempty"` + // Version: Immutable. The Hive metastore schema version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuxiliaryVersions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuxiliaryVersions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2HiveMetastoreConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2HiveMetastoreConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ImportMetadataRequest: Request message for +// DataprocMetastore.CreateMetadataImport. +type GoogleCloudMetastoreV2ImportMetadataRequest struct { + // DatabaseDump: Immutable. A database dump from a pre-existing metastore's + // database. + DatabaseDump *GoogleCloudMetastoreV2DatabaseDump `json:"databaseDump,omitempty"` + // Description: Optional. The description of the metadata import. + Description string `json:"description,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDump") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDump") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ImportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ImportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2LatestBackup: The details of the latest scheduled +// backup. +type GoogleCloudMetastoreV2LatestBackup struct { + // BackupId: Output only. The ID of an in-progress scheduled backup. Empty if + // no backup is in progress. + BackupId string `json:"backupId,omitempty"` + // Duration: Output only. The duration of the backup completion. + Duration string `json:"duration,omitempty"` + // StartTime: Output only. The time when the backup was started. + StartTime string `json:"startTime,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "IN_PROGRESS" - The backup is in progress. + // "SUCCEEDED" - The backup completed. + // "FAILED" - The backup failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2LatestBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2LatestBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ListBackupsResponse: Response message for +// DataprocMetastore.ListBackups. +type GoogleCloudMetastoreV2ListBackupsResponse struct { + // Backups: The backups of the specified service. + Backups []*GoogleCloudMetastoreV2Backup `json:"backups,omitempty"` + // NextPageToken: A token that 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. + 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. "Backups") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ListBackupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ListServicesResponse: Response message for +// DataprocMetastore.ListServices. +type GoogleCloudMetastoreV2ListServicesResponse struct { + // NextPageToken: A token that 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"` + // Services: The services in the specified location. + Services []*GoogleCloudMetastoreV2Service `json:"services,omitempty"` + // Unreachable: Locations that could not be reached. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ListServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ListServicesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2MetadataIntegration: Specifies how metastore metadata +// should be integrated with external services. +type GoogleCloudMetastoreV2MetadataIntegration struct { + // DataCatalogConfig: Optional. The integration config for the Data Catalog + // service. + DataCatalogConfig *GoogleCloudMetastoreV2DataCatalogConfig `json:"dataCatalogConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataCatalogConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataCatalogConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2MetadataIntegration) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2MetadataIntegration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2MoveTableToDatabaseRequest: Request message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV2MoveTableToDatabaseRequest struct { + // DbName: Required. The name of the database where the table resides. + DbName string `json:"dbName,omitempty"` + // DestinationDbName: Required. The name of the database where the table should + // be moved. + DestinationDbName string `json:"destinationDbName,omitempty"` + // TableName: Required. The name of the table to be moved. + TableName string `json:"tableName,omitempty"` + // ForceSendFields is a list of field names (e.g. "DbName") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2MoveTableToDatabaseRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2MoveTableToDatabaseRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2QueryMetadataRequest: Request message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV2QueryMetadataRequest struct { + // Query: Required. A read-only SQL query to execute against the metadata + // database. The query cannot change or mutate the data. + Query string `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "Query") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Query") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2QueryMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2QueryMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2RestoreServiceRequest: Request message for +// DataprocMetastore.Restore. +type GoogleCloudMetastoreV2RestoreServiceRequest struct { + // Backup: Optional. The relative resource name of the metastore service backup + // to restore from, in the following + // form:projects/{project_id}/locations/{location_id}/services/{service_id}/back + // ups/{backup_id}. Mutually exclusive with backup_location, and exactly one of + // the two must be set. + Backup string `json:"backup,omitempty"` + // BackupLocation: Optional. A Cloud Storage URI specifying the location of the + // backup artifacts, namely - backup avro files under "avro/", + // backup_metastore.json and service.json, in the following form:gs://. + // Mutually exclusive with backup, and exactly one of the two must be set. + BackupLocation string `json:"backupLocation,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // RestoreType: Optional. The type of restore. If unspecified, defaults to + // METADATA_ONLY. + // + // Possible values: + // "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown. + // "FULL" - The service's metadata and configuration are restored. + // "METADATA_ONLY" - Only the service's metadata is restored. + RestoreType string `json:"restoreType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backup") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2RestoreServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2RestoreServiceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ScalingConfig: Represents the scaling configuration of +// a metastore service. +type GoogleCloudMetastoreV2ScalingConfig struct { + // ScalingFactor: Optional. Scaling factor from 1 to 5, increments of 1. + ScalingFactor int64 `json:"scalingFactor,omitempty"` + // ForceSendFields is a list of field names (e.g. "ScalingFactor") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ScalingFactor") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ScalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ScalingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2ScheduledBackup: This specifies the configuration of +// scheduled backup. +type GoogleCloudMetastoreV2ScheduledBackup struct { + // BackupLocation: Optional. A Cloud Storage URI of a folder, in the format + // gs:///. A sub-folder containing backup files will be stored below it. + BackupLocation string `json:"backupLocation,omitempty"` + // CronSchedule: Optional. The scheduled interval in Cron format, see + // https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is + // not enabled. Must be specified to enable scheduled backups. + CronSchedule string `json:"cronSchedule,omitempty"` + // Enabled: Optional. Defines whether the scheduled backup is enabled. The + // default value is false. + Enabled bool `json:"enabled,omitempty"` + // LatestBackup: Output only. The details of the latest scheduled backup. + LatestBackup *GoogleCloudMetastoreV2LatestBackup `json:"latestBackup,omitempty"` + // NextScheduledTime: Output only. The time when the next backups execution is + // scheduled to start. + NextScheduledTime string `json:"nextScheduledTime,omitempty"` + // TimeZone: Optional. Specifies the time zone to be used when interpreting + // cron_schedule. Must be a time zone name from the time zone database + // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. + // America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is + // UTC. + TimeZone string `json:"timeZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupLocation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupLocation") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2ScheduledBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2ScheduledBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2Service: A managed metastore service that serves +// metadata queries. +type GoogleCloudMetastoreV2Service struct { + // CreateTime: Output only. The time when the metastore service was created. + CreateTime string `json:"createTime,omitempty"` + // EncryptionConfig: Immutable. Information used to configure the Dataproc + // Metastore service to encrypt customer data at rest. Cannot be updated. + EncryptionConfig *GoogleCloudMetastoreV2EncryptionConfig `json:"encryptionConfig,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the metastore + // service. + Endpoints []*GoogleCloudMetastoreV2Endpoint `json:"endpoints,omitempty"` + // HiveMetastoreConfig: Configuration information specific to running Hive + // metastore software as the metastore service. + HiveMetastoreConfig *GoogleCloudMetastoreV2HiveMetastoreConfig `json:"hiveMetastoreConfig,omitempty"` + // Labels: User-defined labels for the metastore service. + Labels map[string]string `json:"labels,omitempty"` + // MetadataIntegration: Optional. The setting that defines how metastore + // metadata should be integrated with external services and systems. + MetadataIntegration *GoogleCloudMetastoreV2MetadataIntegration `json:"metadataIntegration,omitempty"` + // Name: Immutable. The relative resource name of the metastore service, in the + // following + // format:projects/{project_number}/locations/{location_id}/services/{service_id + // }. + Name string `json:"name,omitempty"` + // ScalingConfig: Optional. Scaling configuration of the metastore service. + ScalingConfig *GoogleCloudMetastoreV2ScalingConfig `json:"scalingConfig,omitempty"` + // ScheduledBackup: Optional. The configuration of scheduled backup for the + // metastore service. + ScheduledBackup *GoogleCloudMetastoreV2ScheduledBackup `json:"scheduledBackup,omitempty"` + // State: Output only. The current state of the metastore service. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the metastore service is unknown. + // "CREATING" - The metastore service is in the process of being created. + // "ACTIVE" - The metastore service is running and ready to serve queries. + // "SUSPENDING" - The metastore service is entering suspension. Its + // query-serving availability may cease unexpectedly. + // "SUSPENDED" - The metastore service is suspended and unable to serve + // queries. + // "UPDATING" - The metastore service is being updated. It remains usable but + // cannot accept additional update requests or be deleted at this time. + // "DELETING" - The metastore service is undergoing deletion. It cannot be + // used. + // "ERROR" - The metastore service has encountered an error and cannot be + // used. The metastore service should be deleted. + State string `json:"state,omitempty"` + // StateMessage: Output only. Additional information about the current state of + // the metastore service, if available. + StateMessage string `json:"stateMessage,omitempty"` + // Uid: Output only. The globally unique resource identifier of the metastore + // service. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The time when the metastore service was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // WarehouseGcsUri: Required. A Cloud Storage URI (starting with gs://) that + // specifies the default warehouse directory of the Hive Metastore. + WarehouseGcsUri string `json:"warehouseGcsUri,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2Service) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2Service + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsLocationsServicesAlterLocationCall struct { + s *Service + service string + googlecloudmetastorev2altermetadataresourcelocationrequest *GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterLocation: Alter metadata resource location. The metadata resource can +// be a database, table, or partition. This functionality only updates the +// parent directory for the respective metadata resource and does not transfer +// any existing data to the new location. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterLocation(service string, googlecloudmetastorev2altermetadataresourcelocationrequest *GoogleCloudMetastoreV2AlterMetadataResourceLocationRequest) *ProjectsLocationsServicesAlterLocationCall { + c := &ProjectsLocationsServicesAlterLocationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2altermetadataresourcelocationrequest = googlecloudmetastorev2altermetadataresourcelocationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterLocationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterLocationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterLocationCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterLocationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterLocationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterLocationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2altermetadataresourcelocationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:alterLocation") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterLocation" call. +// 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 *ProjectsLocationsServicesAlterLocationCall) 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 +} + +type ProjectsLocationsServicesAlterTablePropertiesCall struct { + s *Service + service string + googlecloudmetastorev2altertablepropertiesrequest *GoogleCloudMetastoreV2AlterTablePropertiesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterTableProperties: Alter metadata table properties. +// +// - service: The relative resource name of the Dataproc Metastore service +// that's being used to mutate metadata table properties, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterTableProperties(service string, googlecloudmetastorev2altertablepropertiesrequest *GoogleCloudMetastoreV2AlterTablePropertiesRequest) *ProjectsLocationsServicesAlterTablePropertiesCall { + c := &ProjectsLocationsServicesAlterTablePropertiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2altertablepropertiesrequest = googlecloudmetastorev2altertablepropertiesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2altertablepropertiesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:alterTableProperties") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterTableProperties" call. +// 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 *ProjectsLocationsServicesAlterTablePropertiesCall) 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 +} + +type ProjectsLocationsServicesCreateCall struct { + s *Service + parent string + googlecloudmetastorev2service *GoogleCloudMetastoreV2Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a metastore service in a project and location. +// +// - parent: The relative resource name of the location in which to create a +// metastore service, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) Create(parent string, googlecloudmetastorev2service *GoogleCloudMetastoreV2Service) *ProjectsLocationsServicesCreateCall { + c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2service = googlecloudmetastorev2service + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceId sets the optional parameter "serviceId": Required. The ID of the +// metastore service, which is used as the final component of the metastore +// service's name.This value must be between 2 and 63 characters long +// inclusive, begin with a letter, end with a letter or number, and consist of +// alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("serviceId", serviceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2service) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/services") + 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 "metastore.projects.locations.services.create" call. +// 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 *ProjectsLocationsServicesCreateCall) 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 +} + +type ProjectsLocationsServicesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single service. +// +// - name: The relative resource name of the metastore service to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall { + c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall { + 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 +// details. +func (c *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "metastore.projects.locations.services.delete" call. +// 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 *ProjectsLocationsServicesDeleteCall) 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 +} + +type ProjectsLocationsServicesExportMetadataCall struct { + s *Service + service string + googlecloudmetastorev2exportmetadatarequest *GoogleCloudMetastoreV2ExportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportMetadata: Exports metadata from a service. +// +// - service: The relative resource name of the metastore service to run +// export, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ExportMetadata(service string, googlecloudmetastorev2exportmetadatarequest *GoogleCloudMetastoreV2ExportMetadataRequest) *ProjectsLocationsServicesExportMetadataCall { + c := &ProjectsLocationsServicesExportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2exportmetadatarequest = googlecloudmetastorev2exportmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesExportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesExportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesExportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesExportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesExportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesExportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2exportmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:exportMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.exportMetadata" call. +// 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 *ProjectsLocationsServicesExportMetadataCall) 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 +} + +type ProjectsLocationsServicesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a single service. +// +// - name: The relative resource name of the metastore service to retrieve, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall { + c := &ProjectsLocationsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "metastore.projects.locations.services.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2Service.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2Service, 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 := &GoogleCloudMetastoreV2Service{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesImportMetadataCall struct { + s *Service + name string + googlecloudmetastorev2importmetadatarequest *GoogleCloudMetastoreV2ImportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ImportMetadata: Imports Metadata into a Dataproc Metastore service. +// +// - name: Immutable. The relative resource name of the metastore service to +// run import, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ImportMetadata(name string, googlecloudmetastorev2importmetadatarequest *GoogleCloudMetastoreV2ImportMetadataRequest) *ProjectsLocationsServicesImportMetadataCall { + c := &ProjectsLocationsServicesImportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2importmetadatarequest = googlecloudmetastorev2importmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesImportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesImportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesImportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesImportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesImportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesImportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2importmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+name}:importMetadata") + 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 "metastore.projects.locations.services.importMetadata" call. +// 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 *ProjectsLocationsServicesImportMetadataCall) 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 +} + +type ProjectsLocationsServicesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists services in a project and location. +// +// - parent: The relative resource name of the location of metastore services +// to list, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall { + c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesListCall) Filter(filter string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// services to return. The response may contain less than the maximum number. +// If unspecified, no more than 500 services are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListServices call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListServices must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/services") + 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 "metastore.projects.locations.services.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2ListServicesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2ListServicesResponse, 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 := &GoogleCloudMetastoreV2ListServicesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServicesListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2ListServicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsServicesMoveTableToDatabaseCall struct { + s *Service + service string + googlecloudmetastorev2movetabletodatabaserequest *GoogleCloudMetastoreV2MoveTableToDatabaseRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MoveTableToDatabase: Move a table to another database. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) MoveTableToDatabase(service string, googlecloudmetastorev2movetabletodatabaserequest *GoogleCloudMetastoreV2MoveTableToDatabaseRequest) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c := &ProjectsLocationsServicesMoveTableToDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2movetabletodatabaserequest = googlecloudmetastorev2movetabletodatabaserequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Context(ctx context.Context) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2movetabletodatabaserequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:moveTableToDatabase") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.moveTableToDatabase" call. +// 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 *ProjectsLocationsServicesMoveTableToDatabaseCall) 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 +} + +type ProjectsLocationsServicesPatchCall struct { + s *Service + name string + googlecloudmetastorev2service *GoogleCloudMetastoreV2Service + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single service. +// +// - name: Immutable. The relative resource name of the metastore service, in +// the following +// format:projects/{project_number}/locations/{location_id}/services/{service_ +// id}. +func (r *ProjectsLocationsServicesService) Patch(name string, googlecloudmetastorev2service *GoogleCloudMetastoreV2Service) *ProjectsLocationsServicesPatchCall { + c := &ProjectsLocationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2service = googlecloudmetastorev2service + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A field mask +// used to specify the fields to be overwritten in the metastore service +// resource by the update. Fields specified in the update_mask are relative to +// the resource (not to the full request). A field is overwritten if it is in +// the mask. +func (c *ProjectsLocationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2service) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "metastore.projects.locations.services.patch" call. +// 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 *ProjectsLocationsServicesPatchCall) 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 +} + +type ProjectsLocationsServicesQueryMetadataCall struct { + s *Service + service string + googlecloudmetastorev2querymetadatarequest *GoogleCloudMetastoreV2QueryMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// QueryMetadata: Query Dataproc Metastore metadata. +// +// - service: The relative resource name of the metastore service to query +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) QueryMetadata(service string, googlecloudmetastorev2querymetadatarequest *GoogleCloudMetastoreV2QueryMetadataRequest) *ProjectsLocationsServicesQueryMetadataCall { + c := &ProjectsLocationsServicesQueryMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2querymetadatarequest = googlecloudmetastorev2querymetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesQueryMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesQueryMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesQueryMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesQueryMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesQueryMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesQueryMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2querymetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:queryMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.queryMetadata" call. +// 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 *ProjectsLocationsServicesQueryMetadataCall) 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 +} + +type ProjectsLocationsServicesRestoreCall struct { + s *Service + service string + googlecloudmetastorev2restoreservicerequest *GoogleCloudMetastoreV2RestoreServiceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a service from a backup. +// +// - service: The relative resource name of the metastore service to run +// restore, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) Restore(service string, googlecloudmetastorev2restoreservicerequest *GoogleCloudMetastoreV2RestoreServiceRequest) *ProjectsLocationsServicesRestoreCall { + c := &ProjectsLocationsServicesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2restoreservicerequest = googlecloudmetastorev2restoreservicerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRestoreCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesRestoreCall) Context(ctx context.Context) *ProjectsLocationsServicesRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2restoreservicerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+service}:restore") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.restore" call. +// 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 *ProjectsLocationsServicesRestoreCall) 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 +} + +type ProjectsLocationsServicesBackupsCreateCall struct { + s *Service + parent string + googlecloudmetastorev2backup *GoogleCloudMetastoreV2Backup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new backup in a given project and location. +// +// - parent: The relative resource name of the service in which to create a +// backup of the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesBackupsService) Create(parent string, googlecloudmetastorev2backup *GoogleCloudMetastoreV2Backup) *ProjectsLocationsServicesBackupsCreateCall { + c := &ProjectsLocationsServicesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2backup = googlecloudmetastorev2backup + return c +} + +// BackupId sets the optional parameter "backupId": Required. The ID of the +// backup, which is used as the final component of the backup's name.This value +// must be between 1 and 64 characters long, begin with a letter, end with a +// letter or number, and consist of alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsCreateCall { + 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 +// details. +func (c *ProjectsLocationsServicesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2backup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.create" call. +// 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 *ProjectsLocationsServicesBackupsCreateCall) 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 +} + +type ProjectsLocationsServicesBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single backup. +// +// - name: The relative resource name of the backup to delete, in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Delete(name string) *ProjectsLocationsServicesBackupsDeleteCall { + c := &ProjectsLocationsServicesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsDeleteCall { + 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 +// details. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "metastore.projects.locations.services.backups.delete" call. +// 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 *ProjectsLocationsServicesBackupsDeleteCall) 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 +} + +type ProjectsLocationsServicesBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single backup. +// +// - name: The relative resource name of the backup to retrieve, in the +// following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Get(name string) *ProjectsLocationsServicesBackupsGetCall { + c := &ProjectsLocationsServicesBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+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 "metastore.projects.locations.services.backups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2Backup.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesBackupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2Backup, 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 := &GoogleCloudMetastoreV2Backup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists backups in a service. +// +// - parent: The relative resource name of the service whose backups to list, +// in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups. +func (r *ProjectsLocationsServicesBackupsService) List(parent string) *ProjectsLocationsServicesBackupsListCall { + c := &ProjectsLocationsServicesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesBackupsListCall) Filter(filter string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// backups to return. The response may contain less than the maximum number. If +// unspecified, no more than 500 backups are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListBackups call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListBackups must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesBackupsListCall) PageToken(pageToken string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsListCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2ListBackupsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesBackupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2ListBackupsResponse, 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 := &GoogleCloudMetastoreV2ListBackupsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServicesBackupsListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2ListBackupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/networkservices/v1beta1/networkservices-api.json b/networkservices/v1beta1/networkservices-api.json index 50d3d071f38..e471e1e9d54 100644 --- a/networkservices/v1beta1/networkservices-api.json +++ b/networkservices/v1beta1/networkservices-api.json @@ -1645,7 +1645,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networkservices.projects.locations.operations.cancel", @@ -2661,7 +2661,7 @@ } } }, - "revision": "20241109", + "revision": "20241118", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuthzExtension": { @@ -4500,7 +4500,7 @@ "type": "object" }, "LoggingConfig": { - "description": "The configuration for Platform Telemetry logging for Eventarc Avdvanced resources.", + "description": "The configuration for Platform Telemetry logging for Eventarc Advanced resources.", "id": "LoggingConfig", "properties": { "logSeverity": { diff --git a/networkservices/v1beta1/networkservices-gen.go b/networkservices/v1beta1/networkservices-gen.go index 64ec76f1250..580e7f8bb8b 100644 --- a/networkservices/v1beta1/networkservices-gen.go +++ b/networkservices/v1beta1/networkservices-gen.go @@ -2827,7 +2827,7 @@ func (s Location) MarshalJSON() ([]byte, error) { } // LoggingConfig: The configuration for Platform Telemetry logging for Eventarc -// Avdvanced resources. +// Advanced resources. type LoggingConfig struct { // LogSeverity: Optional. The minimum severity of logs that will be sent to // Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be @@ -9547,7 +9547,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/tagmanager/v2/tagmanager-api.json b/tagmanager/v2/tagmanager-api.json index ac0c2e0afa2..06206b77464 100644 --- a/tagmanager/v2/tagmanager-api.json +++ b/tagmanager/v2/tagmanager-api.json @@ -3895,7 +3895,7 @@ } } }, - "revision": "20240701", + "revision": "20241204", "rootUrl": "https://tagmanager.googleapis.com/", "schemas": { "Account": { @@ -5144,6 +5144,10 @@ "description": "The signature of the community gallery template as computed at import time. This value is recomputed whenever the template is updated from the gallery.", "type": "string" }, + "templateDeveloperId": { + "description": "The developer id of the community gallery template. This value is set whenever the template is created from the gallery.", + "type": "string" + }, "version": { "description": "The version of the community gallery template.", "type": "string" diff --git a/tagmanager/v2/tagmanager-gen.go b/tagmanager/v2/tagmanager-gen.go index baa11c839e5..40b48de087a 100644 --- a/tagmanager/v2/tagmanager-gen.go +++ b/tagmanager/v2/tagmanager-gen.go @@ -1427,6 +1427,9 @@ type GalleryReference struct { // import time. This value is recomputed whenever the template is updated from // the gallery. Signature string `json:"signature,omitempty"` + // TemplateDeveloperId: The developer id of the community gallery template. + // This value is set whenever the template is created from the gallery. + TemplateDeveloperId string `json:"templateDeveloperId,omitempty"` // Version: The version of the community gallery template. Version string `json:"version,omitempty"` // ForceSendFields is a list of field names (e.g. "Host") to unconditionally From 6528fb2369704b3448dc2144cff0624e40072ca8 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Sun, 8 Dec 2024 00:24:23 -0800 Subject: [PATCH 05/11] feat(all): auto-regenerate discovery clients (#2903) --- aiplatform/v1/aiplatform-api.json | 985 +- aiplatform/v1/aiplatform-gen.go | 38913 ++++++++-------- aiplatform/v1beta1/aiplatform-api.json | 746 +- aiplatform/v1beta1/aiplatform-gen.go | 1905 +- .../v1/contactcenterinsights-api.json | 46 +- .../v1/contactcenterinsights-gen.go | 74 +- datacatalog/v1/datacatalog-api.json | 4 +- datacatalog/v1/datacatalog-gen.go | 2 +- datamigration/v1/datamigration-api.json | 333 +- datamigration/v1/datamigration-gen.go | 767 +- discoveryengine/v1/discoveryengine-api.json | 22 +- discoveryengine/v1/discoveryengine-gen.go | 19 +- .../v1alpha/discoveryengine-api.json | 16 +- .../v1alpha/discoveryengine-gen.go | 18 +- .../v1beta/discoveryengine-api.json | 22 +- discoveryengine/v1beta/discoveryengine-gen.go | 19 +- metastore/v1/metastore-api.json | 6 +- metastore/v1/metastore-gen.go | 6 +- metastore/v1beta/metastore-api.json | 6 +- metastore/v1beta/metastore-gen.go | 6 +- metastore/v2alpha/metastore-api.json | 2313 + metastore/v2alpha/metastore-gen.go | 4855 ++ metastore/v2beta/metastore-api.json | 2313 + metastore/v2beta/metastore-gen.go | 4855 ++ .../v1/networkmanagement-api.json | 13 +- networkmanagement/v1/networkmanagement-gen.go | 10 +- .../v1beta1/networkmanagement-api.json | 13 +- .../v1beta1/networkmanagement-gen.go | 10 +- networksecurity/v1/networksecurity-api.json | 43 +- networksecurity/v1/networksecurity-gen.go | 50 +- .../v1beta1/networksecurity-api.json | 3447 +- .../v1beta1/networksecurity-gen.go | 3990 +- networkservices/v1/networkservices-api.json | 6 +- networkservices/v1/networkservices-gen.go | 4 +- orgpolicy/v2/orgpolicy-api.json | 14 +- orgpolicy/v2/orgpolicy-gen.go | 9 + redis/v1/redis-api.json | 95 +- redis/v1/redis-gen.go | 99 +- redis/v1beta1/redis-api.json | 95 +- redis/v1beta1/redis-gen.go | 99 +- .../v1/servicemanagement-api.json | 13 +- servicemanagement/v1/servicemanagement-gen.go | 17 +- workstations/v1/workstations-api.json | 12 +- workstations/v1/workstations-gen.go | 18 +- workstations/v1beta/workstations-api.json | 12 +- workstations/v1beta/workstations-gen.go | 18 +- 46 files changed, 45795 insertions(+), 20543 deletions(-) create mode 100644 metastore/v2alpha/metastore-api.json create mode 100644 metastore/v2alpha/metastore-gen.go create mode 100644 metastore/v2beta/metastore-api.json create mode 100644 metastore/v2beta/metastore-gen.go diff --git a/aiplatform/v1/aiplatform-api.json b/aiplatform/v1/aiplatform-api.json index af6591e0b7d..d81e06c14da 100644 --- a/aiplatform/v1/aiplatform-api.json +++ b/aiplatform/v1/aiplatform-api.json @@ -12767,7 +12767,7 @@ ], "parameters": { "filter": { - "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `display_name` supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * `notebookRuntimeTemplate=notebookRuntimeTemplate123` * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"` * `notebookRuntimeType=USER_DEFINED`", + "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `display_name` supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` supports = and !=. * `acceleratorType` supports = and !=. Some examples: * `notebookRuntimeTemplate=notebookRuntimeTemplate123` * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"` * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * `acceleratorType=NVIDIA_TESLA_T4`", "location": "query", "type": "string" }, @@ -13147,7 +13147,7 @@ ], "parameters": { "filter": { - "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntime` supports = and !=. `notebookRuntime` represents the NotebookRuntime ID, i.e. the last segment of the NotebookRuntime's resource name. * `displayName` supports = and != and regex. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. * API version is UI only: `uiState` supports = and !=. uiState enum: [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * `notebookRuntime=\"notebookRuntime123\"` * `displayName=\"myDisplayName\"` and `displayName=~\"myDisplayNameRegex\"` * `notebookRuntimeTemplate=\"notebookRuntimeTemplate321\"` * `healthState=HEALTHY` * `runtimeState=RUNNING` * `runtimeUser=\"test@google.com\"` * `uiState=UI_RESOURCE_STATE_BEING_DELETED` * `notebookRuntimeType=USER_DEFINED`", + "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntime` supports = and !=. `notebookRuntime` represents the NotebookRuntime ID, i.e. the last segment of the NotebookRuntime's resource name. * `displayName` supports = and != and regex. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. * API version is UI only: `uiState` supports = and !=. uiState enum: [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` supports = and !=. * `acceleratorType` supports = and !=. Some examples: * `notebookRuntime=\"notebookRuntime123\"` * `displayName=\"myDisplayName\"` and `displayName=~\"myDisplayNameRegex\"` * `notebookRuntimeTemplate=\"notebookRuntimeTemplate321\"` * `healthState=HEALTHY` * `runtimeState=RUNNING` * `runtimeUser=\"test@google.com\"` * `uiState=UI_RESOURCE_STATE_BEING_DELETED` * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * `acceleratorType=NVIDIA_TESLA_T4`", "location": "query", "type": "string" }, @@ -14740,6 +14740,157 @@ } }, "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.ragCorpora.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "aiplatform.projects.locations.ragCorpora.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.ragCorpora.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.ragCorpora.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/[^/]+/ragCorpora/[^/]+$", + "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": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "wait": { + "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/operations/{operationsId}:wait", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.ragCorpora.operations.wait", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to wait on.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + }, + "timeout": { + "description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", + "format": "google-duration", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}:wait", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "ragFiles": { "methods": { "delete": { @@ -14856,6 +15007,159 @@ "https://www.googleapis.com/auth/cloud-platform" ] } + }, + "resources": { + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.ragCorpora.ragFiles.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "aiplatform.projects.locations.ragCorpora.ragFiles.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.ragCorpora.ragFiles.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}/operations", + "httpMethod": "GET", + "id": "aiplatform.projects.locations.ragCorpora.ragFiles.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/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+$", + "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": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "wait": { + "description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/ragCorpora/{ragCorporaId}/ragFiles/{ragFilesId}/operations/{operationsId}:wait", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.ragCorpora.ragFiles.operations.wait", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to wait on.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/ragCorpora/[^/]+/ragFiles/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + }, + "timeout": { + "description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", + "format": "google-duration", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}:wait", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } } } } @@ -18990,7 +19294,7 @@ } } }, - "revision": "20241119", + "revision": "20241203", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -19288,7 +19592,6 @@ "properties": { "encodedVideo": { "description": "Base 64 encoded video bytes.", - "format": "byte", "type": "string" }, "encoding": { @@ -23477,6 +23780,30 @@ "toolParameterKvMatchInput": { "$ref": "GoogleCloudAiplatformV1ToolParameterKVMatchInput", "description": "Input for tool parameter key value match metric." + }, + "trajectoryAnyOrderMatchInput": { + "$ref": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput", + "description": "Input for trajectory match any order metric." + }, + "trajectoryExactMatchInput": { + "$ref": "GoogleCloudAiplatformV1TrajectoryExactMatchInput", + "description": "Input for trajectory exact match metric." + }, + "trajectoryInOrderMatchInput": { + "$ref": "GoogleCloudAiplatformV1TrajectoryInOrderMatchInput", + "description": "Input for trajectory in order match metric." + }, + "trajectoryPrecisionInput": { + "$ref": "GoogleCloudAiplatformV1TrajectoryPrecisionInput", + "description": "Input for trajectory precision metric." + }, + "trajectoryRecallInput": { + "$ref": "GoogleCloudAiplatformV1TrajectoryRecallInput", + "description": "Input for trajectory recall metric." + }, + "trajectorySingleToolUseInput": { + "$ref": "GoogleCloudAiplatformV1TrajectorySingleToolUseInput", + "description": "Input for trajectory single tool use metric." } }, "type": "object" @@ -23584,6 +23911,30 @@ "toolParameterKvMatchResults": { "$ref": "GoogleCloudAiplatformV1ToolParameterKVMatchResults", "description": "Results for tool parameter key value match metric." + }, + "trajectoryAnyOrderMatchResults": { + "$ref": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults", + "description": "Result for trajectory any order match metric." + }, + "trajectoryExactMatchResults": { + "$ref": "GoogleCloudAiplatformV1TrajectoryExactMatchResults", + "description": "Result for trajectory exact match metric." + }, + "trajectoryInOrderMatchResults": { + "$ref": "GoogleCloudAiplatformV1TrajectoryInOrderMatchResults", + "description": "Result for trajectory in order match metric." + }, + "trajectoryPrecisionResults": { + "$ref": "GoogleCloudAiplatformV1TrajectoryPrecisionResults", + "description": "Result for trajectory precision metric." + }, + "trajectoryRecallResults": { + "$ref": "GoogleCloudAiplatformV1TrajectoryRecallResults", + "description": "Results for trajectory recall metric." + }, + "trajectorySingleToolUseResults": { + "$ref": "GoogleCloudAiplatformV1TrajectorySingleToolUseResults", + "description": "Results for trajectory single tool use metric." } }, "type": "object" @@ -26521,6 +26872,25 @@ "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", "type": "string" }, + "responseModalities": { + "description": "Optional. The modalities of the response.", + "items": { + "enum": [ + "MODALITY_UNSPECIFIED", + "TEXT", + "IMAGE", + "AUDIO" + ], + "enumDescriptions": [ + "Unspecified modality. Will be processed as text.", + "Text modality.", + "Image modality.", + "Audio modality." + ], + "type": "string" + }, + "type": "array" + }, "responseSchema": { "$ref": "GoogleCloudAiplatformV1Schema", "description": "Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response." @@ -26534,6 +26904,10 @@ "format": "int32", "type": "integer" }, + "speechConfig": { + "$ref": "GoogleCloudAiplatformV1SpeechConfig", + "description": "Optional. The speech generation config." + }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -26546,6 +26920,22 @@ "format": "float", "type": "number" }, + "tokenResolution": { + "description": "Optional. If specified, the token resolution specified will be used.", + "enum": [ + "TOKEN_RESOLUTION_UNSPECIFIED", + "TOKEN_RESOLUTION_LOW", + "TOKEN_RESOLUTION_MEDIUM", + "TOKEN_RESOLUTION_HIGH" + ], + "enumDescriptions": [ + "Token resolution has not been set.", + "Token resolution set to low (64 tokens).", + "Token resolution set to medium (256 tokens).", + "Token resolution set to high (P\u0026S with 256 tokens)." + ], + "type": "string" + }, "topK": { "description": "Optional. If specified, top-k sampling will be used.", "format": "float", @@ -27262,6 +27652,10 @@ "$ref": "GoogleCloudAiplatformV1RagFileTransformationConfig", "description": "Specifies the transformation config for RagFiles." }, + "sharePointSources": { + "$ref": "GoogleCloudAiplatformV1SharePointSources", + "description": "SharePoint sources." + }, "slackSource": { "$ref": "GoogleCloudAiplatformV1SlackSource", "description": "Slack channels with their corresponding access tokens." @@ -28859,6 +29253,7 @@ "NVIDIA_A100_80GB", "NVIDIA_L4", "NVIDIA_H100_80GB", + "NVIDIA_H100_MEGA_80GB", "TPU_V2", "TPU_V3", "TPU_V4_POD", @@ -28878,6 +29273,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -28891,6 +29287,7 @@ "Nvidia A100 80GB GPU.", "Nvidia L4 GPU.", "Nvidia H100 80Gb GPU.", + "Nvidia H100 Mega 80Gb GPU.", "TPU v2.", "TPU v3.", "TPU v4.", @@ -31556,6 +31953,11 @@ "readOnly": true, "type": "string" }, + "dataPersistentDiskSpec": { + "$ref": "GoogleCloudAiplatformV1PersistentDiskSpec", + "description": "Output only. The specification of persistent disk attached to the notebook runtime as data disk storage.", + "readOnly": true + }, "description": { "description": "The description of the NotebookRuntime.", "type": "string" @@ -31569,6 +31971,11 @@ "description": "Output only. Customer-managed encryption key spec for the notebook runtime.", "readOnly": true }, + "eucConfig": { + "$ref": "GoogleCloudAiplatformV1NotebookEucConfig", + "description": "Output only. EUC configuration of the notebook runtime.", + "readOnly": true + }, "expirationTime": { "description": "Output only. Timestamp when this NotebookRuntime will be expired: 1. System Predefined NotebookRuntime: 24 hours after creation. After expiration, system predifined runtime will be deleted. 2. User created NotebookRuntime: 6 months after last upgrade. After expiration, user created runtime will be stopped and allowed for upgrade.", "format": "google-datetime", @@ -31607,11 +32014,21 @@ "description": "The labels with user-defined metadata to organize your NotebookRuntime. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one NotebookRuntime (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with \"aiplatform.googleapis.com/\" and are immutable. Following system labels exist for NotebookRuntime: * \"aiplatform.googleapis.com/notebook_runtime_gce_instance_id\": output only, its value is the Compute Engine instance id. * \"aiplatform.googleapis.com/colab_enterprise_entry_service\": its value is either \"bigquery\" or \"vertex\"; if absent, it should be \"vertex\". This is to describe the entry service, either BigQuery or Vertex.", "type": "object" }, + "machineSpec": { + "$ref": "GoogleCloudAiplatformV1MachineSpec", + "description": "Output only. The specification of a single machine used by the notebook runtime.", + "readOnly": true + }, "name": { "description": "Output only. The resource name of the NotebookRuntime.", "readOnly": true, "type": "string" }, + "networkSpec": { + "$ref": "GoogleCloudAiplatformV1NetworkSpec", + "description": "Output only. Network spec of the notebook runtime.", + "readOnly": true + }, "networkTags": { "description": "Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).", "items": { @@ -31684,10 +32101,15 @@ "type": "boolean" }, "serviceAccount": { - "description": "Output only. The service account that the NotebookRuntime workload runs as.", + "description": "Output only. Deprecated: This field is no longer used and the \"Vertex AI Notebook Service Account\" (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is used for the runtime workload identity. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account for more details. The service account that the NotebookRuntime workload runs as.", "readOnly": true, "type": "string" }, + "shieldedVmConfig": { + "$ref": "GoogleCloudAiplatformV1ShieldedVmConfig", + "description": "Output only. Runtime Shielded VM spec.", + "readOnly": true + }, "updateTime": { "description": "Output only. Timestamp when this NotebookRuntime was most recently updated.", "format": "google-datetime", @@ -31741,7 +32163,8 @@ "description": "The idle shutdown configuration of NotebookRuntimeTemplate. This config will only be set when idle shutdown is enabled." }, "isDefault": { - "description": "Output only. The default template to use if not specified.", + "deprecated": true, + "description": "Output only. Deprecated: This field has no behavior. Use notebook_runtime_type = 'ONE_CLICK' instead. The default template to use if not specified.", "readOnly": true, "type": "boolean" }, @@ -31786,7 +32209,8 @@ "type": "string" }, "serviceAccount": { - "description": "The service account that the runtime workload runs as. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.", + "deprecated": true, + "description": "Deprecated: This field is ignored and the \"Vertex AI Notebook Service Account\" (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is used for the runtime workload identity. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account for more details. For NotebookExecutionJob, use NotebookExecutionJob.service_account instead. The service account that the runtime workload runs as. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.", "type": "string" }, "shieldedVmConfig": { @@ -32784,6 +33208,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1PrebuiltVoiceConfig": { + "description": "The configuration for the prebuilt speaker to use.", + "id": "GoogleCloudAiplatformV1PrebuiltVoiceConfig", + "properties": { + "voiceName": { + "description": "The name of the preset voice to use.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1PredefinedSplit": { "description": "Assigns input data to training, validation, and test sets based on the value of a provided key. Supported only for tabular Datasets.", "id": "GoogleCloudAiplatformV1PredefinedSplit", @@ -34119,6 +34554,10 @@ "readOnly": true, "type": "string" }, + "sharePointSources": { + "$ref": "GoogleCloudAiplatformV1SharePointSources", + "description": "The RagFile is imported from a SharePoint source." + }, "slackSource": { "$ref": "GoogleCloudAiplatformV1SlackSource", "description": "The RagFile is imported from a Slack channel." @@ -34239,6 +34678,10 @@ "$ref": "GoogleCloudAiplatformV1RagEmbeddingModelConfig", "description": "Optional. Immutable. The embedding model config of the Vector DB." }, + "ragManagedDb": { + "$ref": "GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb", + "description": "The config for the RAG-managed Vector DB." + }, "vertexVectorSearch": { "$ref": "GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch", "description": "The config for the Vertex Vector Search." @@ -34257,6 +34700,12 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb": { + "description": "The config for the default RAG-managed Vector DB.", + "id": "GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch": { "description": "The config for the Vertex Vector Search.", "id": "GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch", @@ -40045,6 +40494,64 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1SharePointSources": { + "description": "The SharePointSources to pass to ImportRagFiles.", + "id": "GoogleCloudAiplatformV1SharePointSources", + "properties": { + "sharePointSources": { + "description": "The SharePoint sources.", + "items": { + "$ref": "GoogleCloudAiplatformV1SharePointSourcesSharePointSource" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1SharePointSourcesSharePointSource": { + "description": "An individual SharePointSource.", + "id": "GoogleCloudAiplatformV1SharePointSourcesSharePointSource", + "properties": { + "clientId": { + "description": "The Application ID for the app registered in Microsoft Azure Portal. The application must also be configured with MS Graph permissions \"Files.ReadAll\", \"Sites.ReadAll\" and BrowserSiteLists.Read.All.", + "type": "string" + }, + "clientSecret": { + "$ref": "GoogleCloudAiplatformV1ApiAuthApiKeyConfig", + "description": "The application secret for the app registered in Azure." + }, + "driveId": { + "description": "The ID of the drive to download from.", + "type": "string" + }, + "driveName": { + "description": "The name of the drive to download from.", + "type": "string" + }, + "fileId": { + "description": "Output only. The SharePoint file id. Output only.", + "readOnly": true, + "type": "string" + }, + "sharepointFolderId": { + "description": "The ID of the SharePoint folder to download from.", + "type": "string" + }, + "sharepointFolderPath": { + "description": "The path of the SharePoint folder to download from.", + "type": "string" + }, + "sharepointSiteName": { + "description": "The name of the SharePoint site to download from. This can be the site name or the site id.", + "type": "string" + }, + "tenantId": { + "description": "Unique identifier of the Azure Active Directory Instance.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1ShieldedVmConfig": { "description": "A set of Shielded Instance options. See [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).", "id": "GoogleCloudAiplatformV1ShieldedVmConfig", @@ -40173,6 +40680,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1SpeechConfig": { + "description": "The speech generation config.", + "id": "GoogleCloudAiplatformV1SpeechConfig", + "properties": { + "voiceConfig": { + "$ref": "GoogleCloudAiplatformV1VoiceConfig", + "description": "The configuration for the speaker to use." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1StartNotebookRuntimeOperationMetadata": { "description": "Metadata information for NotebookService.StartNotebookRuntime.", "id": "GoogleCloudAiplatformV1StartNotebookRuntimeOperationMetadata", @@ -41960,6 +42478,10 @@ }, "type": "array" }, + "googleSearch": { + "$ref": "GoogleCloudAiplatformV1ToolGoogleSearch", + "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google." + }, "googleSearchRetrieval": { "$ref": "GoogleCloudAiplatformV1GoogleSearchRetrieval", "description": "Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search." @@ -41971,6 +42493,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1ToolCall": { + "description": "Spec for tool call.", + "id": "GoogleCloudAiplatformV1ToolCall", + "properties": { + "toolInput": { + "description": "Optional. Spec for tool input", + "type": "string" + }, + "toolName": { + "description": "Required. Spec for tool name", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1ToolCallValidInput": { "description": "Input for tool call valid metric.", "id": "GoogleCloudAiplatformV1ToolCallValidInput", @@ -42049,6 +42586,12 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1ToolGoogleSearch": { + "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.", + "id": "GoogleCloudAiplatformV1ToolGoogleSearch", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1ToolNameMatchInput": { "description": "Input for tool name match metric.", "id": "GoogleCloudAiplatformV1ToolNameMatchInput", @@ -42379,6 +42922,423 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1Trajectory": { + "description": "Spec for trajectory.", + "id": "GoogleCloudAiplatformV1Trajectory", + "properties": { + "toolCalls": { + "description": "Required. Tool calls in the trajectory.", + "items": { + "$ref": "GoogleCloudAiplatformV1ToolCall" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput": { + "description": "Instances and metric spec for TrajectoryAnyOrderMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryAnyOrderMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec", + "description": "Required. Spec for TrajectoryAnyOrderMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance": { + "description": "Spec for TrajectoryAnyOrderMatch instance.", + "id": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue": { + "description": "TrajectoryAnyOrderMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryAnyOrderMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults": { + "description": "Results for TrajectoryAnyOrderMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults", + "properties": { + "trajectoryAnyOrderMatchMetricValues": { + "description": "Output only. TrajectoryAnyOrderMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec": { + "description": "Spec for TrajectoryAnyOrderMatch metric - returns 1 if all tool calls in the reference trajectory appear in the predicted trajectory in any order, else 0.", + "id": "GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryExactMatchInput": { + "description": "Instances and metric spec for TrajectoryExactMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryExactMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryExactMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryExactMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectoryExactMatchSpec", + "description": "Required. Spec for TrajectoryExactMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryExactMatchInstance": { + "description": "Spec for TrajectoryExactMatch instance.", + "id": "GoogleCloudAiplatformV1TrajectoryExactMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue": { + "description": "TrajectoryExactMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryExactMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryExactMatchResults": { + "description": "Results for TrajectoryExactMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryExactMatchResults", + "properties": { + "trajectoryExactMatchMetricValues": { + "description": "Output only. TrajectoryExactMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryExactMatchSpec": { + "description": "Spec for TrajectoryExactMatch metric - returns 1 if tool calls in the reference trajectory exactly match the predicted trajectory, else 0.", + "id": "GoogleCloudAiplatformV1TrajectoryExactMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryInOrderMatchInput": { + "description": "Instances and metric spec for TrajectoryInOrderMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryInOrderMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryInOrderMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec", + "description": "Required. Spec for TrajectoryInOrderMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance": { + "description": "Spec for TrajectoryInOrderMatch instance.", + "id": "GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue": { + "description": "TrajectoryInOrderMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryInOrderMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryInOrderMatchResults": { + "description": "Results for TrajectoryInOrderMatch metric.", + "id": "GoogleCloudAiplatformV1TrajectoryInOrderMatchResults", + "properties": { + "trajectoryInOrderMatchMetricValues": { + "description": "Output only. TrajectoryInOrderMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec": { + "description": "Spec for TrajectoryInOrderMatch metric - returns 1 if tool calls in the reference trajectory appear in the predicted trajectory in the same order, else 0.", + "id": "GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryPrecisionInput": { + "description": "Instances and metric spec for TrajectoryPrecision metric.", + "id": "GoogleCloudAiplatformV1TrajectoryPrecisionInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryPrecision instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryPrecisionInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectoryPrecisionSpec", + "description": "Required. Spec for TrajectoryPrecision metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryPrecisionInstance": { + "description": "Spec for TrajectoryPrecision instance.", + "id": "GoogleCloudAiplatformV1TrajectoryPrecisionInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue": { + "description": "TrajectoryPrecision metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryPrecision score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryPrecisionResults": { + "description": "Results for TrajectoryPrecision metric.", + "id": "GoogleCloudAiplatformV1TrajectoryPrecisionResults", + "properties": { + "trajectoryPrecisionMetricValues": { + "description": "Output only. TrajectoryPrecision metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryPrecisionSpec": { + "description": "Spec for TrajectoryPrecision metric - returns a float score based on average precision of individual tool calls.", + "id": "GoogleCloudAiplatformV1TrajectoryPrecisionSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryRecallInput": { + "description": "Instances and metric spec for TrajectoryRecall metric.", + "id": "GoogleCloudAiplatformV1TrajectoryRecallInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryRecall instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryRecallInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectoryRecallSpec", + "description": "Required. Spec for TrajectoryRecall metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryRecallInstance": { + "description": "Spec for TrajectoryRecall instance.", + "id": "GoogleCloudAiplatformV1TrajectoryRecallInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryRecallMetricValue": { + "description": "TrajectoryRecall metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectoryRecallMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryRecall score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryRecallResults": { + "description": "Results for TrajectoryRecall metric.", + "id": "GoogleCloudAiplatformV1TrajectoryRecallResults", + "properties": { + "trajectoryRecallMetricValues": { + "description": "Output only. TrajectoryRecall metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectoryRecallMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectoryRecallSpec": { + "description": "Spec for TrajectoryRecall metric - returns a float score based on average recall of individual tool calls.", + "id": "GoogleCloudAiplatformV1TrajectoryRecallSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectorySingleToolUseInput": { + "description": "Instances and metric spec for TrajectorySingleToolUse metric.", + "id": "GoogleCloudAiplatformV1TrajectorySingleToolUseInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectorySingleToolUse instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectorySingleToolUseInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1TrajectorySingleToolUseSpec", + "description": "Required. Spec for TrajectorySingleToolUse metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectorySingleToolUseInstance": { + "description": "Spec for TrajectorySingleToolUse instance.", + "id": "GoogleCloudAiplatformV1TrajectorySingleToolUseInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue": { + "description": "TrajectorySingleToolUse metric value for an instance.", + "id": "GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectorySingleToolUse score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectorySingleToolUseResults": { + "description": "Results for TrajectorySingleToolUse metric.", + "id": "GoogleCloudAiplatformV1TrajectorySingleToolUseResults", + "properties": { + "trajectorySingleToolUseMetricValues": { + "description": "Output only. TrajectorySingleToolUse metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1TrajectorySingleToolUseSpec": { + "description": "Spec for TrajectorySingleToolUse metric - returns 1 if tool is present in the predicted trajectory, else 0.", + "id": "GoogleCloudAiplatformV1TrajectorySingleToolUseSpec", + "properties": { + "toolName": { + "description": "Required. Spec for tool name to be checked for in the predicted trajectory.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1Trial": { "description": "A message representing a Trial. A Trial contains a unique set of Parameters that has been or will be evaluated, along with the objective metrics got by running the Trial.", "id": "GoogleCloudAiplatformV1Trial", @@ -43183,6 +44143,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1VoiceConfig": { + "description": "The configuration for the voice to use.", + "id": "GoogleCloudAiplatformV1VoiceConfig", + "properties": { + "prebuiltVoiceConfig": { + "$ref": "GoogleCloudAiplatformV1PrebuiltVoiceConfig", + "description": "The configuration for the prebuilt voice to use." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1WorkerPoolSpec": { "description": "Represents the spec of a worker pool in a job.", "id": "GoogleCloudAiplatformV1WorkerPoolSpec", diff --git a/aiplatform/v1/aiplatform-gen.go b/aiplatform/v1/aiplatform-gen.go index c556f82603c..c4076a8c31c 100644 --- a/aiplatform/v1/aiplatform-gen.go +++ b/aiplatform/v1/aiplatform-gen.go @@ -1174,6 +1174,7 @@ type ProjectsLocationsPublishersModelsService struct { func NewProjectsLocationsRagCorporaService(s *Service) *ProjectsLocationsRagCorporaService { rs := &ProjectsLocationsRagCorporaService{s: s} + rs.Operations = NewProjectsLocationsRagCorporaOperationsService(s) rs.RagFiles = NewProjectsLocationsRagCorporaRagFilesService(s) return rs } @@ -1181,16 +1182,39 @@ func NewProjectsLocationsRagCorporaService(s *Service) *ProjectsLocationsRagCorp type ProjectsLocationsRagCorporaService struct { s *Service + Operations *ProjectsLocationsRagCorporaOperationsService + RagFiles *ProjectsLocationsRagCorporaRagFilesService } +func NewProjectsLocationsRagCorporaOperationsService(s *Service) *ProjectsLocationsRagCorporaOperationsService { + rs := &ProjectsLocationsRagCorporaOperationsService{s: s} + return rs +} + +type ProjectsLocationsRagCorporaOperationsService struct { + s *Service +} + func NewProjectsLocationsRagCorporaRagFilesService(s *Service) *ProjectsLocationsRagCorporaRagFilesService { rs := &ProjectsLocationsRagCorporaRagFilesService{s: s} + rs.Operations = NewProjectsLocationsRagCorporaRagFilesOperationsService(s) return rs } type ProjectsLocationsRagCorporaRagFilesService struct { s *Service + + Operations *ProjectsLocationsRagCorporaRagFilesOperationsService +} + +func NewProjectsLocationsRagCorporaRagFilesOperationsService(s *Service) *ProjectsLocationsRagCorporaRagFilesOperationsService { + rs := &ProjectsLocationsRagCorporaRagFilesOperationsService{s: s} + return rs +} + +type ProjectsLocationsRagCorporaRagFilesOperationsService struct { + s *Service } func NewProjectsLocationsReasoningEnginesService(s *Service) *ProjectsLocationsReasoningEnginesService { @@ -7877,6 +7901,18 @@ type GoogleCloudAiplatformV1EvaluateInstancesRequest struct { ToolParameterKeyMatchInput *GoogleCloudAiplatformV1ToolParameterKeyMatchInput `json:"toolParameterKeyMatchInput,omitempty"` // ToolParameterKvMatchInput: Input for tool parameter key value match metric. ToolParameterKvMatchInput *GoogleCloudAiplatformV1ToolParameterKVMatchInput `json:"toolParameterKvMatchInput,omitempty"` + // TrajectoryAnyOrderMatchInput: Input for trajectory match any order metric. + TrajectoryAnyOrderMatchInput *GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput `json:"trajectoryAnyOrderMatchInput,omitempty"` + // TrajectoryExactMatchInput: Input for trajectory exact match metric. + TrajectoryExactMatchInput *GoogleCloudAiplatformV1TrajectoryExactMatchInput `json:"trajectoryExactMatchInput,omitempty"` + // TrajectoryInOrderMatchInput: Input for trajectory in order match metric. + TrajectoryInOrderMatchInput *GoogleCloudAiplatformV1TrajectoryInOrderMatchInput `json:"trajectoryInOrderMatchInput,omitempty"` + // TrajectoryPrecisionInput: Input for trajectory precision metric. + TrajectoryPrecisionInput *GoogleCloudAiplatformV1TrajectoryPrecisionInput `json:"trajectoryPrecisionInput,omitempty"` + // TrajectoryRecallInput: Input for trajectory recall metric. + TrajectoryRecallInput *GoogleCloudAiplatformV1TrajectoryRecallInput `json:"trajectoryRecallInput,omitempty"` + // TrajectorySingleToolUseInput: Input for trajectory single tool use metric. + TrajectorySingleToolUseInput *GoogleCloudAiplatformV1TrajectorySingleToolUseInput `json:"trajectorySingleToolUseInput,omitempty"` // ForceSendFields is a list of field names (e.g. "BleuInput") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -7958,6 +7994,20 @@ type GoogleCloudAiplatformV1EvaluateInstancesResponse struct { // ToolParameterKvMatchResults: Results for tool parameter key value match // metric. ToolParameterKvMatchResults *GoogleCloudAiplatformV1ToolParameterKVMatchResults `json:"toolParameterKvMatchResults,omitempty"` + // TrajectoryAnyOrderMatchResults: Result for trajectory any order match + // metric. + TrajectoryAnyOrderMatchResults *GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults `json:"trajectoryAnyOrderMatchResults,omitempty"` + // TrajectoryExactMatchResults: Result for trajectory exact match metric. + TrajectoryExactMatchResults *GoogleCloudAiplatformV1TrajectoryExactMatchResults `json:"trajectoryExactMatchResults,omitempty"` + // TrajectoryInOrderMatchResults: Result for trajectory in order match metric. + TrajectoryInOrderMatchResults *GoogleCloudAiplatformV1TrajectoryInOrderMatchResults `json:"trajectoryInOrderMatchResults,omitempty"` + // TrajectoryPrecisionResults: Result for trajectory precision metric. + TrajectoryPrecisionResults *GoogleCloudAiplatformV1TrajectoryPrecisionResults `json:"trajectoryPrecisionResults,omitempty"` + // TrajectoryRecallResults: Results for trajectory recall metric. + TrajectoryRecallResults *GoogleCloudAiplatformV1TrajectoryRecallResults `json:"trajectoryRecallResults,omitempty"` + // TrajectorySingleToolUseResults: Results for trajectory single tool use + // metric. + TrajectorySingleToolUseResults *GoogleCloudAiplatformV1TrajectorySingleToolUseResults `json:"trajectorySingleToolUseResults,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -12314,6 +12364,14 @@ type GoogleCloudAiplatformV1GenerationConfig struct { // prompted to output the appropriate response type, otherwise the behavior is // undefined. This is a preview feature. ResponseMimeType string `json:"responseMimeType,omitempty"` + // ResponseModalities: Optional. The modalities of the response. + // + // Possible values: + // "MODALITY_UNSPECIFIED" - Unspecified modality. Will be processed as text. + // "TEXT" - Text modality. + // "IMAGE" - Image modality. + // "AUDIO" - Audio modality. + ResponseModalities []string `json:"responseModalities,omitempty"` // ResponseSchema: Optional. The `Schema` object allows the definition of input // and output data types. These types can be objects, but also primitives and // arrays. Represents a select subset of an OpenAPI 3.0 schema object @@ -12325,10 +12383,22 @@ type GoogleCloudAiplatformV1GenerationConfig struct { RoutingConfig *GoogleCloudAiplatformV1GenerationConfigRoutingConfig `json:"routingConfig,omitempty"` // Seed: Optional. Seed. Seed int64 `json:"seed,omitempty"` + // SpeechConfig: Optional. The speech generation config. + SpeechConfig *GoogleCloudAiplatformV1SpeechConfig `json:"speechConfig,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. Temperature float64 `json:"temperature,omitempty"` + // TokenResolution: Optional. If specified, the token resolution specified will + // be used. + // + // Possible values: + // "TOKEN_RESOLUTION_UNSPECIFIED" - Token resolution has not been set. + // "TOKEN_RESOLUTION_LOW" - Token resolution set to low (64 tokens). + // "TOKEN_RESOLUTION_MEDIUM" - Token resolution set to medium (256 tokens). + // "TOKEN_RESOLUTION_HIGH" - Token resolution set to high (P&S with 256 + // tokens). + TokenResolution string `json:"tokenResolution,omitempty"` // TopK: Optional. If specified, top-k sampling will be used. TopK float64 `json:"topK,omitempty"` // TopP: Optional. If specified, nucleus sampling will be used. @@ -13285,6 +13355,8 @@ type GoogleCloudAiplatformV1ImportRagFilesConfig struct { // RagFileTransformationConfig: Specifies the transformation config for // RagFiles. RagFileTransformationConfig *GoogleCloudAiplatformV1RagFileTransformationConfig `json:"ragFileTransformationConfig,omitempty"` + // SharePointSources: SharePoint sources. + SharePointSources *GoogleCloudAiplatformV1SharePointSources `json:"sharePointSources,omitempty"` // SlackSource: Slack channels with their corresponding access tokens. SlackSource *GoogleCloudAiplatformV1SlackSource `json:"slackSource,omitempty"` // ForceSendFields is a list of field names (e.g. "GcsSource") to @@ -15713,6 +15785,7 @@ type GoogleCloudAiplatformV1MachineSpec struct { // "NVIDIA_A100_80GB" - Nvidia A100 80GB GPU. // "NVIDIA_L4" - Nvidia L4 GPU. // "NVIDIA_H100_80GB" - Nvidia H100 80Gb GPU. + // "NVIDIA_H100_MEGA_80GB" - Nvidia H100 Mega 80Gb GPU. // "TPU_V2" - TPU v2. // "TPU_V3" - TPU v3. // "TPU_V4_POD" - TPU v4. @@ -19373,6 +19446,9 @@ func (s GoogleCloudAiplatformV1NotebookIdleShutdownConfig) MarshalJSON() ([]byte type GoogleCloudAiplatformV1NotebookRuntime struct { // CreateTime: Output only. Timestamp when this NotebookRuntime was created. CreateTime string `json:"createTime,omitempty"` + // DataPersistentDiskSpec: Output only. The specification of persistent disk + // attached to the notebook runtime as data disk storage. + DataPersistentDiskSpec *GoogleCloudAiplatformV1PersistentDiskSpec `json:"dataPersistentDiskSpec,omitempty"` // Description: The description of the NotebookRuntime. Description string `json:"description,omitempty"` // DisplayName: Required. The display name of the NotebookRuntime. The name can @@ -19381,6 +19457,8 @@ type GoogleCloudAiplatformV1NotebookRuntime struct { // EncryptionSpec: Output only. Customer-managed encryption key spec for the // notebook runtime. EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` + // EucConfig: Output only. EUC configuration of the notebook runtime. + EucConfig *GoogleCloudAiplatformV1NotebookEucConfig `json:"eucConfig,omitempty"` // ExpirationTime: Output only. Timestamp when this NotebookRuntime will be // expired: 1. System Predefined NotebookRuntime: 24 hours after creation. // After expiration, system predifined runtime will be deleted. 2. User created @@ -19415,8 +19493,13 @@ type GoogleCloudAiplatformV1NotebookRuntime struct { // either "bigquery" or "vertex"; if absent, it should be "vertex". This is to // describe the entry service, either BigQuery or Vertex. Labels map[string]string `json:"labels,omitempty"` + // MachineSpec: Output only. The specification of a single machine used by the + // notebook runtime. + MachineSpec *GoogleCloudAiplatformV1MachineSpec `json:"machineSpec,omitempty"` // Name: Output only. The resource name of the NotebookRuntime. Name string `json:"name,omitempty"` + // NetworkSpec: Output only. Network spec of the notebook runtime. + NetworkSpec *GoogleCloudAiplatformV1NetworkSpec `json:"networkSpec,omitempty"` // NetworkTags: Optional. The Compute Engine tags to add to runtime (see // Tagging instances // (https://cloud.google.com/vpc/docs/add-remove-network-tags)). @@ -19456,9 +19539,16 @@ type GoogleCloudAiplatformV1NotebookRuntime struct { SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` // SatisfiesPzs: Output only. Reserved for future use. SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // ServiceAccount: Output only. The service account that the NotebookRuntime - // workload runs as. + // ServiceAccount: Output only. Deprecated: This field is no longer used and + // the "Vertex AI Notebook Service Account" + // (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is + // used for the runtime workload identity. See + // https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account + // for more details. The service account that the NotebookRuntime workload runs + // as. ServiceAccount string `json:"serviceAccount,omitempty"` + // ShieldedVmConfig: Output only. Runtime Shielded VM spec. + ShieldedVmConfig *GoogleCloudAiplatformV1ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` // UpdateTime: Output only. Timestamp when this NotebookRuntime was most // recently updated. UpdateTime string `json:"updateTime,omitempty"` @@ -19514,7 +19604,9 @@ type GoogleCloudAiplatformV1NotebookRuntimeTemplate struct { // NotebookRuntimeTemplate. This config will only be set when idle shutdown is // enabled. IdleShutdownConfig *GoogleCloudAiplatformV1NotebookIdleShutdownConfig `json:"idleShutdownConfig,omitempty"` - // IsDefault: Output only. The default template to use if not specified. + // IsDefault: Output only. Deprecated: This field has no behavior. Use + // notebook_runtime_type = 'ONE_CLICK' instead. The default template to use if + // not specified. IsDefault bool `json:"isDefault,omitempty"` // Labels: The labels with user-defined metadata to organize the // NotebookRuntimeTemplates. Label keys and values can be no longer than 64 @@ -19543,10 +19635,16 @@ type GoogleCloudAiplatformV1NotebookRuntimeTemplate struct { // user. // "ONE_CLICK" - runtime or template with system defined configurations. NotebookRuntimeType string `json:"notebookRuntimeType,omitempty"` - // ServiceAccount: The service account that the runtime workload runs as. You - // can use any service account within the same project, but you must have the - // service account user permission to use the instance. If not specified, the - // Compute Engine default service account + // ServiceAccount: Deprecated: This field is ignored and the "Vertex AI + // Notebook Service Account" + // (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is + // used for the runtime workload identity. See + // https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account + // for more details. For NotebookExecutionJob, use + // NotebookExecutionJob.service_account instead. The service account that the + // runtime workload runs as. You can use any service account within the same + // project, but you must have the service account user permission to use the + // instance. If not specified, the Compute Engine default service account // (https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) // is used. ServiceAccount string `json:"serviceAccount,omitempty"` @@ -20784,6 +20882,29 @@ func (s GoogleCloudAiplatformV1Port) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1PrebuiltVoiceConfig: The configuration for the +// prebuilt speaker to use. +type GoogleCloudAiplatformV1PrebuiltVoiceConfig struct { + // VoiceName: The name of the preset voice to use. + VoiceName string `json:"voiceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "VoiceName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VoiceName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1PrebuiltVoiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1PrebuiltVoiceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1PredefinedSplit: Assigns input data to training, // validation, and test sets based on the value of a provided key. Supported // only for tabular Datasets. @@ -22698,6 +22819,8 @@ type GoogleCloudAiplatformV1RagFile struct { JiraSource *GoogleCloudAiplatformV1JiraSource `json:"jiraSource,omitempty"` // Name: Output only. The resource name of the RagFile. Name string `json:"name,omitempty"` + // SharePointSources: The RagFile is imported from a SharePoint source. + SharePointSources *GoogleCloudAiplatformV1SharePointSources `json:"sharePointSources,omitempty"` // SlackSource: The RagFile is imported from a Slack channel. SlackSource *GoogleCloudAiplatformV1SlackSource `json:"slackSource,omitempty"` // UpdateTime: Output only. Timestamp when this RagFile was last updated. @@ -22897,6 +23020,8 @@ type GoogleCloudAiplatformV1RagVectorDbConfig struct { // RagEmbeddingModelConfig: Optional. Immutable. The embedding model config of // the Vector DB. RagEmbeddingModelConfig *GoogleCloudAiplatformV1RagEmbeddingModelConfig `json:"ragEmbeddingModelConfig,omitempty"` + // RagManagedDb: The config for the RAG-managed Vector DB. + RagManagedDb *GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb `json:"ragManagedDb,omitempty"` // VertexVectorSearch: The config for the Vertex Vector Search. VertexVectorSearch *GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch `json:"vertexVectorSearch,omitempty"` // ForceSendFields is a list of field names (e.g. "ApiAuth") to unconditionally @@ -22940,6 +23065,11 @@ func (s GoogleCloudAiplatformV1RagVectorDbConfigPinecone) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb: The config for the +// default RAG-managed Vector DB. +type GoogleCloudAiplatformV1RagVectorDbConfigRagManagedDb struct { +} + // GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch: The config for // the Vertex Vector Search. type GoogleCloudAiplatformV1RagVectorDbConfigVertexVectorSearch struct { @@ -32060,6 +32190,71 @@ func (s GoogleCloudAiplatformV1ServiceAccountSpec) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1SharePointSources: The SharePointSources to pass to +// ImportRagFiles. +type GoogleCloudAiplatformV1SharePointSources struct { + // SharePointSources: The SharePoint sources. + SharePointSources []*GoogleCloudAiplatformV1SharePointSourcesSharePointSource `json:"sharePointSources,omitempty"` + // ForceSendFields is a list of field names (e.g. "SharePointSources") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SharePointSources") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SharePointSources) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SharePointSources + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1SharePointSourcesSharePointSource: An individual +// SharePointSource. +type GoogleCloudAiplatformV1SharePointSourcesSharePointSource struct { + // ClientId: The Application ID for the app registered in Microsoft Azure + // Portal. The application must also be configured with MS Graph permissions + // "Files.ReadAll", "Sites.ReadAll" and BrowserSiteLists.Read.All. + ClientId string `json:"clientId,omitempty"` + // ClientSecret: The application secret for the app registered in Azure. + ClientSecret *GoogleCloudAiplatformV1ApiAuthApiKeyConfig `json:"clientSecret,omitempty"` + // DriveId: The ID of the drive to download from. + DriveId string `json:"driveId,omitempty"` + // DriveName: The name of the drive to download from. + DriveName string `json:"driveName,omitempty"` + // FileId: Output only. The SharePoint file id. Output only. + FileId string `json:"fileId,omitempty"` + // SharepointFolderId: The ID of the SharePoint folder to download from. + SharepointFolderId string `json:"sharepointFolderId,omitempty"` + // SharepointFolderPath: The path of the SharePoint folder to download from. + SharepointFolderPath string `json:"sharepointFolderPath,omitempty"` + // SharepointSiteName: The name of the SharePoint site to download from. This + // can be the site name or the site id. + SharepointSiteName string `json:"sharepointSiteName,omitempty"` + // TenantId: Unique identifier of the Azure Active Directory Instance. + TenantId string `json:"tenantId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClientId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ClientId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SharePointSourcesSharePointSource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SharePointSourcesSharePointSource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1ShieldedVmConfig: A set of Shielded Instance options. // See Images using supported Shielded VM features // (https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). @@ -32274,6 +32469,28 @@ func (s GoogleCloudAiplatformV1SpecialistPool) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1SpeechConfig: The speech generation config. +type GoogleCloudAiplatformV1SpeechConfig struct { + // VoiceConfig: The configuration for the speaker to use. + VoiceConfig *GoogleCloudAiplatformV1VoiceConfig `json:"voiceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "VoiceConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VoiceConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1SpeechConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1SpeechConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1StartNotebookRuntimeOperationMetadata: Metadata // information for NotebookService.StartNotebookRuntime. type GoogleCloudAiplatformV1StartNotebookRuntimeOperationMetadata struct { @@ -34734,6 +34951,9 @@ type GoogleCloudAiplatformV1Tool struct { // will generate the final response back to the user. Maximum 128 function // declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1FunctionDeclaration `json:"functionDeclarations,omitempty"` + // GoogleSearch: Optional. GoogleSearch tool type. Tool to support Google + // Search in Model. Powered by Google. + GoogleSearch *GoogleCloudAiplatformV1ToolGoogleSearch `json:"googleSearch,omitempty"` // GoogleSearchRetrieval: Optional. GoogleSearchRetrieval tool type. // Specialized retrieval tool that is powered by Google search. GoogleSearchRetrieval *GoogleCloudAiplatformV1GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` @@ -34759,6 +34979,30 @@ func (s GoogleCloudAiplatformV1Tool) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1ToolCall: Spec for tool call. +type GoogleCloudAiplatformV1ToolCall struct { + // ToolInput: Optional. Spec for tool input + ToolInput string `json:"toolInput,omitempty"` + // ToolName: Required. Spec for tool name + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolInput") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ToolInput") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1ToolCall) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1ToolCall + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1ToolCallValidInput: Input for tool call valid metric. type GoogleCloudAiplatformV1ToolCallValidInput struct { // Instances: Required. Repeated tool call valid instances. @@ -34895,6 +35139,11 @@ func (s GoogleCloudAiplatformV1ToolConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1ToolGoogleSearch: GoogleSearch tool type. Tool to +// support Google Search in Model. Powered by Google. +type GoogleCloudAiplatformV1ToolGoogleSearch struct { +} + // GoogleCloudAiplatformV1ToolNameMatchInput: Input for tool name match metric. type GoogleCloudAiplatformV1ToolNameMatchInput struct { // Instances: Required. Repeated tool name match instances. @@ -35411,2194 +35660,5858 @@ func (s GoogleCloudAiplatformV1TrainingPipeline) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1Trial: A message representing a Trial. A Trial -// contains a unique set of Parameters that has been or will be evaluated, -// along with the objective metrics got by running the Trial. -type GoogleCloudAiplatformV1Trial struct { - // ClientId: Output only. The identifier of the client that originally - // requested this Trial. Each client is identified by a unique client_id. When - // a client asks for a suggestion, Vertex AI Vizier will assign it a Trial. The - // client should evaluate the Trial, complete it, and report back to Vertex AI - // Vizier. If suggestion is asked again by same client_id before the Trial is - // completed, the same Trial will be returned. Multiple clients with different - // client_ids can ask for suggestions simultaneously, each of them will get - // their own Trial. - ClientId string `json:"clientId,omitempty"` - // CustomJob: Output only. The CustomJob name linked to the Trial. It's set for - // a HyperparameterTuningJob's Trial. - CustomJob string `json:"customJob,omitempty"` - // EndTime: Output only. Time when the Trial's status changed to `SUCCEEDED` or - // `INFEASIBLE`. - EndTime string `json:"endTime,omitempty"` - // FinalMeasurement: Output only. The final measurement containing the - // objective value. - FinalMeasurement *GoogleCloudAiplatformV1Measurement `json:"finalMeasurement,omitempty"` - // Id: Output only. The identifier of the Trial assigned by the service. - Id string `json:"id,omitempty"` - // InfeasibleReason: Output only. A human readable string describing why the - // Trial is infeasible. This is set only if Trial state is `INFEASIBLE`. - InfeasibleReason string `json:"infeasibleReason,omitempty"` - // Measurements: Output only. A list of measurements that are strictly - // lexicographically ordered by their induced tuples (steps, elapsed_duration). - // These are used for early stopping computations. - Measurements []*GoogleCloudAiplatformV1Measurement `json:"measurements,omitempty"` - // Name: Output only. Resource name of the Trial assigned by the service. - Name string `json:"name,omitempty"` - // Parameters: Output only. The parameters of the Trial. - Parameters []*GoogleCloudAiplatformV1TrialParameter `json:"parameters,omitempty"` - // StartTime: Output only. Time when the Trial was started. - StartTime string `json:"startTime,omitempty"` - // State: Output only. The detailed state of the Trial. - // - // Possible values: - // "STATE_UNSPECIFIED" - The Trial state is unspecified. - // "REQUESTED" - Indicates that a specific Trial has been requested, but it - // has not yet been suggested by the service. - // "ACTIVE" - Indicates that the Trial has been suggested. - // "STOPPING" - Indicates that the Trial should stop according to the - // service. - // "SUCCEEDED" - Indicates that the Trial is completed successfully. - // "INFEASIBLE" - Indicates that the Trial should not be attempted again. The - // service will set a Trial to INFEASIBLE when it's done but missing the - // final_measurement. - State string `json:"state,omitempty"` - // WebAccessUris: Output only. URIs for accessing interactive shells - // (https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) - // (one URI for each training node). Only available if this trial is part of a - // HyperparameterTuningJob and the job's trial_job_spec.enable_web_access field - // is `true`. The keys are names of each node used for the trial; for example, - // `workerpool0-0` for the primary node, `workerpool1-0` for the first node in - // the second worker pool, and `workerpool1-1` for the second node in the - // second worker pool. The values are the URIs for each node's interactive - // shell. - WebAccessUris map[string]string `json:"webAccessUris,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ClientId") to +// GoogleCloudAiplatformV1Trajectory: Spec for trajectory. +type GoogleCloudAiplatformV1Trajectory struct { + // ToolCalls: Required. Tool calls in the trajectory. + ToolCalls []*GoogleCloudAiplatformV1ToolCall `json:"toolCalls,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolCalls") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ClientId") to include in API + // NullFields is a list of field names (e.g. "ToolCalls") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1Trial) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1Trial +func (s GoogleCloudAiplatformV1Trajectory) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Trajectory return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type GoogleCloudAiplatformV1TrialContext struct { - // Description: A human-readable field which can store a description of this - // context. This will become part of the resulting Trial's description field. - Description string `json:"description,omitempty"` - // Parameters: If/when a Trial is generated or selected from this Context, its - // Parameters will match any parameters specified here. (I.e. if this context - // specifies parameter name:'a' int_value:3, then a resulting Trial will have - // int_value:3 for its parameter named 'a'.) Note that we first attempt to - // match existing REQUESTED Trials with contexts, and if there are no matches, - // we generate suggestions in the subspace defined by the parameters specified - // here. NOTE: a Context without any Parameters matches the entire feasible - // search space. - Parameters []*GoogleCloudAiplatformV1TrialParameter `json:"parameters,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to +// GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput: Instances and metric +// spec for TrajectoryAnyOrderMatch metric. +type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput struct { + // Instances: Required. Repeated TrajectoryAnyOrderMatch instance. + Instances []*GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryAnyOrderMatch metric. + MetricSpec *GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API + // NullFields is a list of field names (e.g. "Instances") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TrialContext) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TrialContext +func (s GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1TrialParameter: A message representing a parameter to -// be tuned. -type GoogleCloudAiplatformV1TrialParameter struct { - // ParameterId: Output only. The ID of the parameter. The parameter should be - // defined in StudySpec's Parameters. - ParameterId string `json:"parameterId,omitempty"` - // Value: Output only. The value of the parameter. `number_value` will be set - // if a parameter defined in StudySpec is in type 'INTEGER', 'DOUBLE' or - // 'DISCRETE'. `string_value` will be set if a parameter defined in StudySpec - // is in type 'CATEGORICAL'. - Value interface{} `json:"value,omitempty"` - // ForceSendFields is a list of field names (e.g. "ParameterId") to +// GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance: Spec for +// TrajectoryAnyOrderMatch instance. +type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ParameterId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TrialParameter) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TrialParameter +func (s GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryAnyOrderMatchInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1TunedModel: The Model Registry Model and Online -// Prediction Endpoint assiociated with this TuningJob. -type GoogleCloudAiplatformV1TunedModel struct { - // Endpoint: Output only. A resource name of an Endpoint. Format: - // `projects/{project}/locations/{location}/endpoints/{endpoint}`. - Endpoint string `json:"endpoint,omitempty"` - // Model: Output only. The resource name of the TunedModel. Format: - // `projects/{project}/locations/{location}/models/{model}`. - Model string `json:"model,omitempty"` - // ForceSendFields is a list of field names (e.g. "Endpoint") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue: +// TrajectoryAnyOrderMatch metric value for an instance. +type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue struct { + // Score: Output only. TrajectoryAnyOrderMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Endpoint") to include in API + // NullFields is a list of field names (e.g. "Score") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TunedModel) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TunedModel +func (s GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1TunedModelRef: TunedModel Reference for legacy model -// migration. -type GoogleCloudAiplatformV1TunedModelRef struct { - // PipelineJob: Support migration from tuning job list page, from bison model - // to gemini model. - PipelineJob string `json:"pipelineJob,omitempty"` - // TunedModel: Support migration from model registry. - TunedModel string `json:"tunedModel,omitempty"` - // TuningJob: Support migration from tuning job list page, from - // gemini-1.0-pro-002 to 1.5 and above. - TuningJob string `json:"tuningJob,omitempty"` - // ForceSendFields is a list of field names (e.g. "PipelineJob") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +func (s *GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults: Results for +// TrajectoryAnyOrderMatch metric. +type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults struct { + // TrajectoryAnyOrderMatchMetricValues: Output only. TrajectoryAnyOrderMatch + // metric values. + TrajectoryAnyOrderMatchMetricValues []*GoogleCloudAiplatformV1TrajectoryAnyOrderMatchMetricValue `json:"trajectoryAnyOrderMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryAnyOrderMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PipelineJob") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + // NullFields is a list of field names (e.g. + // "TrajectoryAnyOrderMatchMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TunedModelRef) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TunedModelRef +func (s GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryAnyOrderMatchResults return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1TuningDataStats: The tuning data statistic values for -// TuningJob. -type GoogleCloudAiplatformV1TuningDataStats struct { - // SupervisedTuningDataStats: The SFT Tuning data stats. - SupervisedTuningDataStats *GoogleCloudAiplatformV1SupervisedTuningDataStats `json:"supervisedTuningDataStats,omitempty"` - // ForceSendFields is a list of field names (e.g. "SupervisedTuningDataStats") - // to unconditionally include in API requests. By default, fields with empty or +// GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec: Spec for +// TrajectoryAnyOrderMatch metric - returns 1 if all tool calls in the +// reference trajectory appear in the predicted trajectory in any order, else +// 0. +type GoogleCloudAiplatformV1TrajectoryAnyOrderMatchSpec struct { +} + +// GoogleCloudAiplatformV1TrajectoryExactMatchInput: Instances and metric spec +// for TrajectoryExactMatch metric. +type GoogleCloudAiplatformV1TrajectoryExactMatchInput struct { + // Instances: Required. Repeated TrajectoryExactMatch instance. + Instances []*GoogleCloudAiplatformV1TrajectoryExactMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryExactMatch metric. + MetricSpec *GoogleCloudAiplatformV1TrajectoryExactMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SupervisedTuningDataStats") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TuningDataStats) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TuningDataStats +func (s GoogleCloudAiplatformV1TrajectoryExactMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryExactMatchInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1TuningJob: Represents a TuningJob that runs with -// Google owned models. -type GoogleCloudAiplatformV1TuningJob struct { - // BaseModel: The base model that is being tuned, e.g., "gemini-1.0-pro-002". . - BaseModel string `json:"baseModel,omitempty"` - // CreateTime: Output only. Time when the TuningJob was created. - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. The description of the TuningJob. - Description string `json:"description,omitempty"` - // EncryptionSpec: Customer-managed encryption key options for a TuningJob. If - // this is set, then all resources created by the TuningJob will be encrypted - // with the provided encryption key. - EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` - // EndTime: Output only. Time when the TuningJob entered any of the following - // JobStates: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, - // `JOB_STATE_EXPIRED`. - EndTime string `json:"endTime,omitempty"` - // Error: Output only. Only populated when job's state is `JOB_STATE_FAILED` or - // `JOB_STATE_CANCELLED`. - Error *GoogleRpcStatus `json:"error,omitempty"` - // Experiment: Output only. The Experiment associated with this TuningJob. - Experiment string `json:"experiment,omitempty"` - // Labels: Optional. The labels with user-defined metadata to organize - // TuningJob and generated resources such as Model and Endpoint. Label keys and - // values can be no longer than 64 characters (Unicode codepoints), can only - // contain lowercase letters, numeric characters, underscores and dashes. - // International characters are allowed. See https://goo.gl/xmQnxf for more - // information and examples of labels. - Labels map[string]string `json:"labels,omitempty"` - // Name: Output only. Identifier. Resource name of a TuningJob. Format: - // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` - Name string `json:"name,omitempty"` - // ServiceAccount: The service account that the tuningJob workload runs as. If - // not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project - // will be used. See - // https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent - // Users starting the pipeline must have the `iam.serviceAccounts.actAs` - // permission on this service account. - ServiceAccount string `json:"serviceAccount,omitempty"` - // StartTime: Output only. Time when the TuningJob for the first time entered - // the `JOB_STATE_RUNNING` state. - StartTime string `json:"startTime,omitempty"` - // State: Output only. The detailed state of the job. - // - // Possible values: - // "JOB_STATE_UNSPECIFIED" - The job state is unspecified. - // "JOB_STATE_QUEUED" - The job has been just created or resumed and - // processing has not yet begun. - // "JOB_STATE_PENDING" - The service is preparing to run the job. - // "JOB_STATE_RUNNING" - The job is in progress. - // "JOB_STATE_SUCCEEDED" - The job completed successfully. - // "JOB_STATE_FAILED" - The job failed. - // "JOB_STATE_CANCELLING" - The job is being cancelled. From this state the - // job may only go to either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or - // `JOB_STATE_CANCELLED`. - // "JOB_STATE_CANCELLED" - The job has been cancelled. - // "JOB_STATE_PAUSED" - The job has been stopped, and can be resumed. - // "JOB_STATE_EXPIRED" - The job has expired. - // "JOB_STATE_UPDATING" - The job is being updated. Only jobs in the - // `RUNNING` state can be updated. After updating, the job goes back to the - // `RUNNING` state. - // "JOB_STATE_PARTIALLY_SUCCEEDED" - The job is partially succeeded, some - // results may be missing due to errors. - State string `json:"state,omitempty"` - // SupervisedTuningSpec: Tuning Spec for Supervised Fine Tuning. - SupervisedTuningSpec *GoogleCloudAiplatformV1SupervisedTuningSpec `json:"supervisedTuningSpec,omitempty"` - // TunedModel: Output only. The tuned model resources assiociated with this - // TuningJob. - TunedModel *GoogleCloudAiplatformV1TunedModel `json:"tunedModel,omitempty"` - // TunedModelDisplayName: Optional. The display name of the TunedModel. The - // name can be up to 128 characters long and can consist of any UTF-8 - // characters. - TunedModelDisplayName string `json:"tunedModelDisplayName,omitempty"` - // TuningDataStats: Output only. The tuning data statistics associated with - // this TuningJob. - TuningDataStats *GoogleCloudAiplatformV1TuningDataStats `json:"tuningDataStats,omitempty"` - // UpdateTime: Output only. Time when the TuningJob was most recently updated. - UpdateTime string `json:"updateTime,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "BaseModel") to +// GoogleCloudAiplatformV1TrajectoryExactMatchInstance: Spec for +// TrajectoryExactMatch instance. +type GoogleCloudAiplatformV1TrajectoryExactMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BaseModel") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1TuningJob) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1TuningJob +func (s GoogleCloudAiplatformV1TrajectoryExactMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryExactMatchInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UndeployIndexOperationMetadata: Runtime operation -// information for IndexEndpointService.UndeployIndex. -type GoogleCloudAiplatformV1UndeployIndexOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue: TrajectoryExactMatch +// metric value for an instance. +type GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue struct { + // Score: Output only. TrajectoryExactMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UndeployIndexOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UndeployIndexOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UndeployIndexRequest: Request message for -// IndexEndpointService.UndeployIndex. -type GoogleCloudAiplatformV1UndeployIndexRequest struct { - // DeployedIndexId: Required. The ID of the DeployedIndex to be undeployed from - // the IndexEndpoint. - DeployedIndexId string `json:"deployedIndexId,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeployedIndexId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +func (s *GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1TrajectoryExactMatchResults: Results for +// TrajectoryExactMatch metric. +type GoogleCloudAiplatformV1TrajectoryExactMatchResults struct { + // TrajectoryExactMatchMetricValues: Output only. TrajectoryExactMatch metric + // values. + TrajectoryExactMatchMetricValues []*GoogleCloudAiplatformV1TrajectoryExactMatchMetricValue `json:"trajectoryExactMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryExactMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeployedIndexId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + // NullFields is a list of field names (e.g. + // "TrajectoryExactMatchMetricValues") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UndeployIndexRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UndeployIndexRequest +func (s GoogleCloudAiplatformV1TrajectoryExactMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryExactMatchResults return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UndeployIndexResponse: Response message for -// IndexEndpointService.UndeployIndex. -type GoogleCloudAiplatformV1UndeployIndexResponse struct { +// GoogleCloudAiplatformV1TrajectoryExactMatchSpec: Spec for +// TrajectoryExactMatch metric - returns 1 if tool calls in the reference +// trajectory exactly match the predicted trajectory, else 0. +type GoogleCloudAiplatformV1TrajectoryExactMatchSpec struct { } -// GoogleCloudAiplatformV1UndeployModelOperationMetadata: Runtime operation -// information for EndpointService.UndeployModel. -type GoogleCloudAiplatformV1UndeployModelOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectoryInOrderMatchInput: Instances and metric +// spec for TrajectoryInOrderMatch metric. +type GoogleCloudAiplatformV1TrajectoryInOrderMatchInput struct { + // Instances: Required. Repeated TrajectoryInOrderMatch instance. + Instances []*GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryInOrderMatch metric. + MetricSpec *GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UndeployModelOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UndeployModelOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryInOrderMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryInOrderMatchInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UndeployModelRequest: Request message for -// EndpointService.UndeployModel. -type GoogleCloudAiplatformV1UndeployModelRequest struct { - // DeployedModelId: Required. The ID of the DeployedModel to be undeployed from - // the Endpoint. - DeployedModelId string `json:"deployedModelId,omitempty"` - // TrafficSplit: If this field is provided, then the Endpoint's traffic_split - // will be overwritten with it. If last DeployedModel is being undeployed from - // the Endpoint, the [Endpoint.traffic_split] will always end up empty when - // this call returns. A DeployedModel will be successfully undeployed only if - // it doesn't have any traffic assigned to it when this method executes, or if - // this field unassigns any traffic to it. - TrafficSplit map[string]int64 `json:"trafficSplit,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeployedModelId") to +// GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance: Spec for +// TrajectoryInOrderMatch instance. +type GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeployedModelId") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UndeployModelRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UndeployModelRequest +func (s GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryInOrderMatchInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UndeployModelResponse: Response message for -// EndpointService.UndeployModel. -type GoogleCloudAiplatformV1UndeployModelResponse struct { -} - -// GoogleCloudAiplatformV1UnmanagedContainerModel: Contains model information -// necessary to perform batch prediction without requiring a full model import. -type GoogleCloudAiplatformV1UnmanagedContainerModel struct { - // ArtifactUri: The path to the directory containing the Model artifact and any - // of its supporting files. - ArtifactUri string `json:"artifactUri,omitempty"` - // ContainerSpec: Input only. The specification of the container that is to be - // used when deploying this Model. - ContainerSpec *GoogleCloudAiplatformV1ModelContainerSpec `json:"containerSpec,omitempty"` - // PredictSchemata: Contains the schemata used in Model's predictions and - // explanations - PredictSchemata *GoogleCloudAiplatformV1PredictSchemata `json:"predictSchemata,omitempty"` - // ForceSendFields is a list of field names (e.g. "ArtifactUri") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue: +// TrajectoryInOrderMatch metric value for an instance. +type GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue struct { + // Score: Output only. TrajectoryInOrderMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ArtifactUri") to include in API + // NullFields is a list of field names (e.g. "Score") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UnmanagedContainerModel) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UnmanagedContainerModel +func (s GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata: -// Runtime operation information for UpdateDeploymentResourcePool method. -type GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. +func (s *GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1TrajectoryInOrderMatchResults: Results for +// TrajectoryInOrderMatch metric. +type GoogleCloudAiplatformV1TrajectoryInOrderMatchResults struct { + // TrajectoryInOrderMatchMetricValues: Output only. TrajectoryInOrderMatch + // metric values. + TrajectoryInOrderMatchMetricValues []*GoogleCloudAiplatformV1TrajectoryInOrderMatchMetricValue `json:"trajectoryInOrderMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryInOrderMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "TrajectoryInOrderMatchMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryInOrderMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryInOrderMatchResults return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest: Request message for -// EndpointService.UpdateEndpointLongRunning. -type GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest struct { - // Endpoint: Required. The Endpoint which replaces the resource on the server. - // Currently we only support updating the `client_connection_config` field, all - // the other fields' update will be blocked. - Endpoint *GoogleCloudAiplatformV1Endpoint `json:"endpoint,omitempty"` - // ForceSendFields is a list of field names (e.g. "Endpoint") to +// GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec: Spec for +// TrajectoryInOrderMatch metric - returns 1 if tool calls in the reference +// trajectory appear in the predicted trajectory in the same order, else 0. +type GoogleCloudAiplatformV1TrajectoryInOrderMatchSpec struct { +} + +// GoogleCloudAiplatformV1TrajectoryPrecisionInput: Instances and metric spec +// for TrajectoryPrecision metric. +type GoogleCloudAiplatformV1TrajectoryPrecisionInput struct { + // Instances: Required. Repeated TrajectoryPrecision instance. + Instances []*GoogleCloudAiplatformV1TrajectoryPrecisionInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryPrecision metric. + MetricSpec *GoogleCloudAiplatformV1TrajectoryPrecisionSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Endpoint") to include in API + // NullFields is a list of field names (e.g. "Instances") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest +func (s GoogleCloudAiplatformV1TrajectoryPrecisionInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryPrecisionInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata: Runtime -// operation information for ModelService.UpdateExplanationDataset. -type GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata struct { - // GenericMetadata: The common part of the operation metadata. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectoryPrecisionInstance: Spec for +// TrajectoryPrecision instance. +type GoogleCloudAiplatformV1TrajectoryPrecisionInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryPrecisionInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryPrecisionInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateExplanationDatasetRequest: Request message for -// ModelService.UpdateExplanationDataset. -type GoogleCloudAiplatformV1UpdateExplanationDatasetRequest struct { - // Examples: The example config containing the location of the dataset. - Examples *GoogleCloudAiplatformV1Examples `json:"examples,omitempty"` - // ForceSendFields is a list of field names (e.g. "Examples") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue: TrajectoryPrecision +// metric value for an instance. +type GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue struct { + // Score: Output only. TrajectoryPrecision score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Examples") to include in API + // NullFields is a list of field names (e.g. "Score") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateExplanationDatasetRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateExplanationDatasetRequest +func (s GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateExplanationDatasetResponse: Response message of -// ModelService.UpdateExplanationDataset operation. -type GoogleCloudAiplatformV1UpdateExplanationDatasetResponse struct { +func (s *GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil } -// GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata: Details of -// operations that perform update FeatureGroup. -type GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata struct { - // GenericMetadata: Operation metadata for FeatureGroup. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryPrecisionResults: Results for +// TrajectoryPrecision metric. +type GoogleCloudAiplatformV1TrajectoryPrecisionResults struct { + // TrajectoryPrecisionMetricValues: Output only. TrajectoryPrecision metric + // values. + TrajectoryPrecisionMetricValues []*GoogleCloudAiplatformV1TrajectoryPrecisionMetricValue `json:"trajectoryPrecisionMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryPrecisionMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "TrajectoryPrecisionMetricValues") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryPrecisionResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryPrecisionResults return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata: Details of -// operations that perform update FeatureOnlineStore. -type GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata struct { - // GenericMetadata: Operation metadata for FeatureOnlineStore. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectoryPrecisionSpec: Spec for TrajectoryPrecision +// metric - returns a float score based on average precision of individual tool +// calls. +type GoogleCloudAiplatformV1TrajectoryPrecisionSpec struct { +} + +// GoogleCloudAiplatformV1TrajectoryRecallInput: Instances and metric spec for +// TrajectoryRecall metric. +type GoogleCloudAiplatformV1TrajectoryRecallInput struct { + // Instances: Required. Repeated TrajectoryRecall instance. + Instances []*GoogleCloudAiplatformV1TrajectoryRecallInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryRecall metric. + MetricSpec *GoogleCloudAiplatformV1TrajectoryRecallSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryRecallInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryRecallInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateFeatureOperationMetadata: Details of operations -// that perform update Feature. -type GoogleCloudAiplatformV1UpdateFeatureOperationMetadata struct { - // GenericMetadata: Operation metadata for Feature Update. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectoryRecallInstance: Spec for TrajectoryRecall +// instance. +type GoogleCloudAiplatformV1TrajectoryRecallInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateFeatureOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateFeatureOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryRecallInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryRecallInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata: Details of -// operations that perform update FeatureView. -type GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata struct { - // GenericMetadata: Operation metadata for FeatureView Update. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectoryRecallMetricValue: TrajectoryRecall metric +// value for an instance. +type GoogleCloudAiplatformV1TrajectoryRecallMetricValue struct { + // Score: Output only. TrajectoryRecall score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata +func (s GoogleCloudAiplatformV1TrajectoryRecallMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryRecallMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata: Details of -// operations that perform update Featurestore. -type GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata struct { - // GenericMetadata: Operation metadata for Featurestore. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +func (s *GoogleCloudAiplatformV1TrajectoryRecallMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectoryRecallMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1TrajectoryRecallResults: Results for TrajectoryRecall +// metric. +type GoogleCloudAiplatformV1TrajectoryRecallResults struct { + // TrajectoryRecallMetricValues: Output only. TrajectoryRecall metric values. + TrajectoryRecallMetricValues []*GoogleCloudAiplatformV1TrajectoryRecallMetricValue `json:"trajectoryRecallMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryRecallMetricValues") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TrajectoryRecallMetricValues") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1TrajectoryRecallResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectoryRecallResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1TrajectoryRecallSpec: Spec for TrajectoryRecall +// metric - returns a float score based on average recall of individual tool +// calls. +type GoogleCloudAiplatformV1TrajectoryRecallSpec struct { +} + +// GoogleCloudAiplatformV1TrajectorySingleToolUseInput: Instances and metric +// spec for TrajectorySingleToolUse metric. +type GoogleCloudAiplatformV1TrajectorySingleToolUseInput struct { + // Instances: Required. Repeated TrajectorySingleToolUse instance. + Instances []*GoogleCloudAiplatformV1TrajectorySingleToolUseInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectorySingleToolUse metric. + MetricSpec *GoogleCloudAiplatformV1TrajectorySingleToolUseSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata +func (s GoogleCloudAiplatformV1TrajectorySingleToolUseInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseInput return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateIndexOperationMetadata: Runtime operation -// information for IndexService.UpdateIndex. -type GoogleCloudAiplatformV1UpdateIndexOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // NearestNeighborSearchOperationMetadata: The operation metadata with regard - // to Matching Engine Index operation. - NearestNeighborSearchOperationMetadata *GoogleCloudAiplatformV1NearestNeighborSearchOperationMetadata `json:"nearestNeighborSearchOperationMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectorySingleToolUseInstance: Spec for +// TrajectorySingleToolUse instance. +type GoogleCloudAiplatformV1TrajectorySingleToolUseInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1Trajectory `json:"predictedTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateIndexOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateIndexOperationMetadata +func (s GoogleCloudAiplatformV1TrajectorySingleToolUseInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseInstance return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata: -// Runtime operation information for -// JobService.UpdateModelDeploymentMonitoringJob. -type GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +// GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue: +// TrajectorySingleToolUse metric value for an instance. +type GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue struct { + // Score: Output only. TrajectorySingleToolUse score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata +func (s GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata: Details of -// operations that perform update PersistentResource. -type GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata struct { - // GenericMetadata: Operation metadata for PersistentResource. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ProgressMessage: Progress Message for Update LRO - ProgressMessage string `json:"progressMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See +func (s *GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1TrajectorySingleToolUseResults: Results for +// TrajectorySingleToolUse metric. +type GoogleCloudAiplatformV1TrajectorySingleToolUseResults struct { + // TrajectorySingleToolUseMetricValues: Output only. TrajectorySingleToolUse + // metric values. + TrajectorySingleToolUseMetricValues []*GoogleCloudAiplatformV1TrajectorySingleToolUseMetricValue `json:"trajectorySingleToolUseMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectorySingleToolUseMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + // NullFields is a list of field names (e.g. + // "TrajectorySingleToolUseMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata +func (s GoogleCloudAiplatformV1TrajectorySingleToolUseResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseResults return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata: Runtime -// operation metadata for SpecialistPoolService.UpdateSpecialistPool. -type GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // SpecialistPool: Output only. The name of the SpecialistPool to which the - // specialists are being added. Format: - // `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_po - // ol}` - SpecialistPool string `json:"specialistPool,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrajectorySingleToolUseSpec: Spec for +// TrajectorySingleToolUse metric - returns 1 if tool is present in the +// predicted trajectory, else 0. +type GoogleCloudAiplatformV1TrajectorySingleToolUseSpec struct { + // ToolName: Required. Spec for tool name to be checked for in the predicted + // trajectory. + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolName") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ToolName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata +func (s GoogleCloudAiplatformV1TrajectorySingleToolUseSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrajectorySingleToolUseSpec return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata: Details of -// operations that perform update Tensorboard. -type GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata struct { - // GenericMetadata: Operation metadata for Tensorboard. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1Trial: A message representing a Trial. A Trial +// contains a unique set of Parameters that has been or will be evaluated, +// along with the objective metrics got by running the Trial. +type GoogleCloudAiplatformV1Trial struct { + // ClientId: Output only. The identifier of the client that originally + // requested this Trial. Each client is identified by a unique client_id. When + // a client asks for a suggestion, Vertex AI Vizier will assign it a Trial. The + // client should evaluate the Trial, complete it, and report back to Vertex AI + // Vizier. If suggestion is asked again by same client_id before the Trial is + // completed, the same Trial will be returned. Multiple clients with different + // client_ids can ask for suggestions simultaneously, each of them will get + // their own Trial. + ClientId string `json:"clientId,omitempty"` + // CustomJob: Output only. The CustomJob name linked to the Trial. It's set for + // a HyperparameterTuningJob's Trial. + CustomJob string `json:"customJob,omitempty"` + // EndTime: Output only. Time when the Trial's status changed to `SUCCEEDED` or + // `INFEASIBLE`. + EndTime string `json:"endTime,omitempty"` + // FinalMeasurement: Output only. The final measurement containing the + // objective value. + FinalMeasurement *GoogleCloudAiplatformV1Measurement `json:"finalMeasurement,omitempty"` + // Id: Output only. The identifier of the Trial assigned by the service. + Id string `json:"id,omitempty"` + // InfeasibleReason: Output only. A human readable string describing why the + // Trial is infeasible. This is set only if Trial state is `INFEASIBLE`. + InfeasibleReason string `json:"infeasibleReason,omitempty"` + // Measurements: Output only. A list of measurements that are strictly + // lexicographically ordered by their induced tuples (steps, elapsed_duration). + // These are used for early stopping computations. + Measurements []*GoogleCloudAiplatformV1Measurement `json:"measurements,omitempty"` + // Name: Output only. Resource name of the Trial assigned by the service. + Name string `json:"name,omitempty"` + // Parameters: Output only. The parameters of the Trial. + Parameters []*GoogleCloudAiplatformV1TrialParameter `json:"parameters,omitempty"` + // StartTime: Output only. Time when the Trial was started. + StartTime string `json:"startTime,omitempty"` + // State: Output only. The detailed state of the Trial. + // + // Possible values: + // "STATE_UNSPECIFIED" - The Trial state is unspecified. + // "REQUESTED" - Indicates that a specific Trial has been requested, but it + // has not yet been suggested by the service. + // "ACTIVE" - Indicates that the Trial has been suggested. + // "STOPPING" - Indicates that the Trial should stop according to the + // service. + // "SUCCEEDED" - Indicates that the Trial is completed successfully. + // "INFEASIBLE" - Indicates that the Trial should not be attempted again. The + // service will set a Trial to INFEASIBLE when it's done but missing the + // final_measurement. + State string `json:"state,omitempty"` + // WebAccessUris: Output only. URIs for accessing interactive shells + // (https://cloud.google.com/vertex-ai/docs/training/monitor-debug-interactive-shell) + // (one URI for each training node). Only available if this trial is part of a + // HyperparameterTuningJob and the job's trial_job_spec.enable_web_access field + // is `true`. The keys are names of each node used for the trial; for example, + // `workerpool0-0` for the primary node, `workerpool1-0` for the first node in + // the second worker pool, and `workerpool1-1` for the second node in the + // second worker pool. The values are the URIs for each node's interactive + // shell. + WebAccessUris map[string]string `json:"webAccessUris,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "ClientId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ClientId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata +func (s GoogleCloudAiplatformV1Trial) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Trial return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata: Metadata -// information for NotebookService.UpgradeNotebookRuntime. -type GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata struct { - // GenericMetadata: The operation generic information. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ProgressMessage: A human-readable message that shows the intermediate - // progress details of NotebookRuntime. - ProgressMessage string `json:"progressMessage,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +type GoogleCloudAiplatformV1TrialContext struct { + // Description: A human-readable field which can store a description of this + // context. This will become part of the resulting Trial's description field. + Description string `json:"description,omitempty"` + // Parameters: If/when a Trial is generated or selected from this Context, its + // Parameters will match any parameters specified here. (I.e. if this context + // specifies parameter name:'a' int_value:3, then a resulting Trial will have + // int_value:3 for its parameter named 'a'.) Note that we first attempt to + // match existing REQUESTED Trials with contexts, and if there are no matches, + // we generate suggestions in the subspace defined by the parameters specified + // here. NOTE: a Context without any Parameters matches the entire feasible + // search space. + Parameters []*GoogleCloudAiplatformV1TrialParameter `json:"parameters,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "Description") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata +func (s GoogleCloudAiplatformV1TrialContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrialContext return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest: Request message for -// NotebookService.UpgradeNotebookRuntime. -type GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest struct { -} - -// GoogleCloudAiplatformV1UploadModelOperationMetadata: Details of -// ModelService.UploadModel operation. -type GoogleCloudAiplatformV1UploadModelOperationMetadata struct { - // GenericMetadata: The common part of the operation metadata. - GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` - // ForceSendFields is a list of field names (e.g. "GenericMetadata") to +// GoogleCloudAiplatformV1TrialParameter: A message representing a parameter to +// be tuned. +type GoogleCloudAiplatformV1TrialParameter struct { + // ParameterId: Output only. The ID of the parameter. The parameter should be + // defined in StudySpec's Parameters. + ParameterId string `json:"parameterId,omitempty"` + // Value: Output only. The value of the parameter. `number_value` will be set + // if a parameter defined in StudySpec is in type 'INTEGER', 'DOUBLE' or + // 'DISCRETE'. `string_value` will be set if a parameter defined in StudySpec + // is in type 'CATEGORICAL'. + Value interface{} `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "ParameterId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GenericMetadata") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ParameterId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadModelOperationMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadModelOperationMetadata +func (s GoogleCloudAiplatformV1TrialParameter) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TrialParameter return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UploadModelRequest: Request message for -// ModelService.UploadModel. -type GoogleCloudAiplatformV1UploadModelRequest struct { - // Model: Required. The Model to create. - Model *GoogleCloudAiplatformV1Model `json:"model,omitempty"` - // ModelId: Optional. The ID to use for the uploaded Model, which will become - // the final component of the model resource name. This value may be up to 63 - // characters, and valid characters are `[a-z0-9_-]`. The first character - // cannot be a number or hyphen. - ModelId string `json:"modelId,omitempty"` - // ParentModel: Optional. The resource name of the model into which to upload - // the version. Only specify this field when uploading a new version. - ParentModel string `json:"parentModel,omitempty"` - // ServiceAccount: Optional. The user-provided custom service account to use to - // do the model upload. If empty, Vertex AI Service Agent - // (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) - // will be used to access resources needed to upload the model. This account - // must belong to the target project where the model is uploaded to, i.e., the - // project specified in the `parent` field of this request and have necessary - // read permissions (to Google Cloud Storage, Artifact Registry, etc.). - ServiceAccount string `json:"serviceAccount,omitempty"` - // ForceSendFields is a list of field names (e.g. "Model") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudAiplatformV1TunedModel: The Model Registry Model and Online +// Prediction Endpoint assiociated with this TuningJob. +type GoogleCloudAiplatformV1TunedModel struct { + // Endpoint: Output only. A resource name of an Endpoint. Format: + // `projects/{project}/locations/{location}/endpoints/{endpoint}`. + Endpoint string `json:"endpoint,omitempty"` + // Model: Output only. The resource name of the TunedModel. Format: + // `projects/{project}/locations/{location}/models/{model}`. + Model string `json:"model,omitempty"` + // ForceSendFields is a list of field names (e.g. "Endpoint") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Model") to include in API + // NullFields is a list of field names (e.g. "Endpoint") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadModelRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadModelRequest +func (s GoogleCloudAiplatformV1TunedModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TunedModel return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UploadModelResponse: Response message of -// ModelService.UploadModel operation. -type GoogleCloudAiplatformV1UploadModelResponse struct { - // Model: The name of the uploaded Model resource. Format: - // `projects/{project}/locations/{location}/models/{model}` - Model string `json:"model,omitempty"` - // ModelVersionId: Output only. The version ID of the model that is uploaded. - ModelVersionId string `json:"modelVersionId,omitempty"` - // ForceSendFields is a list of field names (e.g. "Model") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudAiplatformV1TunedModelRef: TunedModel Reference for legacy model +// migration. +type GoogleCloudAiplatformV1TunedModelRef struct { + // PipelineJob: Support migration from tuning job list page, from bison model + // to gemini model. + PipelineJob string `json:"pipelineJob,omitempty"` + // TunedModel: Support migration from model registry. + TunedModel string `json:"tunedModel,omitempty"` + // TuningJob: Support migration from tuning job list page, from + // gemini-1.0-pro-002 to 1.5 and above. + TuningJob string `json:"tuningJob,omitempty"` + // ForceSendFields is a list of field names (e.g. "PipelineJob") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Model") to include in API + // NullFields is a list of field names (e.g. "PipelineJob") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadModelResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadModelResponse +func (s GoogleCloudAiplatformV1TunedModelRef) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TunedModelRef return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UploadRagFileConfig: Config for uploading RagFile. -type GoogleCloudAiplatformV1UploadRagFileConfig struct { - // RagFileTransformationConfig: Specifies the transformation config for - // RagFiles. - RagFileTransformationConfig *GoogleCloudAiplatformV1RagFileTransformationConfig `json:"ragFileTransformationConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RagFileTransformationConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. +// GoogleCloudAiplatformV1TuningDataStats: The tuning data statistic values for +// TuningJob. +type GoogleCloudAiplatformV1TuningDataStats struct { + // SupervisedTuningDataStats: The SFT Tuning data stats. + SupervisedTuningDataStats *GoogleCloudAiplatformV1SupervisedTuningDataStats `json:"supervisedTuningDataStats,omitempty"` + // ForceSendFields is a list of field names (e.g. "SupervisedTuningDataStats") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RagFileTransformationConfig") to + // NullFields is a list of field names (e.g. "SupervisedTuningDataStats") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadRagFileConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadRagFileConfig +func (s GoogleCloudAiplatformV1TuningDataStats) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TuningDataStats return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UploadRagFileRequest: Request message for -// VertexRagDataService.UploadRagFile. -type GoogleCloudAiplatformV1UploadRagFileRequest struct { - // RagFile: Required. The RagFile to upload. - RagFile *GoogleCloudAiplatformV1RagFile `json:"ragFile,omitempty"` - // UploadRagFileConfig: Required. The config for the RagFiles to be uploaded - // into the RagCorpus. VertexRagDataService.UploadRagFile. - UploadRagFileConfig *GoogleCloudAiplatformV1UploadRagFileConfig `json:"uploadRagFileConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "RagFile") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudAiplatformV1TuningJob: Represents a TuningJob that runs with +// Google owned models. +type GoogleCloudAiplatformV1TuningJob struct { + // BaseModel: The base model that is being tuned, e.g., "gemini-1.0-pro-002". . + BaseModel string `json:"baseModel,omitempty"` + // CreateTime: Output only. Time when the TuningJob was created. + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. The description of the TuningJob. + Description string `json:"description,omitempty"` + // EncryptionSpec: Customer-managed encryption key options for a TuningJob. If + // this is set, then all resources created by the TuningJob will be encrypted + // with the provided encryption key. + EncryptionSpec *GoogleCloudAiplatformV1EncryptionSpec `json:"encryptionSpec,omitempty"` + // EndTime: Output only. Time when the TuningJob entered any of the following + // JobStates: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`, + // `JOB_STATE_EXPIRED`. + EndTime string `json:"endTime,omitempty"` + // Error: Output only. Only populated when job's state is `JOB_STATE_FAILED` or + // `JOB_STATE_CANCELLED`. + Error *GoogleRpcStatus `json:"error,omitempty"` + // Experiment: Output only. The Experiment associated with this TuningJob. + Experiment string `json:"experiment,omitempty"` + // Labels: Optional. The labels with user-defined metadata to organize + // TuningJob and generated resources such as Model and Endpoint. Label keys and + // values can be no longer than 64 characters (Unicode codepoints), can only + // contain lowercase letters, numeric characters, underscores and dashes. + // International characters are allowed. See https://goo.gl/xmQnxf for more + // information and examples of labels. + Labels map[string]string `json:"labels,omitempty"` + // Name: Output only. Identifier. Resource name of a TuningJob. Format: + // `projects/{project}/locations/{location}/tuningJobs/{tuning_job}` + Name string `json:"name,omitempty"` + // ServiceAccount: The service account that the tuningJob workload runs as. If + // not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project + // will be used. See + // https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent + // Users starting the pipeline must have the `iam.serviceAccounts.actAs` + // permission on this service account. + ServiceAccount string `json:"serviceAccount,omitempty"` + // StartTime: Output only. Time when the TuningJob for the first time entered + // the `JOB_STATE_RUNNING` state. + StartTime string `json:"startTime,omitempty"` + // State: Output only. The detailed state of the job. + // + // Possible values: + // "JOB_STATE_UNSPECIFIED" - The job state is unspecified. + // "JOB_STATE_QUEUED" - The job has been just created or resumed and + // processing has not yet begun. + // "JOB_STATE_PENDING" - The service is preparing to run the job. + // "JOB_STATE_RUNNING" - The job is in progress. + // "JOB_STATE_SUCCEEDED" - The job completed successfully. + // "JOB_STATE_FAILED" - The job failed. + // "JOB_STATE_CANCELLING" - The job is being cancelled. From this state the + // job may only go to either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or + // `JOB_STATE_CANCELLED`. + // "JOB_STATE_CANCELLED" - The job has been cancelled. + // "JOB_STATE_PAUSED" - The job has been stopped, and can be resumed. + // "JOB_STATE_EXPIRED" - The job has expired. + // "JOB_STATE_UPDATING" - The job is being updated. Only jobs in the + // `RUNNING` state can be updated. After updating, the job goes back to the + // `RUNNING` state. + // "JOB_STATE_PARTIALLY_SUCCEEDED" - The job is partially succeeded, some + // results may be missing due to errors. + State string `json:"state,omitempty"` + // SupervisedTuningSpec: Tuning Spec for Supervised Fine Tuning. + SupervisedTuningSpec *GoogleCloudAiplatformV1SupervisedTuningSpec `json:"supervisedTuningSpec,omitempty"` + // TunedModel: Output only. The tuned model resources assiociated with this + // TuningJob. + TunedModel *GoogleCloudAiplatformV1TunedModel `json:"tunedModel,omitempty"` + // TunedModelDisplayName: Optional. The display name of the TunedModel. The + // name can be up to 128 characters long and can consist of any UTF-8 + // characters. + TunedModelDisplayName string `json:"tunedModelDisplayName,omitempty"` + // TuningDataStats: Output only. The tuning data statistics associated with + // this TuningJob. + TuningDataStats *GoogleCloudAiplatformV1TuningDataStats `json:"tuningDataStats,omitempty"` + // UpdateTime: Output only. Time when the TuningJob was most recently updated. + UpdateTime string `json:"updateTime,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "BaseModel") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RagFile") to include in API + // NullFields is a list of field names (e.g. "BaseModel") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadRagFileRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadRagFileRequest +func (s GoogleCloudAiplatformV1TuningJob) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1TuningJob return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UploadRagFileResponse: Response message for -// VertexRagDataService.UploadRagFile. -type GoogleCloudAiplatformV1UploadRagFileResponse struct { - // Error: The error that occurred while processing the RagFile. - Error *GoogleRpcStatus `json:"error,omitempty"` - // RagFile: The RagFile that had been uploaded into the RagCorpus. - RagFile *GoogleCloudAiplatformV1RagFile `json:"ragFile,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Error") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See +// GoogleCloudAiplatformV1UndeployIndexOperationMetadata: Runtime operation +// information for IndexEndpointService.UndeployIndex. +type GoogleCloudAiplatformV1UndeployIndexOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Error") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UploadRagFileResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UploadRagFileResponse +func (s GoogleCloudAiplatformV1UndeployIndexOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UndeployIndexOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpsertDatapointsRequest: Request message for -// IndexService.UpsertDatapoints -type GoogleCloudAiplatformV1UpsertDatapointsRequest struct { - // Datapoints: A list of datapoints to be created/updated. - Datapoints []*GoogleCloudAiplatformV1IndexDatapoint `json:"datapoints,omitempty"` - // UpdateMask: Optional. Update mask is used to specify the fields to be - // overwritten in the datapoints by the update. The fields specified in the - // update_mask are relative to each IndexDatapoint inside datapoints, not the - // full request. Updatable fields: * Use `all_restricts` to update both - // restricts and numeric_restricts. - UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "Datapoints") to +// GoogleCloudAiplatformV1UndeployIndexRequest: Request message for +// IndexEndpointService.UndeployIndex. +type GoogleCloudAiplatformV1UndeployIndexRequest struct { + // DeployedIndexId: Required. The ID of the DeployedIndex to be undeployed from + // the IndexEndpoint. + DeployedIndexId string `json:"deployedIndexId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DeployedIndexId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Datapoints") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "DeployedIndexId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UpsertDatapointsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UpsertDatapointsRequest +func (s GoogleCloudAiplatformV1UndeployIndexRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UndeployIndexRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1UpsertDatapointsResponse: Response message for -// IndexService.UpsertDatapoints -type GoogleCloudAiplatformV1UpsertDatapointsResponse struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` +// GoogleCloudAiplatformV1UndeployIndexResponse: Response message for +// IndexEndpointService.UndeployIndex. +type GoogleCloudAiplatformV1UndeployIndexResponse struct { } -// GoogleCloudAiplatformV1UserActionReference: References an API call. It -// contains more information about long running operation and Jobs that are -// triggered by the API call. -type GoogleCloudAiplatformV1UserActionReference struct { - // DataLabelingJob: For API calls that start a LabelingJob. Resource name of - // the LabelingJob. Format: - // `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job} - // ` - DataLabelingJob string `json:"dataLabelingJob,omitempty"` - // Method: The method name of the API RPC call. For example, - // "/google.cloud.aiplatform.{apiVersion}.DatasetService.CreateDataset" - Method string `json:"method,omitempty"` - // Operation: For API calls that return a long running operation. Resource name - // of the long running operation. Format: - // `projects/{project}/locations/{location}/operations/{operation}` - Operation string `json:"operation,omitempty"` - // ForceSendFields is a list of field names (e.g. "DataLabelingJob") to +// GoogleCloudAiplatformV1UndeployModelOperationMetadata: Runtime operation +// information for EndpointService.UndeployModel. +type GoogleCloudAiplatformV1UndeployModelOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DataLabelingJob") to include in + // NullFields is a list of field names (e.g. "GenericMetadata") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1UserActionReference) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1UserActionReference +func (s GoogleCloudAiplatformV1UndeployModelOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UndeployModelOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1Value: Value is the value of the field. -type GoogleCloudAiplatformV1Value struct { - // DoubleValue: A double value. - DoubleValue float64 `json:"doubleValue,omitempty"` - // IntValue: An integer value. - IntValue int64 `json:"intValue,omitempty,string"` - // StringValue: A string value. - StringValue string `json:"stringValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "DoubleValue") to +// GoogleCloudAiplatformV1UndeployModelRequest: Request message for +// EndpointService.UndeployModel. +type GoogleCloudAiplatformV1UndeployModelRequest struct { + // DeployedModelId: Required. The ID of the DeployedModel to be undeployed from + // the Endpoint. + DeployedModelId string `json:"deployedModelId,omitempty"` + // TrafficSplit: If this field is provided, then the Endpoint's traffic_split + // will be overwritten with it. If last DeployedModel is being undeployed from + // the Endpoint, the [Endpoint.traffic_split] will always end up empty when + // this call returns. A DeployedModel will be successfully undeployed only if + // it doesn't have any traffic assigned to it when this method executes, or if + // this field unassigns any traffic to it. + TrafficSplit map[string]int64 `json:"trafficSplit,omitempty"` + // ForceSendFields is a list of field names (e.g. "DeployedModelId") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DoubleValue") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "DeployedModelId") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1Value) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1Value +func (s GoogleCloudAiplatformV1UndeployModelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UndeployModelRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudAiplatformV1Value) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1Value - var s1 struct { - DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.DoubleValue = float64(s1.DoubleValue) - return nil +// GoogleCloudAiplatformV1UndeployModelResponse: Response message for +// EndpointService.UndeployModel. +type GoogleCloudAiplatformV1UndeployModelResponse struct { } -// GoogleCloudAiplatformV1VertexAISearch: Retrieve from Vertex AI Search -// datastore for grounding. See https://cloud.google.com/products/agent-builder -type GoogleCloudAiplatformV1VertexAISearch struct { - // Datastore: Required. Fully-qualified Vertex AI Search data store resource - // ID. Format: - // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ - // {dataStore}` - Datastore string `json:"datastore,omitempty"` - // ForceSendFields is a list of field names (e.g. "Datastore") to +// GoogleCloudAiplatformV1UnmanagedContainerModel: Contains model information +// necessary to perform batch prediction without requiring a full model import. +type GoogleCloudAiplatformV1UnmanagedContainerModel struct { + // ArtifactUri: The path to the directory containing the Model artifact and any + // of its supporting files. + ArtifactUri string `json:"artifactUri,omitempty"` + // ContainerSpec: Input only. The specification of the container that is to be + // used when deploying this Model. + ContainerSpec *GoogleCloudAiplatformV1ModelContainerSpec `json:"containerSpec,omitempty"` + // PredictSchemata: Contains the schemata used in Model's predictions and + // explanations + PredictSchemata *GoogleCloudAiplatformV1PredictSchemata `json:"predictSchemata,omitempty"` + // ForceSendFields is a list of field names (e.g. "ArtifactUri") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Datastore") to include in API + // NullFields is a list of field names (e.g. "ArtifactUri") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1VertexAISearch) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1VertexAISearch +func (s GoogleCloudAiplatformV1UnmanagedContainerModel) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UnmanagedContainerModel return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1VertexRagStore: Retrieve from Vertex RAG Store for -// grounding. -type GoogleCloudAiplatformV1VertexRagStore struct { - // RagResources: Optional. The representation of the rag source. It can be used - // to specify corpus only or ragfiles. Currently only support one corpus or - // multiple files from one corpus. In the future we may open up multiple - // corpora support. - RagResources []*GoogleCloudAiplatformV1VertexRagStoreRagResource `json:"ragResources,omitempty"` - // RagRetrievalConfig: Optional. The retrieval config for the Rag query. - RagRetrievalConfig *GoogleCloudAiplatformV1RagRetrievalConfig `json:"ragRetrievalConfig,omitempty"` - // SimilarityTopK: Optional. Number of top k results to return from the - // selected corpora. - SimilarityTopK int64 `json:"similarityTopK,omitempty"` - // VectorDistanceThreshold: Optional. Only return results with vector distance - // smaller than the threshold. - VectorDistanceThreshold float64 `json:"vectorDistanceThreshold,omitempty"` - // ForceSendFields is a list of field names (e.g. "RagResources") to +// GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata: +// Runtime operation information for UpdateDeploymentResourcePool method. +type GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RagResources") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1VertexRagStore) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1VertexRagStore +func (s GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateDeploymentResourcePoolOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleCloudAiplatformV1VertexRagStore) UnmarshalJSON(data []byte) error { - type NoMethod GoogleCloudAiplatformV1VertexRagStore - var s1 struct { - VectorDistanceThreshold gensupport.JSONFloat64 `json:"vectorDistanceThreshold"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.VectorDistanceThreshold = float64(s1.VectorDistanceThreshold) - return nil -} - -// GoogleCloudAiplatformV1VertexRagStoreRagResource: The definition of the Rag -// resource. -type GoogleCloudAiplatformV1VertexRagStoreRagResource struct { - // RagCorpus: Optional. RagCorpora resource name. Format: - // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` - RagCorpus string `json:"ragCorpus,omitempty"` - // RagFileIds: Optional. rag_file_id. The files should be in the same - // rag_corpus set in rag_corpus field. - RagFileIds []string `json:"ragFileIds,omitempty"` - // ForceSendFields is a list of field names (e.g. "RagCorpus") to +// GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest: Request message for +// EndpointService.UpdateEndpointLongRunning. +type GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest struct { + // Endpoint: Required. The Endpoint which replaces the resource on the server. + // Currently we only support updating the `client_connection_config` field, all + // the other fields' update will be blocked. + Endpoint *GoogleCloudAiplatformV1Endpoint `json:"endpoint,omitempty"` + // ForceSendFields is a list of field names (e.g. "Endpoint") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RagCorpus") to include in API + // NullFields is a list of field names (e.g. "Endpoint") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1VertexRagStoreRagResource) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1VertexRagStoreRagResource +func (s GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1VideoMetadata: Metadata describes the input video -// content. -type GoogleCloudAiplatformV1VideoMetadata struct { - // EndOffset: Optional. The end offset of the video. - EndOffset string `json:"endOffset,omitempty"` - // StartOffset: Optional. The start offset of the video. - StartOffset string `json:"startOffset,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndOffset") to +// GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata: Runtime +// operation information for ModelService.UpdateExplanationDataset. +type GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata struct { + // GenericMetadata: The common part of the operation metadata. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndOffset") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1VideoMetadata) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1VideoMetadata +func (s GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateExplanationDatasetOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WorkerPoolSpec: Represents the spec of a worker pool -// in a job. -type GoogleCloudAiplatformV1WorkerPoolSpec struct { - // ContainerSpec: The custom container task. - ContainerSpec *GoogleCloudAiplatformV1ContainerSpec `json:"containerSpec,omitempty"` - // DiskSpec: Disk spec. - DiskSpec *GoogleCloudAiplatformV1DiskSpec `json:"diskSpec,omitempty"` - // MachineSpec: Optional. Immutable. The specification of a single machine. - MachineSpec *GoogleCloudAiplatformV1MachineSpec `json:"machineSpec,omitempty"` - // NfsMounts: Optional. List of NFS mount spec. - NfsMounts []*GoogleCloudAiplatformV1NfsMount `json:"nfsMounts,omitempty"` - // PythonPackageSpec: The Python packaged task. - PythonPackageSpec *GoogleCloudAiplatformV1PythonPackageSpec `json:"pythonPackageSpec,omitempty"` - // ReplicaCount: Optional. The number of worker replicas to use for this worker - // pool. - ReplicaCount int64 `json:"replicaCount,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "ContainerSpec") to +// GoogleCloudAiplatformV1UpdateExplanationDatasetRequest: Request message for +// ModelService.UpdateExplanationDataset. +type GoogleCloudAiplatformV1UpdateExplanationDatasetRequest struct { + // Examples: The example config containing the location of the dataset. + Examples *GoogleCloudAiplatformV1Examples `json:"examples,omitempty"` + // ForceSendFields is a list of field names (e.g. "Examples") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ContainerSpec") to include in API + // NullFields is a list of field names (e.g. "Examples") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1WorkerPoolSpec) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1WorkerPoolSpec +func (s GoogleCloudAiplatformV1UpdateExplanationDatasetRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateExplanationDatasetRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WriteFeatureValuesPayload: Contains Feature values to -// be written for a specific entity. -type GoogleCloudAiplatformV1WriteFeatureValuesPayload struct { - // EntityId: Required. The ID of the entity. - EntityId string `json:"entityId,omitempty"` - // FeatureValues: Required. Feature values to be written, mapping from Feature - // ID to value. Up to 100,000 `feature_values` entries may be written across - // all payloads. The feature generation time, aligned by days, must be no older - // than five years (1825 days) and no later than one year (366 days) in the - // future. - FeatureValues map[string]GoogleCloudAiplatformV1FeatureValue `json:"featureValues,omitempty"` - // ForceSendFields is a list of field names (e.g. "EntityId") to +// GoogleCloudAiplatformV1UpdateExplanationDatasetResponse: Response message of +// ModelService.UpdateExplanationDataset operation. +type GoogleCloudAiplatformV1UpdateExplanationDatasetResponse struct { +} + +// GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata: Details of +// operations that perform update FeatureGroup. +type GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata struct { + // GenericMetadata: Operation metadata for FeatureGroup. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EntityId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1WriteFeatureValuesPayload) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1WriteFeatureValuesPayload +func (s GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateFeatureGroupOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WriteFeatureValuesRequest: Request message for -// FeaturestoreOnlineServingService.WriteFeatureValues. -type GoogleCloudAiplatformV1WriteFeatureValuesRequest struct { - // Payloads: Required. The entities to be written. Up to 100,000 feature values - // can be written across all `payloads`. - Payloads []*GoogleCloudAiplatformV1WriteFeatureValuesPayload `json:"payloads,omitempty"` - // ForceSendFields is a list of field names (e.g. "Payloads") to +// GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata: Details of +// operations that perform update FeatureOnlineStore. +type GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata struct { + // GenericMetadata: Operation metadata for FeatureOnlineStore. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Payloads") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1WriteFeatureValuesRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1WriteFeatureValuesRequest +func (s GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateFeatureOnlineStoreOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WriteFeatureValuesResponse: Response message for -// FeaturestoreOnlineServingService.WriteFeatureValues. -type GoogleCloudAiplatformV1WriteFeatureValuesResponse struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` -} - -// GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest: Request -// message for TensorboardService.WriteTensorboardExperimentData. -type GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest struct { - // WriteRunDataRequests: Required. Requests containing per-run - // TensorboardTimeSeries data to write. - WriteRunDataRequests []*GoogleCloudAiplatformV1WriteTensorboardRunDataRequest `json:"writeRunDataRequests,omitempty"` - // ForceSendFields is a list of field names (e.g. "WriteRunDataRequests") to +// GoogleCloudAiplatformV1UpdateFeatureOperationMetadata: Details of operations +// that perform update Feature. +type GoogleCloudAiplatformV1UpdateFeatureOperationMetadata struct { + // GenericMetadata: Operation metadata for Feature Update. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "WriteRunDataRequests") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest +func (s GoogleCloudAiplatformV1UpdateFeatureOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateFeatureOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WriteTensorboardExperimentDataResponse: Response -// message for TensorboardService.WriteTensorboardExperimentData. -type GoogleCloudAiplatformV1WriteTensorboardExperimentDataResponse struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` -} - -// GoogleCloudAiplatformV1WriteTensorboardRunDataRequest: Request message for -// TensorboardService.WriteTensorboardRunData. -type GoogleCloudAiplatformV1WriteTensorboardRunDataRequest struct { - // TensorboardRun: Required. The resource name of the TensorboardRun to write - // data to. Format: - // `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experimen - // ts/{experiment}/runs/{run}` - TensorboardRun string `json:"tensorboardRun,omitempty"` - // TimeSeriesData: Required. The TensorboardTimeSeries data to write. Values - // with in a time series are indexed by their step value. Repeated writes to - // the same step will overwrite the existing value for that step. The upper - // limit of data points per write request is 5000. - TimeSeriesData []*GoogleCloudAiplatformV1TimeSeriesData `json:"timeSeriesData,omitempty"` - // ForceSendFields is a list of field names (e.g. "TensorboardRun") to +// GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata: Details of +// operations that perform update FeatureView. +type GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata struct { + // GenericMetadata: Operation metadata for FeatureView Update. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TensorboardRun") to include in + // NullFields is a list of field names (e.g. "GenericMetadata") to include in // API requests with the JSON null value. By default, fields with empty values // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1WriteTensorboardRunDataRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1WriteTensorboardRunDataRequest +func (s GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateFeatureViewOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudAiplatformV1WriteTensorboardRunDataResponse: Response message for -// TensorboardService.WriteTensorboardRunData. -type GoogleCloudAiplatformV1WriteTensorboardRunDataResponse struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` -} - -// GoogleCloudAiplatformV1XraiAttribution: An explanation method that -// redistributes Integrated Gradients attributions to segmented regions, taking -// advantage of the model's fully differentiable structure. Refer to this paper -// for more details: https://arxiv.org/abs/1906.02825 Supported only by image -// Models. -type GoogleCloudAiplatformV1XraiAttribution struct { - // BlurBaselineConfig: Config for XRAI with blur baseline. When enabled, a - // linear path from the maximally blurred image to the input image is created. - // Using a blurred baseline instead of zero (black image) is motivated by the - // BlurIG approach explained here: https://arxiv.org/abs/2004.03383 - BlurBaselineConfig *GoogleCloudAiplatformV1BlurBaselineConfig `json:"blurBaselineConfig,omitempty"` - // SmoothGradConfig: Config for SmoothGrad approximation of gradients. When - // enabled, the gradients are approximated by averaging the gradients from - // noisy samples in the vicinity of the inputs. Adding noise can help improve - // the computed gradients. Refer to this paper for more details: - // https://arxiv.org/pdf/1706.03825.pdf - SmoothGradConfig *GoogleCloudAiplatformV1SmoothGradConfig `json:"smoothGradConfig,omitempty"` - // StepCount: Required. The number of steps for approximating the path - // integral. A good value to start is 50 and gradually increase until the sum - // to diff property is met within the desired error range. Valid range of its - // value is [1, 100], inclusively. - StepCount int64 `json:"stepCount,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlurBaselineConfig") to +// GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata: Details of +// operations that perform update Featurestore. +type GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata struct { + // GenericMetadata: Operation metadata for Featurestore. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlurBaselineConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudAiplatformV1XraiAttribution) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudAiplatformV1XraiAttribution +func (s GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateFeaturestoreOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudLocationListLocationsResponse: The response message for -// Locations.ListLocations. -type GoogleCloudLocationListLocationsResponse struct { - // Locations: A list of locations that matches the specified filter in the - // request. - Locations []*GoogleCloudLocationLocation `json:"locations,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. "Locations") to +// GoogleCloudAiplatformV1UpdateIndexOperationMetadata: Runtime operation +// information for IndexService.UpdateIndex. +type GoogleCloudAiplatformV1UpdateIndexOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // NearestNeighborSearchOperationMetadata: The operation metadata with regard + // to Matching Engine Index operation. + NearestNeighborSearchOperationMetadata *GoogleCloudAiplatformV1NearestNeighborSearchOperationMetadata `json:"nearestNeighborSearchOperationMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudLocationListLocationsResponse +func (s GoogleCloudAiplatformV1UpdateIndexOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateIndexOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleCloudLocationLocation: A resource that represents a Google Cloud -// location. -type GoogleCloudLocationLocation 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. "DisplayName") to +// GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata: +// Runtime operation information for +// JobService.UpdateModelDeploymentMonitoringJob. +type GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DisplayName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleCloudLocationLocation +func (s GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateModelDeploymentMonitoringJobOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleIamV1Binding: Associates `members`, or principals, with a `role`. -type GoogleIamV1Binding struct { - // Condition: The condition that is associated with this binding. If the - // condition evaluates to `true`, then this binding applies to the current - // request. If the condition evaluates to `false`, then this binding does not - // apply to the current request. However, a different role binding might grant - // the same role to one or more of the principals in this binding. To learn - // which resources support conditions in their IAM policies, see the IAM - // documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Condition *GoogleTypeExpr `json:"condition,omitempty"` - // Members: Specifies the principals requesting access for a Google Cloud - // resource. `members` can have the following values: * `allUsers`: A special - // identifier that represents anyone who is on the internet; with or without a - // Google account. * `allAuthenticatedUsers`: A special identifier that - // represents anyone who is authenticated with a Google account or a service - // account. Does not include identities that come from external identity - // providers (IdPs) through identity federation. * `user:{emailid}`: An email - // address that represents a specific Google account. For example, - // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that - // represents a Google service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. * - // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An - // identifier for a Kubernetes service account - // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). - // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * - // `group:{emailid}`: An email address that represents a Google group. For - // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain - // (primary) that represents all the users of that domain. For example, - // `google.com` or `example.com`. * - // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub - // ject/{subject_attribute_value}`: A single identity in a workforce identity - // pool. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // group/{group_id}`: All workforce identities in a group. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // attribute.{attribute_name}/{attribute_value}`: All workforce identities with - // a specific attribute value. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // *`: All identities in a workforce identity pool. * - // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo - // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single - // identity in a workload identity pool. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool - // group. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} - // `: All identities in a workload identity pool with a certain attribute. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity - // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus - // unique identifier) representing a user that has been recently deleted. For - // example, `alice@example.com?uid=123456789012345678901`. If the user is - // recovered, this value reverts to `user:{emailid}` and the recovered user - // retains the role in the binding. * - // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - // unique identifier) representing a service account that has been recently - // deleted. For example, - // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the - // service account is undeleted, this value reverts to - // `serviceAccount:{emailid}` and the undeleted service account retains the - // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email - // address (plus unique identifier) representing a Google group that has been - // recently deleted. For example, - // `admins@example.com?uid=123456789012345678901`. If the group is recovered, - // this value reverts to `group:{emailid}` and the recovered group retains the - // role in the binding. * - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool - // _id}/subject/{subject_attribute_value}`: Deleted single identity in a - // workforce identity pool. For example, - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po - // ol-id/subject/my-subject-attribute-value`. - Members []string `json:"members,omitempty"` - // Role: Role that is assigned to the list of `members`, or principals. For - // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview - // of the IAM roles and permissions, see the IAM documentation - // (https://cloud.google.com/iam/docs/roles-overview). For a list of the - // available pre-defined roles, see here - // (https://cloud.google.com/iam/docs/understanding-roles). - Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to +// GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata: Details of +// operations that perform update PersistentResource. +type GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata struct { + // GenericMetadata: Operation metadata for PersistentResource. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ProgressMessage: Progress Message for Update LRO + ProgressMessage string `json:"progressMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleIamV1Binding) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Binding +func (s GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdatePersistentResourceOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleIamV1Policy: 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 GoogleIamV1Policy struct { - // 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 []*GoogleIamV1Binding `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. "Bindings") to +// GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata: Runtime +// operation metadata for SpecialistPoolService.UpdateSpecialistPool. +type GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // SpecialistPool: Output only. The name of the SpecialistPool to which the + // specialists are being added. Format: + // `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_po + // ol}` + SpecialistPool string `json:"specialistPool,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Bindings") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleIamV1Policy) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Policy +func (s GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateSpecialistPoolOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleIamV1SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type GoogleIamV1SetIamPolicyRequest 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 *GoogleIamV1Policy `json:"policy,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. See +// GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata: Details of +// operations that perform update Tensorboard. +type GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata struct { + // GenericMetadata: Operation metadata for Tensorboard. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1SetIamPolicyRequest +func (s GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpdateTensorboardOperationMetadata return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleIamV1TestIamPermissionsResponse: Response message for -// `TestIamPermissions` method. -type GoogleIamV1TestIamPermissionsResponse 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 +// GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata: Metadata +// information for NotebookService.UpgradeNotebookRuntime. +type GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata struct { + // GenericMetadata: The operation generic information. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ProgressMessage: A human-readable message that shows the intermediate + // progress details of NotebookRuntime. + ProgressMessage string `json:"progressMessage,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1TestIamPermissionsResponse +func (s GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpgradeNotebookRuntimeOperationMetadata return gensupport.MarshalJSON(NoMethod(s), 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"` +// GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest: Request message for +// NotebookService.UpgradeNotebookRuntime. +type GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest struct { +} - // 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 +// GoogleCloudAiplatformV1UploadModelOperationMetadata: Details of +// ModelService.UploadModel operation. +type GoogleCloudAiplatformV1UploadModelOperationMetadata struct { + // GenericMetadata: The common part of the operation metadata. + GenericMetadata *GoogleCloudAiplatformV1GenericOperationMetadata `json:"genericMetadata,omitempty"` + // ForceSendFields is a list of field names (e.g. "GenericMetadata") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // NullFields is a list of field names (e.g. "GenericMetadata") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1UploadModelOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadModelOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1UploadModelRequest: Request message for +// ModelService.UploadModel. +type GoogleCloudAiplatformV1UploadModelRequest struct { + // Model: Required. The Model to create. + Model *GoogleCloudAiplatformV1Model `json:"model,omitempty"` + // ModelId: Optional. The ID to use for the uploaded Model, which will become + // the final component of the model resource name. This value may be up to 63 + // characters, and valid characters are `[a-z0-9_-]`. The first character + // cannot be a number or hyphen. + ModelId string `json:"modelId,omitempty"` + // ParentModel: Optional. The resource name of the model into which to upload + // the version. Only specify this field when uploading a new version. + ParentModel string `json:"parentModel,omitempty"` + // ServiceAccount: Optional. The user-provided custom service account to use to + // do the model upload. If empty, Vertex AI Service Agent + // (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + // will be used to access resources needed to upload the model. This account + // must belong to the target project where the model is uploaded to, i.e., the + // project specified in the `parent` field of this request and have necessary + // read permissions (to Google Cloud Storage, Artifact Registry, etc.). + ServiceAccount string `json:"serviceAccount,omitempty"` + // ForceSendFields is a list of field names (e.g. "Model") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Model") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningListOperationsResponse +func (s GoogleCloudAiplatformV1UploadModelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadModelRequest return gensupport.MarshalJSON(NoMethod(s), 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 +// GoogleCloudAiplatformV1UploadModelResponse: Response message of +// ModelService.UploadModel operation. +type GoogleCloudAiplatformV1UploadModelResponse struct { + // Model: The name of the uploaded Model resource. Format: + // `projects/{project}/locations/{location}/models/{model}` + Model string `json:"model,omitempty"` + // ModelVersionId: Output only. The version ID of the model that is uploaded. + ModelVersionId string `json:"modelVersionId,omitempty"` + // ForceSendFields is a list of field names (e.g. "Model") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Done") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "Model") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { - type NoMethod GoogleLongrunningOperation +func (s GoogleCloudAiplatformV1UploadModelResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadModelResponse return gensupport.MarshalJSON(NoMethod(s), 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:"-"` +// GoogleCloudAiplatformV1UploadRagFileConfig: Config for uploading RagFile. +type GoogleCloudAiplatformV1UploadRagFileConfig struct { + // RagFileTransformationConfig: Specifies the transformation config for + // RagFiles. + RagFileTransformationConfig *GoogleCloudAiplatformV1RagFileTransformationConfig `json:"ragFileTransformationConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "RagFileTransformationConfig") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "RagFileTransformationConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` } -// 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 +func (s GoogleCloudAiplatformV1UploadRagFileConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadRagFileConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1UploadRagFileRequest: Request message for +// VertexRagDataService.UploadRagFile. +type GoogleCloudAiplatformV1UploadRagFileRequest struct { + // RagFile: Required. The RagFile to upload. + RagFile *GoogleCloudAiplatformV1RagFile `json:"ragFile,omitempty"` + // UploadRagFileConfig: Required. The config for the RagFiles to be uploaded + // into the RagCorpus. VertexRagDataService.UploadRagFile. + UploadRagFileConfig *GoogleCloudAiplatformV1UploadRagFileConfig `json:"uploadRagFileConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagFile") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Code") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "RagFile") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) { - type NoMethod GoogleRpcStatus +func (s GoogleCloudAiplatformV1UploadRagFileRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadRagFileRequest return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleTypeColor: Represents a color in the RGBA color space. This -// representation is designed for simplicity of conversion to and from color -// representations in various languages over compactness. For example, the -// fields of this representation can be trivially provided to the constructor -// of `java.awt.Color` in Java; it can also be trivially provided to UIColor's -// `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little -// work, it can be easily formatted into a CSS `rgba()` string in JavaScript. -// This reference page doesn't have information about the absolute color space -// that should be used to interpret the RGB value—for example, sRGB, Adobe -// RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB -// color space. When color equality needs to be decided, implementations, -// unless documented otherwise, treat two colors as equal if all their red, -// green, blue, and alpha values each differ by at most `1e-5`. Example (Java): -// import com.google.type.Color; // ... public static java.awt.Color -// fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? -// protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( -// protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } -// public static Color toProto(java.awt.Color color) { float red = (float) -// color.getRed(); float green = (float) color.getGreen(); float blue = (float) -// color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = -// Color .newBuilder() .setRed(red / denominator) .setGreen(green / -// denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if -// (alpha != 255) { result.setAlpha( FloatValue .newBuilder() -// .setValue(((float) alpha) / denominator) .build()); } return -// resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static -// UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float -// green = [protocolor green]; float blue = [protocolor blue]; FloatValue* -// alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != -// nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red -// green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) -// { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green -// blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] -// init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; -// if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } -// [result autorelease]; return result; } // ... Example (JavaScript): // ... -// var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || -// 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue -// || 0.0; var red = Math.floor(redFrac * 255); var green = -// Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if -// (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var -// alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, -// blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”); -// }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new -// Number((red << 16) | (green << 8) | blue); var hexString = -// rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var -// resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { -// resultBuilder.push('0'); } resultBuilder.push(hexString); return -// resultBuilder.join(”); }; // ... -type GoogleTypeColor struct { - // Alpha: The fraction of this color that should be applied to the pixel. That - // is, the final pixel color is defined by the equation: `pixel color = alpha * - // (this color) + (1.0 - alpha) * (background color)` This means that a value - // of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a - // completely transparent color. This uses a wrapper message rather than a - // simple float scalar so that it is possible to distinguish between a default - // value and the value being unset. If omitted, this color object is rendered - // as a solid color (as if the alpha value had been explicitly given a value of - // 1.0). - Alpha float64 `json:"alpha,omitempty"` - // Blue: The amount of blue in the color as a value in the interval [0, 1]. - Blue float64 `json:"blue,omitempty"` - // Green: The amount of green in the color as a value in the interval [0, 1]. - Green float64 `json:"green,omitempty"` - // Red: The amount of red in the color as a value in the interval [0, 1]. - Red float64 `json:"red,omitempty"` - // ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally +// GoogleCloudAiplatformV1UploadRagFileResponse: Response message for +// VertexRagDataService.UploadRagFile. +type GoogleCloudAiplatformV1UploadRagFileResponse struct { + // Error: The error that occurred while processing the RagFile. + Error *GoogleRpcStatus `json:"error,omitempty"` + // RagFile: The RagFile that had been uploaded into the RagCorpus. + RagFile *GoogleCloudAiplatformV1RagFile `json:"ragFile,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Error") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Alpha") to include in API + // NullFields is a list of field names (e.g. "Error") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleTypeColor) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeColor +func (s GoogleCloudAiplatformV1UploadRagFileResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UploadRagFileResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -func (s *GoogleTypeColor) UnmarshalJSON(data []byte) error { - type NoMethod GoogleTypeColor +// GoogleCloudAiplatformV1UpsertDatapointsRequest: Request message for +// IndexService.UpsertDatapoints +type GoogleCloudAiplatformV1UpsertDatapointsRequest struct { + // Datapoints: A list of datapoints to be created/updated. + Datapoints []*GoogleCloudAiplatformV1IndexDatapoint `json:"datapoints,omitempty"` + // UpdateMask: Optional. Update mask is used to specify the fields to be + // overwritten in the datapoints by the update. The fields specified in the + // update_mask are relative to each IndexDatapoint inside datapoints, not the + // full request. Updatable fields: * Use `all_restricts` to update both + // restricts and numeric_restricts. + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Datapoints") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Datapoints") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1UpsertDatapointsRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UpsertDatapointsRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1UpsertDatapointsResponse: Response message for +// IndexService.UpsertDatapoints +type GoogleCloudAiplatformV1UpsertDatapointsResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleCloudAiplatformV1UserActionReference: References an API call. It +// contains more information about long running operation and Jobs that are +// triggered by the API call. +type GoogleCloudAiplatformV1UserActionReference struct { + // DataLabelingJob: For API calls that start a LabelingJob. Resource name of + // the LabelingJob. Format: + // `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job} + // ` + DataLabelingJob string `json:"dataLabelingJob,omitempty"` + // Method: The method name of the API RPC call. For example, + // "/google.cloud.aiplatform.{apiVersion}.DatasetService.CreateDataset" + Method string `json:"method,omitempty"` + // Operation: For API calls that return a long running operation. Resource name + // of the long running operation. Format: + // `projects/{project}/locations/{location}/operations/{operation}` + Operation string `json:"operation,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataLabelingJob") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataLabelingJob") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1UserActionReference) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1UserActionReference + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1Value: Value is the value of the field. +type GoogleCloudAiplatformV1Value struct { + // DoubleValue: A double value. + DoubleValue float64 `json:"doubleValue,omitempty"` + // IntValue: An integer value. + IntValue int64 `json:"intValue,omitempty,string"` + // StringValue: A string value. + StringValue string `json:"stringValue,omitempty"` + // ForceSendFields is a list of field names (e.g. "DoubleValue") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DoubleValue") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1Value) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1Value + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1Value) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1Value var s1 struct { - Alpha gensupport.JSONFloat64 `json:"alpha"` - Blue gensupport.JSONFloat64 `json:"blue"` - Green gensupport.JSONFloat64 `json:"green"` - Red gensupport.JSONFloat64 `json:"red"` + DoubleValue gensupport.JSONFloat64 `json:"doubleValue"` *NoMethod } s1.NoMethod = (*NoMethod)(s) if err := json.Unmarshal(data, &s1); err != nil { return err } - s.Alpha = float64(s1.Alpha) - s.Blue = float64(s1.Blue) - s.Green = float64(s1.Green) - s.Red = float64(s1.Red) + s.DoubleValue = float64(s1.DoubleValue) return nil } -// GoogleTypeDate: Represents a whole or partial calendar date, such as a -// birthday. The time of day and time zone are either specified elsewhere or -// are insignificant. The date is relative to the Gregorian Calendar. This can -// represent one of the following: * A full date, with non-zero year, month, -// and day values. * A month and day, with a zero year (for example, an -// anniversary). * A year on its own, with a zero month and a zero day. * A -// year and month, with a zero day (for example, a credit card expiration -// date). Related types: * google.type.TimeOfDay * google.type.DateTime * -// google.protobuf.Timestamp -type GoogleTypeDate struct { - // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, - // or 0 to specify a year by itself or a year and month where the day isn't - // significant. - Day int64 `json:"day,omitempty"` - // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without - // a month and day. - Month int64 `json:"month,omitempty"` - // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date - // without a year. - Year int64 `json:"year,omitempty"` - // ForceSendFields is a list of field names (e.g. "Day") to unconditionally - // include in API requests. By default, fields with empty or default values are +// GoogleCloudAiplatformV1VertexAISearch: Retrieve from Vertex AI Search +// datastore for grounding. See https://cloud.google.com/products/agent-builder +type GoogleCloudAiplatformV1VertexAISearch struct { + // Datastore: Required. Fully-qualified Vertex AI Search data store resource + // ID. Format: + // `projects/{project}/locations/{location}/collections/{collection}/dataStores/ + // {dataStore}` + Datastore string `json:"datastore,omitempty"` + // ForceSendFields is a list of field names (e.g. "Datastore") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Datastore") to include in API + // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1VertexAISearch) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VertexAISearch + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1VertexRagStore: Retrieve from Vertex RAG Store for +// grounding. +type GoogleCloudAiplatformV1VertexRagStore struct { + // RagResources: Optional. The representation of the rag source. It can be used + // to specify corpus only or ragfiles. Currently only support one corpus or + // multiple files from one corpus. In the future we may open up multiple + // corpora support. + RagResources []*GoogleCloudAiplatformV1VertexRagStoreRagResource `json:"ragResources,omitempty"` + // RagRetrievalConfig: Optional. The retrieval config for the Rag query. + RagRetrievalConfig *GoogleCloudAiplatformV1RagRetrievalConfig `json:"ragRetrievalConfig,omitempty"` + // SimilarityTopK: Optional. Number of top k results to return from the + // selected corpora. + SimilarityTopK int64 `json:"similarityTopK,omitempty"` + // VectorDistanceThreshold: Optional. Only return results with vector distance + // smaller than the threshold. + VectorDistanceThreshold float64 `json:"vectorDistanceThreshold,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagResources") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Day") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "RagResources") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleTypeDate) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeDate +func (s GoogleCloudAiplatformV1VertexRagStore) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VertexRagStore return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// GoogleTypeExpr: Represents a textual expression in the Common Expression -// Language (CEL) syntax. CEL is a C-like expression language. The syntax and -// semantics of CEL are documented at 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() < -// 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' && 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. -type GoogleTypeExpr struct { - // Description: Optional. Description of the expression. This is a longer text - // which describes the expression, e.g. when hovered over it in a UI. - Description string `json:"description,omitempty"` - // Expression: Textual representation of an expression in Common Expression - // Language syntax. - Expression string `json:"expression,omitempty"` - // Location: Optional. String indicating the location of the expression for - // error reporting, e.g. a file name and a position in the file. - Location string `json:"location,omitempty"` - // Title: 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. - Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to +func (s *GoogleCloudAiplatformV1VertexRagStore) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1VertexRagStore + var s1 struct { + VectorDistanceThreshold gensupport.JSONFloat64 `json:"vectorDistanceThreshold"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.VectorDistanceThreshold = float64(s1.VectorDistanceThreshold) + return nil +} + +// GoogleCloudAiplatformV1VertexRagStoreRagResource: The definition of the Rag +// resource. +type GoogleCloudAiplatformV1VertexRagStoreRagResource struct { + // RagCorpus: Optional. RagCorpora resource name. Format: + // `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}` + RagCorpus string `json:"ragCorpus,omitempty"` + // RagFileIds: Optional. rag_file_id. The files should be in the same + // rag_corpus set in rag_corpus field. + RagFileIds []string `json:"ragFileIds,omitempty"` + // ForceSendFields is a list of field names (e.g. "RagCorpus") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API + // NullFields is a list of field names (e.g. "RagCorpus") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1VertexRagStoreRagResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VertexRagStoreRagResource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1VideoMetadata: Metadata describes the input video +// content. +type GoogleCloudAiplatformV1VideoMetadata struct { + // EndOffset: Optional. The end offset of the video. + EndOffset string `json:"endOffset,omitempty"` + // StartOffset: Optional. The start offset of the video. + StartOffset string `json:"startOffset,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndOffset") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndOffset") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1VideoMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VideoMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1VoiceConfig: The configuration for the voice to use. +type GoogleCloudAiplatformV1VoiceConfig struct { + // PrebuiltVoiceConfig: The configuration for the prebuilt voice to use. + PrebuiltVoiceConfig *GoogleCloudAiplatformV1PrebuiltVoiceConfig `json:"prebuiltVoiceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrebuiltVoiceConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PrebuiltVoiceConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1VoiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1VoiceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WorkerPoolSpec: Represents the spec of a worker pool +// in a job. +type GoogleCloudAiplatformV1WorkerPoolSpec struct { + // ContainerSpec: The custom container task. + ContainerSpec *GoogleCloudAiplatformV1ContainerSpec `json:"containerSpec,omitempty"` + // DiskSpec: Disk spec. + DiskSpec *GoogleCloudAiplatformV1DiskSpec `json:"diskSpec,omitempty"` + // MachineSpec: Optional. Immutable. The specification of a single machine. + MachineSpec *GoogleCloudAiplatformV1MachineSpec `json:"machineSpec,omitempty"` + // NfsMounts: Optional. List of NFS mount spec. + NfsMounts []*GoogleCloudAiplatformV1NfsMount `json:"nfsMounts,omitempty"` + // PythonPackageSpec: The Python packaged task. + PythonPackageSpec *GoogleCloudAiplatformV1PythonPackageSpec `json:"pythonPackageSpec,omitempty"` + // ReplicaCount: Optional. The number of worker replicas to use for this worker + // pool. + ReplicaCount int64 `json:"replicaCount,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "ContainerSpec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ContainerSpec") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1WorkerPoolSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1WorkerPoolSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WriteFeatureValuesPayload: Contains Feature values to +// be written for a specific entity. +type GoogleCloudAiplatformV1WriteFeatureValuesPayload struct { + // EntityId: Required. The ID of the entity. + EntityId string `json:"entityId,omitempty"` + // FeatureValues: Required. Feature values to be written, mapping from Feature + // ID to value. Up to 100,000 `feature_values` entries may be written across + // all payloads. The feature generation time, aligned by days, must be no older + // than five years (1825 days) and no later than one year (366 days) in the + // future. + FeatureValues map[string]GoogleCloudAiplatformV1FeatureValue `json:"featureValues,omitempty"` + // ForceSendFields is a list of field names (e.g. "EntityId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EntityId") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s GoogleTypeExpr) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeExpr - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +func (s GoogleCloudAiplatformV1WriteFeatureValuesPayload) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1WriteFeatureValuesPayload + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WriteFeatureValuesRequest: Request message for +// FeaturestoreOnlineServingService.WriteFeatureValues. +type GoogleCloudAiplatformV1WriteFeatureValuesRequest struct { + // Payloads: Required. The entities to be written. Up to 100,000 feature values + // can be written across all `payloads`. + Payloads []*GoogleCloudAiplatformV1WriteFeatureValuesPayload `json:"payloads,omitempty"` + // ForceSendFields is a list of field names (e.g. "Payloads") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Payloads") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1WriteFeatureValuesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1WriteFeatureValuesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WriteFeatureValuesResponse: Response message for +// FeaturestoreOnlineServingService.WriteFeatureValues. +type GoogleCloudAiplatformV1WriteFeatureValuesResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest: Request +// message for TensorboardService.WriteTensorboardExperimentData. +type GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest struct { + // WriteRunDataRequests: Required. Requests containing per-run + // TensorboardTimeSeries data to write. + WriteRunDataRequests []*GoogleCloudAiplatformV1WriteTensorboardRunDataRequest `json:"writeRunDataRequests,omitempty"` + // ForceSendFields is a list of field names (e.g. "WriteRunDataRequests") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "WriteRunDataRequests") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1WriteTensorboardExperimentDataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WriteTensorboardExperimentDataResponse: Response +// message for TensorboardService.WriteTensorboardExperimentData. +type GoogleCloudAiplatformV1WriteTensorboardExperimentDataResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleCloudAiplatformV1WriteTensorboardRunDataRequest: Request message for +// TensorboardService.WriteTensorboardRunData. +type GoogleCloudAiplatformV1WriteTensorboardRunDataRequest struct { + // TensorboardRun: Required. The resource name of the TensorboardRun to write + // data to. Format: + // `projects/{project}/locations/{location}/tensorboards/{tensorboard}/experimen + // ts/{experiment}/runs/{run}` + TensorboardRun string `json:"tensorboardRun,omitempty"` + // TimeSeriesData: Required. The TensorboardTimeSeries data to write. Values + // with in a time series are indexed by their step value. Repeated writes to + // the same step will overwrite the existing value for that step. The upper + // limit of data points per write request is 5000. + TimeSeriesData []*GoogleCloudAiplatformV1TimeSeriesData `json:"timeSeriesData,omitempty"` + // ForceSendFields is a list of field names (e.g. "TensorboardRun") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TensorboardRun") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1WriteTensorboardRunDataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1WriteTensorboardRunDataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1WriteTensorboardRunDataResponse: Response message for +// TensorboardService.WriteTensorboardRunData. +type GoogleCloudAiplatformV1WriteTensorboardRunDataResponse struct { + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` +} + +// GoogleCloudAiplatformV1XraiAttribution: An explanation method that +// redistributes Integrated Gradients attributions to segmented regions, taking +// advantage of the model's fully differentiable structure. Refer to this paper +// for more details: https://arxiv.org/abs/1906.02825 Supported only by image +// Models. +type GoogleCloudAiplatformV1XraiAttribution struct { + // BlurBaselineConfig: Config for XRAI with blur baseline. When enabled, a + // linear path from the maximally blurred image to the input image is created. + // Using a blurred baseline instead of zero (black image) is motivated by the + // BlurIG approach explained here: https://arxiv.org/abs/2004.03383 + BlurBaselineConfig *GoogleCloudAiplatformV1BlurBaselineConfig `json:"blurBaselineConfig,omitempty"` + // SmoothGradConfig: Config for SmoothGrad approximation of gradients. When + // enabled, the gradients are approximated by averaging the gradients from + // noisy samples in the vicinity of the inputs. Adding noise can help improve + // the computed gradients. Refer to this paper for more details: + // https://arxiv.org/pdf/1706.03825.pdf + SmoothGradConfig *GoogleCloudAiplatformV1SmoothGradConfig `json:"smoothGradConfig,omitempty"` + // StepCount: Required. The number of steps for approximating the path + // integral. A good value to start is 50 and gradually increase until the sum + // to diff property is met within the desired error range. Valid range of its + // value is [1, 100], inclusively. + StepCount int64 `json:"stepCount,omitempty"` + // ForceSendFields is a list of field names (e.g. "BlurBaselineConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BlurBaselineConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1XraiAttribution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1XraiAttribution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationListLocationsResponse: The response message for +// Locations.ListLocations. +type GoogleCloudLocationListLocationsResponse struct { + // Locations: A list of locations that matches the specified filter in the + // request. + Locations []*GoogleCloudLocationLocation `json:"locations,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. "Locations") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Locations") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudLocationListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudLocationLocation: A resource that represents a Google Cloud +// location. +type GoogleCloudLocationLocation 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. "DisplayName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudLocationLocation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudLocationLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Binding: Associates `members`, or principals, with a `role`. +type GoogleIamV1Binding struct { + // Condition: The condition that is associated with this binding. If the + // condition evaluates to `true`, then this binding applies to the current + // request. If the condition evaluates to `false`, then this binding does not + // apply to the current request. However, a different role binding might grant + // the same role to one or more of the principals in this binding. To learn + // which resources support conditions in their IAM policies, see the IAM + // documentation + // (https://cloud.google.com/iam/help/conditions/resource-policies). + Condition *GoogleTypeExpr `json:"condition,omitempty"` + // Members: Specifies the principals requesting access for a Google Cloud + // resource. `members` can have the following values: * `allUsers`: A special + // identifier that represents anyone who is on the internet; with or without a + // Google account. * `allAuthenticatedUsers`: A special identifier that + // represents anyone who is authenticated with a Google account or a service + // account. Does not include identities that come from external identity + // providers (IdPs) through identity federation. * `user:{emailid}`: An email + // address that represents a specific Google account. For example, + // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that + // represents a Google service account. For example, + // `my-other-app@appspot.gserviceaccount.com`. * + // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An + // identifier for a Kubernetes service account + // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). + // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * + // `group:{emailid}`: An email address that represents a Google group. For + // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain + // (primary) that represents all the users of that domain. For example, + // `google.com` or `example.com`. * + // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub + // ject/{subject_attribute_value}`: A single identity in a workforce identity + // pool. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // group/{group_id}`: All workforce identities in a group. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // attribute.{attribute_name}/{attribute_value}`: All workforce identities with + // a specific attribute value. * + // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ + // *`: All identities in a workforce identity pool. * + // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo + // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single + // identity in a workload identity pool. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool + // group. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} + // `: All identities in a workload identity pool with a certain attribute. * + // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global + // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity + // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a user that has been recently deleted. For + // example, `alice@example.com?uid=123456789012345678901`. If the user is + // recovered, this value reverts to `user:{emailid}` and the recovered user + // retains the role in the binding. * + // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus + // unique identifier) representing a service account that has been recently + // deleted. For example, + // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the + // service account is undeleted, this value reverts to + // `serviceAccount:{emailid}` and the undeleted service account retains the + // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email + // address (plus unique identifier) representing a Google group that has been + // recently deleted. For example, + // `admins@example.com?uid=123456789012345678901`. If the group is recovered, + // this value reverts to `group:{emailid}` and the recovered group retains the + // role in the binding. * + // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool + // _id}/subject/{subject_attribute_value}`: Deleted single identity in a + // workforce identity pool. For example, + // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po + // ol-id/subject/my-subject-attribute-value`. + Members []string `json:"members,omitempty"` + // Role: Role that is assigned to the list of `members`, or principals. For + // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview + // of the IAM roles and permissions, see the IAM documentation + // (https://cloud.google.com/iam/docs/roles-overview). For a list of the + // available pre-defined roles, see here + // (https://cloud.google.com/iam/docs/understanding-roles). + Role string `json:"role,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Condition") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleIamV1Binding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Binding + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1Policy: 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 GoogleIamV1Policy struct { + // 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 []*GoogleIamV1Binding `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. "Bindings") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Bindings") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleIamV1Policy) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1Policy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1SetIamPolicyRequest: Request message for `SetIamPolicy` method. +type GoogleIamV1SetIamPolicyRequest 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 *GoogleIamV1Policy `json:"policy,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Policy") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1SetIamPolicyRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleIamV1TestIamPermissionsResponse: Response message for +// `TestIamPermissions` method. +type GoogleIamV1TestIamPermissionsResponse 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Permissions") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleIamV1TestIamPermissionsResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleLongrunningListOperationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningListOperationsResponse + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleTypeColor: Represents a color in the RGBA color space. This +// representation is designed for simplicity of conversion to and from color +// representations in various languages over compactness. For example, the +// fields of this representation can be trivially provided to the constructor +// of `java.awt.Color` in Java; it can also be trivially provided to UIColor's +// `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little +// work, it can be easily formatted into a CSS `rgba()` string in JavaScript. +// This reference page doesn't have information about the absolute color space +// that should be used to interpret the RGB value—for example, sRGB, Adobe +// RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB +// color space. When color equality needs to be decided, implementations, +// unless documented otherwise, treat two colors as equal if all their red, +// green, blue, and alpha values each differ by at most `1e-5`. Example (Java): +// import com.google.type.Color; // ... public static java.awt.Color +// fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? +// protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( +// protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } +// public static Color toProto(java.awt.Color color) { float red = (float) +// color.getRed(); float green = (float) color.getGreen(); float blue = (float) +// color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = +// Color .newBuilder() .setRed(red / denominator) .setGreen(green / +// denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if +// (alpha != 255) { result.setAlpha( FloatValue .newBuilder() +// .setValue(((float) alpha) / denominator) .build()); } return +// resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static +// UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float +// green = [protocolor green]; float blue = [protocolor blue]; FloatValue* +// alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != +// nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red +// green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) +// { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green +// blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] +// init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; +// if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } +// [result autorelease]; return result; } // ... Example (JavaScript): // ... +// var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || +// 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue +// || 0.0; var red = Math.floor(redFrac * 255); var green = +// Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if +// (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var +// alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, +// blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(”); +// }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new +// Number((red << 16) | (green << 8) | blue); var hexString = +// rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var +// resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { +// resultBuilder.push('0'); } resultBuilder.push(hexString); return +// resultBuilder.join(”); }; // ... +type GoogleTypeColor struct { + // Alpha: The fraction of this color that should be applied to the pixel. That + // is, the final pixel color is defined by the equation: `pixel color = alpha * + // (this color) + (1.0 - alpha) * (background color)` This means that a value + // of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a + // completely transparent color. This uses a wrapper message rather than a + // simple float scalar so that it is possible to distinguish between a default + // value and the value being unset. If omitted, this color object is rendered + // as a solid color (as if the alpha value had been explicitly given a value of + // 1.0). + Alpha float64 `json:"alpha,omitempty"` + // Blue: The amount of blue in the color as a value in the interval [0, 1]. + Blue float64 `json:"blue,omitempty"` + // Green: The amount of green in the color as a value in the interval [0, 1]. + Green float64 `json:"green,omitempty"` + // Red: The amount of red in the color as a value in the interval [0, 1]. + Red float64 `json:"red,omitempty"` + // ForceSendFields is a list of field names (e.g. "Alpha") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Alpha") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleTypeColor) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeColor + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleTypeColor) UnmarshalJSON(data []byte) error { + type NoMethod GoogleTypeColor + var s1 struct { + Alpha gensupport.JSONFloat64 `json:"alpha"` + Blue gensupport.JSONFloat64 `json:"blue"` + Green gensupport.JSONFloat64 `json:"green"` + Red gensupport.JSONFloat64 `json:"red"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Alpha = float64(s1.Alpha) + s.Blue = float64(s1.Blue) + s.Green = float64(s1.Green) + s.Red = float64(s1.Red) + return nil +} + +// GoogleTypeDate: Represents a whole or partial calendar date, such as a +// birthday. The time of day and time zone are either specified elsewhere or +// are insignificant. The date is relative to the Gregorian Calendar. This can +// represent one of the following: * A full date, with non-zero year, month, +// and day values. * A month and day, with a zero year (for example, an +// anniversary). * A year on its own, with a zero month and a zero day. * A +// year and month, with a zero day (for example, a credit card expiration +// date). Related types: * google.type.TimeOfDay * google.type.DateTime * +// google.protobuf.Timestamp +type GoogleTypeDate struct { + // Day: Day of a month. Must be from 1 to 31 and valid for the year and month, + // or 0 to specify a year by itself or a year and month where the day isn't + // significant. + Day int64 `json:"day,omitempty"` + // Month: Month of a year. Must be from 1 to 12, or 0 to specify a year without + // a month and day. + Month int64 `json:"month,omitempty"` + // Year: Year of the date. Must be from 1 to 9999, or 0 to specify a date + // without a year. + Year int64 `json:"year,omitempty"` + // ForceSendFields is a list of field names (e.g. "Day") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Day") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleTypeDate) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeDate + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleTypeExpr: Represents a textual expression in the Common Expression +// Language (CEL) syntax. CEL is a C-like expression language. The syntax and +// semantics of CEL are documented at 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() < +// 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' && 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. +type GoogleTypeExpr struct { + // Description: Optional. Description of the expression. This is a longer text + // which describes the expression, e.g. when hovered over it in a UI. + Description string `json:"description,omitempty"` + // Expression: Textual representation of an expression in Common Expression + // Language syntax. + Expression string `json:"expression,omitempty"` + // Location: Optional. String indicating the location of the expression for + // error reporting, e.g. a file name and a position in the file. + Location string `json:"location,omitempty"` + // Title: 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. + Title string `json:"title,omitempty"` + // ForceSendFields is a list of field names (e.g. "Description") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Description") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleTypeExpr) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeExpr + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleTypeInterval: Represents a time interval, encoded as a Timestamp start +// (inclusive) and a Timestamp end (exclusive). The start must be less than or +// equal to the end. When the start equals the end, the interval is empty +// (matches no time). When both start and end are unspecified, the interval +// matches any time. +type GoogleTypeInterval struct { + // EndTime: Optional. Exclusive end of the interval. If specified, a Timestamp + // matching this interval will have to be before the end. + EndTime string `json:"endTime,omitempty"` + // StartTime: Optional. Inclusive start of the interval. If specified, a + // Timestamp matching this interval will have to be the same or after the + // start. + StartTime string `json:"startTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleTypeInterval) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeInterval + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleTypeMoney: Represents an amount of money with its currency type. +type GoogleTypeMoney struct { + // CurrencyCode: The three-letter currency code defined in ISO 4217. + CurrencyCode string `json:"currencyCode,omitempty"` + // Nanos: Number of nano (10^-9) units of the amount. The value must be between + // -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` + // must be positive or zero. If `units` is zero, `nanos` can be positive, zero, + // or negative. If `units` is negative, `nanos` must be negative or zero. For + // example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. + Nanos int64 `json:"nanos,omitempty"` + // Units: The whole units of the amount. For example if `currencyCode` is + // "USD", then 1 unit is one US dollar. + Units int64 `json:"units,omitempty,string"` + // ForceSendFields is a list of field names (e.g. "CurrencyCode") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CurrencyCode") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { + type NoMethod GoogleTypeMoney + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type DatasetsCreateCall struct { + s *Service + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a Dataset. +func (r *DatasetsService) Create(googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsCreateCall { + c := &DatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset + return c +} + +// Parent sets the optional parameter "parent": Required. The resource name of +// the Location to create the Dataset in. Format: +// `projects/{project}/locations/{location}` +func (c *DatasetsCreateCall) Parent(parent string) *DatasetsCreateCall { + c.urlParams_.Set("parent", parent) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsCreateCall) Fields(s ...googleapi.Field) *DatasetsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.create" call. +// 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 *DatasetsCreateCall) 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 +} + +type DatasetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Dataset. +// +// - name: The resource name of the Dataset to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsService) Delete(name string) *DatasetsDeleteCall { + c := &DatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.delete" call. +// 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 *DatasetsDeleteCall) 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 +} + +type DatasetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Dataset. +// +// - name: The name of the Dataset resource. +func (r *DatasetsService) Get(name string) *DatasetsGetCall { + c := &DatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsGetCall) ReadMask(readMask string) *DatasetsGetCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *DatasetsGetCall) IfNoneMatch(entityTag string) *DatasetsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, 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 := &GoogleCloudAiplatformV1Dataset{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsListCall struct { + s *Service + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Datasets in a Location. +func (r *DatasetsService) List() *DatasetsListCall { + c := &DatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `display_name`: supports = and != * `metadata_schema_uri`: +// supports = and != * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". Some +// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" +func (c *DatasetsListCall) Filter(filter string) *DatasetsListCall { + 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: * `display_name` * `create_time` * +// `update_time` +func (c *DatasetsListCall) OrderBy(orderBy string) *DatasetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsListCall) PageSize(pageSize int64) *DatasetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsListCall) PageToken(pageToken string) *DatasetsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Parent sets the optional parameter "parent": Required. The name of the +// Dataset's parent resource. Format: `projects/{project}/locations/{location}` +func (c *DatasetsListCall) Parent(parent string) *DatasetsListCall { + c.urlParams_.Set("parent", parent) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsListCall) ReadMask(readMask string) *DatasetsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *DatasetsListCall) IfNoneMatch(entityTag string) *DatasetsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ListDatasetsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetsResponse, 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 := &GoogleCloudAiplatformV1ListDatasetsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *DatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type DatasetsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Dataset. +// +// - name: Output only. Identifier. The resource name of the Dataset. +func (r *DatasetsService) Patch(name string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsPatchCall { + c := &DatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` * +// `description` * `labels` +func (c *DatasetsPatchCall) UpdateMask(updateMask string) *DatasetsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsPatchCall) Fields(s ...googleapi.Field) *DatasetsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, 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 := &GoogleCloudAiplatformV1Dataset{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Create a version from a Dataset. +// +// - parent: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsCreateCall { + c := &DatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *DatasetsDatasetVersionsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.create" call. +// 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 *DatasetsDatasetVersionsCreateCall) 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 +} + +type DatasetsDatasetVersionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a Dataset version. +// +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Delete(name string) *DatasetsDatasetVersionsDeleteCall { + c := &DatasetsDatasetVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *DatasetsDatasetVersionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.delete" call. +// 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 *DatasetsDatasetVersionsDeleteCall) 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 +} + +type DatasetsDatasetVersionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a Dataset version. +// +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Get(name string) *DatasetsDatasetVersionsGetCall { + c := &DatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsGetCall) ReadMask(readMask string) *DatasetsDatasetVersionsGetCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *DatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsGetCall) Context(ctx context.Context) *DatasetsDatasetVersionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, 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 := &GoogleCloudAiplatformV1DatasetVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists DatasetVersions in a Dataset. +// +// - parent: The resource name of the Dataset to list DatasetVersions from. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *DatasetsDatasetVersionsService) List(parent string) *DatasetsDatasetVersionsListCall { + c := &DatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *DatasetsDatasetVersionsListCall) Filter(filter string) *DatasetsDatasetVersionsListCall { + 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. +func (c *DatasetsDatasetVersionsListCall) OrderBy(orderBy string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *DatasetsDatasetVersionsListCall) PageSize(pageSize int64) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *DatasetsDatasetVersionsListCall) PageToken(pageToken string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *DatasetsDatasetVersionsListCall) ReadMask(readMask string) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *DatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsListCall) Context(ctx context.Context) *DatasetsDatasetVersionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ListDatasetVersionsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetVersionsResponse, 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 := &GoogleCloudAiplatformV1ListDatasetVersionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *DatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type DatasetsDatasetVersionsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DatasetVersion. +// +// - name: Output only. Identifier. The resource name of the DatasetVersion. +func (r *DatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsPatchCall { + c := &DatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` +func (c *DatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *DatasetsDatasetVersionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *DatasetsDatasetVersionsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, 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 := &GoogleCloudAiplatformV1DatasetVersion{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type DatasetsDatasetVersionsRestoreCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a dataset version. +// +// - name: The name of the DatasetVersion resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *DatasetsDatasetVersionsService) Restore(name string) *DatasetsDatasetVersionsRestoreCall { + c := &DatasetsDatasetVersionsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *DatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsRestoreCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *DatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsRestoreCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *DatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *DatasetsDatasetVersionsRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *DatasetsDatasetVersionsRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *DatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.datasets.datasetVersions.restore" call. +// 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 *DatasetsDatasetVersionsRestoreCall) 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 +} + +type EndpointsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ComputeTokens: Return a list of tokens based on the input text. +// +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *EndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *EndpointsComputeTokensCall { + c := &EndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsComputeTokensCall) Fields(s ...googleapi.Field) *EndpointsComputeTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsComputeTokensCall) Context(ctx context.Context) *EndpointsComputeTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsComputeTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.computeTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, 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 := &GoogleCloudAiplatformV1ComputeTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CountTokens: Perform a token counting. +// +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *EndpointsCountTokensCall { + c := &EndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsCountTokensCall) Fields(s ...googleapi.Field) *EndpointsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsCountTokensCall) Context(ctx context.Context) *EndpointsCountTokensCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsCountTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, 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 := &GoogleCloudAiplatformV1CountTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsGenerateContentCall { + c := &EndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsGenerateContentCall) Context(ctx context.Context) *EndpointsGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.generateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type EndpointsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *EndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsStreamGenerateContentCall { + c := &EndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *EndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsStreamGenerateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *EndpointsStreamGenerateContentCall) Context(ctx context.Context) *EndpointsStreamGenerateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *EndpointsStreamGenerateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *EndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "model": c.model, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.endpoints.streamGenerateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, 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 := &GoogleCloudAiplatformV1GenerateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type MediaUploadCall struct { + s *Service + parent string + googlecloudaiplatformv1uploadragfilerequest *GoogleCloudAiplatformV1UploadRagFileRequest + urlParams_ gensupport.URLParams + mediaInfo_ *gensupport.MediaInfo + ctx_ context.Context + header_ http.Header +} + +// Upload: Upload a file into a RagCorpus. +// +// - parent: The name of the RagCorpus resource into which to upload the file. +// Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. +func (r *MediaService) Upload(parent string, googlecloudaiplatformv1uploadragfilerequest *GoogleCloudAiplatformV1UploadRagFileRequest) *MediaUploadCall { + c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1uploadragfilerequest = googlecloudaiplatformv1uploadragfilerequest + return c +} + +// Media specifies the media to upload in one or more chunks. The chunk size +// may be controlled by supplying a MediaOption generated by +// googleapi.ChunkSize. The chunk size defaults to +// googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload +// request will be determined by sniffing the contents of r, unless a +// MediaOption generated by googleapi.ContentType is supplied. +// At most one of Media and ResumableMedia may be set. +func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { + c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) + return c +} + +// ResumableMedia specifies the media to upload in chunks and can be canceled +// with ctx. +// +// Deprecated: use Media instead. +// +// At most one of Media and ResumableMedia may be set. mediaType identifies the +// MIME media type of the upload, such as "image/png". If mediaType is "", it +// will be auto-detected. The provided ctx will supersede any context +// previously provided to the Context method. +func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { + c.ctx_ = ctx + c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) + return c +} + +// ProgressUpdater provides a callback function that will be called after every +// chunk. It should be a low-latency function in order to not slow down the +// upload operation. This should only be called when using ResumableMedia (as +// opposed to Media). +func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { + c.mediaInfo_.SetProgressUpdater(pu) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +// This context will supersede any context previously provided to the +// ResumableMedia method. +func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *MediaUploadCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1uploadragfilerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragFiles:upload") + if c.mediaInfo_ != nil { + urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/ragFiles:upload") + c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) + } + if body == nil { + body = new(bytes.Buffer) + reqHeaders.Set("Content-Type", "application/json") + } + body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) + defer cleanup() + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + req.GetBody = getBody + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.media.upload" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1UploadRagFileResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1UploadRagFileResponse, 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) + } + rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) + if rx != nil { + rx.Client = c.s.client + rx.UserAgent = c.s.userAgent() + ctx := c.ctx_ + if ctx == nil { + ctx = context.TODO() + } + res, err = rx.Upload(ctx) + if err != nil { + return nil, err + } + defer res.Body.Close() + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + } + ret := &GoogleCloudAiplatformV1UploadRagFileResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsGetCacheConfigCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetCacheConfig: Gets a GenAI cache config. +// +// - name: Name of the cache config. Format: - +// `projects/{project}/cacheConfig`. +func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCall { + c := &ProjectsGetCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsGetCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsGetCacheConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsGetCacheConfigCall) IfNoneMatch(entityTag string) *ProjectsGetCacheConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsGetCacheConfigCall) Context(ctx context.Context) *ProjectsGetCacheConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsGetCacheConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsGetCacheConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.getCacheConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CacheConfig.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CacheConfig, 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 := &GoogleCloudAiplatformV1CacheConfig{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsUpdateCacheConfigCall struct { + s *Service + name string + googlecloudaiplatformv1cacheconfig *GoogleCloudAiplatformV1CacheConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateCacheConfig: Updates a cache config. +// +// - name: Identifier. Name of the cache config. Format: - +// `projects/{project}/cacheConfig`. +func (r *ProjectsService) UpdateCacheConfig(name string, googlecloudaiplatformv1cacheconfig *GoogleCloudAiplatformV1CacheConfig) *ProjectsUpdateCacheConfigCall { + c := &ProjectsUpdateCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1cacheconfig = googlecloudaiplatformv1cacheconfig + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsUpdateCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateCacheConfigCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsUpdateCacheConfigCall) Context(ctx context.Context) *ProjectsUpdateCacheConfigCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsUpdateCacheConfigCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsUpdateCacheConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cacheconfig) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.updateCacheConfig" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleLongrunningOperation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsAugmentPromptCall struct { + s *Service + parent string + googlecloudaiplatformv1augmentpromptrequest *GoogleCloudAiplatformV1AugmentPromptRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AugmentPrompt: Given an input prompt, it returns augmented prompt from +// vertex rag store to guide LLM towards generating grounded responses. +// +// - parent: The resource name of the Location from which to augment prompt. +// The users must have permission to make a call in the project. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) AugmentPrompt(parent string, googlecloudaiplatformv1augmentpromptrequest *GoogleCloudAiplatformV1AugmentPromptRequest) *ProjectsLocationsAugmentPromptCall { + c := &ProjectsLocationsAugmentPromptCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1augmentpromptrequest = googlecloudaiplatformv1augmentpromptrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsAugmentPromptCall) Fields(s ...googleapi.Field) *ProjectsLocationsAugmentPromptCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsAugmentPromptCall) Context(ctx context.Context) *ProjectsLocationsAugmentPromptCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsAugmentPromptCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsAugmentPromptCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1augmentpromptrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:augmentPrompt") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.augmentPrompt" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1AugmentPromptResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsAugmentPromptCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AugmentPromptResponse, 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 := &GoogleCloudAiplatformV1AugmentPromptResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsCorroborateContentCall struct { + s *Service + parent string + googlecloudaiplatformv1corroboratecontentrequest *GoogleCloudAiplatformV1CorroborateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CorroborateContent: Given an input text, it returns a score that evaluates +// the factuality of the text. It also extracts and returns claims from the +// text and provides supporting facts. +// +// - parent: The resource name of the Location from which to corroborate text. +// The users must have permission to make a call in the project. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) CorroborateContent(parent string, googlecloudaiplatformv1corroboratecontentrequest *GoogleCloudAiplatformV1CorroborateContentRequest) *ProjectsLocationsCorroborateContentCall { + c := &ProjectsLocationsCorroborateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1corroboratecontentrequest = googlecloudaiplatformv1corroboratecontentrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCorroborateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCorroborateContentCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCorroborateContentCall) Context(ctx context.Context) *ProjectsLocationsCorroborateContentCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCorroborateContentCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCorroborateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1corroboratecontentrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:corroborateContent") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.corroborateContent" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CorroborateContentResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsCorroborateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CorroborateContentResponse, 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 := &GoogleCloudAiplatformV1CorroborateContentResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsEvaluateInstancesCall struct { + s *Service + location string + googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// EvaluateInstances: Evaluates instances based on a given metric. +// +// - location: The resource name of the Location to evaluate the instances. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) EvaluateInstances(location string, googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest) *ProjectsLocationsEvaluateInstancesCall { + c := &ProjectsLocationsEvaluateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + c.googlecloudaiplatformv1evaluateinstancesrequest = googlecloudaiplatformv1evaluateinstancesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEvaluateInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluateInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEvaluateInstancesCall) Context(ctx context.Context) *ProjectsLocationsEvaluateInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEvaluateInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEvaluateInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1evaluateinstancesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:evaluateInstances") + 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 "aiplatform.projects.locations.evaluateInstances" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1EvaluateInstancesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EvaluateInstancesResponse, 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 := &GoogleCloudAiplatformV1EvaluateInstancesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type 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)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response was +// returned 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) (*GoogleCloudLocationLocation, 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 := &GoogleCloudLocationLocation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type 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 +// details. +func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *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 := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/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 "aiplatform.projects.locations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or (if a +// response was returned 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) (*GoogleCloudLocationListLocationsResponse, 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 := &GoogleCloudLocationListLocationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsRetrieveContextsCall struct { + s *Service + parent string + googlecloudaiplatformv1retrievecontextsrequest *GoogleCloudAiplatformV1RetrieveContextsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RetrieveContexts: Retrieves relevant contexts for a query. +// +// - parent: The resource name of the Location from which to retrieve +// RagContexts. The users must have permission to make a call in the project. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) RetrieveContexts(parent string, googlecloudaiplatformv1retrievecontextsrequest *GoogleCloudAiplatformV1RetrieveContextsRequest) *ProjectsLocationsRetrieveContextsCall { + c := &ProjectsLocationsRetrieveContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1retrievecontextsrequest = googlecloudaiplatformv1retrievecontextsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsRetrieveContextsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRetrieveContextsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsRetrieveContextsCall) Context(ctx context.Context) *ProjectsLocationsRetrieveContextsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsRetrieveContextsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsRetrieveContextsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1retrievecontextsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:retrieveContexts") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.retrieveContexts" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1RetrieveContextsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsRetrieveContextsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RetrieveContextsResponse, 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 := &GoogleCloudAiplatformV1RetrieveContextsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsBatchPredictionJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GoogleTypeInterval: Represents a time interval, encoded as a Timestamp start -// (inclusive) and a Timestamp end (exclusive). The start must be less than or -// equal to the end. When the start equals the end, the interval is empty -// (matches no time). When both start and end are unspecified, the interval -// matches any time. -type GoogleTypeInterval struct { - // EndTime: Optional. Exclusive end of the interval. If specified, a Timestamp - // matching this interval will have to be before the end. - EndTime string `json:"endTime,omitempty"` - // StartTime: Optional. Inclusive start of the interval. If specified, a - // Timestamp matching this interval will have to be the same or after the - // start. - StartTime string `json:"startTime,omitempty"` - // ForceSendFields is a list of field names (e.g. "EndTime") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EndTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` +// Cancel: Cancels a BatchPredictionJob. Starts asynchronous cancellation on +// the BatchPredictionJob. The server makes the best effort to cancel the job, +// but success is not guaranteed. Clients can use +// JobService.GetBatchPredictionJob or other methods to check whether the +// cancellation succeeded or whether the job completed despite cancellation. On +// a successful cancellation, the BatchPredictionJob is not deleted;instead its +// BatchPredictionJob.state is set to `CANCELLED`. Any files already outputted +// by the job are not deleted. +// +// - name: The name of the BatchPredictionJob to cancel. Format: +// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict +// ion_job}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Cancel(name string, googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest) *ProjectsLocationsBatchPredictionJobsCancelCall { + c := &ProjectsLocationsBatchPredictionJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1cancelbatchpredictionjobrequest = googlecloudaiplatformv1cancelbatchpredictionjobrequest + return c } -func (s GoogleTypeInterval) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeInterval - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCancelCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c } -// GoogleTypeMoney: Represents an amount of money with its currency type. -type GoogleTypeMoney struct { - // CurrencyCode: The three-letter currency code defined in ISO 4217. - CurrencyCode string `json:"currencyCode,omitempty"` - // Nanos: Number of nano (10^-9) units of the amount. The value must be between - // -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` - // must be positive or zero. If `units` is zero, `nanos` can be positive, zero, - // or negative. If `units` is negative, `nanos` must be negative or zero. For - // example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. - Nanos int64 `json:"nanos,omitempty"` - // Units: The whole units of the amount. For example if `currencyCode` is - // "USD", then 1 unit is one US dollar. - Units int64 `json:"units,omitempty,string"` - // ForceSendFields is a list of field names (e.g. "CurrencyCode") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CurrencyCode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCancelCall { + c.ctx_ = ctx + return c } -func (s GoogleTypeMoney) MarshalJSON() ([]byte, error) { - type NoMethod GoogleTypeMoney - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -type DatasetsCreateCall struct { - s *Service - googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +func (c *ProjectsLocationsBatchPredictionJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelbatchpredictionjobrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Create: Creates a Dataset. -func (r *DatasetsService) Create(googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsCreateCall { - c := &DatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset - return c +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.cancel" call. +// 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 *ProjectsLocationsBatchPredictionJobsCancelCall) 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 } -// Parent sets the optional parameter "parent": Required. The resource name of -// the Location to create the Dataset in. Format: -// `projects/{project}/locations/{location}` -func (c *DatasetsCreateCall) Parent(parent string) *DatasetsCreateCall { - c.urlParams_.Set("parent", parent) +type ProjectsLocationsBatchPredictionJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a BatchPredictionJob. A BatchPredictionJob once created will +// right away be attempted to start. +// +// - parent: The resource name of the Location to create the BatchPredictionJob +// in. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Create(parent string, googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob) *ProjectsLocationsBatchPredictionJobsCreateCall { + c := &ProjectsLocationsBatchPredictionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchpredictionjob = googlecloudaiplatformv1batchpredictionjob return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsCreateCall) Fields(s ...googleapi.Field) *DatasetsCreateCall { +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsCreateCall) Context(ctx context.Context) *DatasetsCreateCall { +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsCreateCall) Header() http.Header { +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchpredictionjob) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.create" call. +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.create" call. // 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 +// *GoogleCloudAiplatformV1BatchPredictionJob.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37617,7 +41530,7 @@ func (c *DatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1BatchPredictionJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37630,7 +41543,7 @@ func (c *DatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin return ret, nil } -type DatasetsDeleteCall struct { +type ProjectsLocationsBatchPredictionJobsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -37638,12 +41551,14 @@ type DatasetsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Dataset. +// Delete: Deletes a BatchPredictionJob. Can only be called on jobs that +// already finished. // -// - name: The resource name of the Dataset to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *DatasetsService) Delete(name string) *DatasetsDeleteCall { - c := &DatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the BatchPredictionJob resource to be deleted. Format: +// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict +// ion_job}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *ProjectsLocationsBatchPredictionJobsDeleteCall { + c := &ProjectsLocationsBatchPredictionJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -37651,27 +41566,27 @@ func (r *DatasetsService) Delete(name string) *DatasetsDeleteCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDeleteCall { +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDeleteCall) Context(ctx context.Context) *DatasetsDeleteCall { +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -37689,13 +41604,13 @@ func (c *DatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.delete" call. +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.delete" call. // 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 *DatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37727,7 +41642,7 @@ func (c *DatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunnin return ret, nil } -type DatasetsGetCall struct { +type ProjectsLocationsBatchPredictionJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -37736,26 +41651,21 @@ type DatasetsGetCall struct { header_ http.Header } -// Get: Gets a Dataset. +// Get: Gets a BatchPredictionJob // -// - name: The name of the Dataset resource. -func (r *DatasetsService) Get(name string) *DatasetsGetCall { - c := &DatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the BatchPredictionJob resource. Format: +// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict +// ion_job}`. +func (r *ProjectsLocationsBatchPredictionJobsService) Get(name string) *ProjectsLocationsBatchPredictionJobsGetCall { + c := &ProjectsLocationsBatchPredictionJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *DatasetsGetCall) ReadMask(readMask string) *DatasetsGetCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37763,27 +41673,27 @@ func (c *DatasetsGetCall) Fields(s ...googleapi.Field) *DatasetsGetCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *DatasetsGetCall) IfNoneMatch(entityTag string) *DatasetsGetCall { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBatchPredictionJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsGetCall) Context(ctx context.Context) *DatasetsGetCall { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsGetCall) Header() http.Header { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -37804,13 +41714,13 @@ func (c *DatasetsGetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.get" call. +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1BatchPredictionJob.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { +func (c *ProjectsLocationsBatchPredictionJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37829,7 +41739,7 @@ func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Dataset{ + ret := &GoogleCloudAiplatformV1BatchPredictionJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37842,65 +41752,60 @@ func (c *DatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo return ret, nil } -type DatasetsListCall struct { +type ProjectsLocationsBatchPredictionJobsListCall struct { s *Service + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists Datasets in a Location. -func (r *DatasetsService) List() *DatasetsListCall { - c := &DatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// List: Lists BatchPredictionJobs in a Location. +// +// - parent: The resource name of the Location to list the BatchPredictionJobs +// from. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsBatchPredictionJobsService) List(parent string) *ProjectsLocationsBatchPredictionJobsListCall { + c := &ProjectsLocationsBatchPredictionJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `display_name`: supports = and != * `metadata_schema_uri`: -// supports = and != * `labels` supports general map functions that is: * -// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key -// existence * A key including a space must be quoted. `labels."a key". Some -// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" -func (c *DatasetsListCall) Filter(filter string) *DatasetsListCall { +// Filter sets the optional parameter "filter": The standard list filter. +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `model_display_name` supports `=`, `!=` comparisons. * `state` +// supports `=`, `!=` comparisons. * `create_time` supports `=`, `!=`,`<`, +// `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 format. * +// `labels` supports general map functions that is: `labels.key=value` - +// key:value equality `labels.key:* - key existence Some examples of using the +// filter are: * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*" * +// `state!="JOB_STATE_FAILED" OR display_name="my_job" * `NOT +// display_name="my_job" * `create_time>"2021-05-18T00:00:00Z" * +// `labels.keyA=valueA` * `labels.keyB:*` +func (c *ProjectsLocationsBatchPredictionJobsListCall) Filter(filter string) *ProjectsLocationsBatchPredictionJobsListCall { 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: * `display_name` * `create_time` * -// `update_time` -func (c *DatasetsListCall) OrderBy(orderBy string) *DatasetsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *DatasetsListCall) PageSize(pageSize int64) *DatasetsListCall { +func (c *ProjectsLocationsBatchPredictionJobsListCall) PageSize(pageSize int64) *ProjectsLocationsBatchPredictionJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *DatasetsListCall) PageToken(pageToken string) *DatasetsListCall { +// token. Typically obtained via +// ListBatchPredictionJobsResponse.next_page_token of the previous +// JobService.ListBatchPredictionJobs call. +func (c *ProjectsLocationsBatchPredictionJobsListCall) PageToken(pageToken string) *ProjectsLocationsBatchPredictionJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Parent sets the optional parameter "parent": Required. The name of the -// Dataset's parent resource. Format: `projects/{project}/locations/{location}` -func (c *DatasetsListCall) Parent(parent string) *DatasetsListCall { - c.urlParams_.Set("parent", parent) - return c -} - // ReadMask sets the optional parameter "readMask": Mask specifying which // fields to read. -func (c *DatasetsListCall) ReadMask(readMask string) *DatasetsListCall { +func (c *ProjectsLocationsBatchPredictionJobsListCall) ReadMask(readMask string) *ProjectsLocationsBatchPredictionJobsListCall { c.urlParams_.Set("readMask", readMask) return c } @@ -37908,7 +41813,7 @@ func (c *DatasetsListCall) ReadMask(readMask string) *DatasetsListCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall { +func (c *ProjectsLocationsBatchPredictionJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37916,27 +41821,27 @@ func (c *DatasetsListCall) Fields(s ...googleapi.Field) *DatasetsListCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *DatasetsListCall) IfNoneMatch(entityTag string) *DatasetsListCall { +func (c *ProjectsLocationsBatchPredictionJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBatchPredictionJobsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsListCall) Context(ctx context.Context) *DatasetsListCall { +func (c *ProjectsLocationsBatchPredictionJobsListCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsListCall) Header() http.Header { +func (c *ProjectsLocationsBatchPredictionJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsBatchPredictionJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -37944,23 +41849,28 @@ func (c *DatasetsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/datasets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.list" call. +// Do executes the "aiplatform.projects.locations.batchPredictionJobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDatasetsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudAiplatformV1ListBatchPredictionJobsResponse.ServerResponse.Header +// +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetsResponse, error) { +func (c *ProjectsLocationsBatchPredictionJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListBatchPredictionJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37979,7 +41889,7 @@ func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatf if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDatasetsResponse{ + ret := &GoogleCloudAiplatformV1ListBatchPredictionJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37995,7 +41905,7 @@ func (c *DatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatf // 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 *DatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetsResponse) error) error { +func (c *ProjectsLocationsBatchPredictionJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListBatchPredictionJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -38013,170 +41923,59 @@ func (c *DatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatf } } -type DatasetsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a Dataset. -// -// - name: Output only. Identifier. The resource name of the Dataset. -func (r *DatasetsService) Patch(name string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *DatasetsPatchCall { - c := &DatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. Updatable fields: * `display_name` * -// `description` * `labels` -func (c *DatasetsPatchCall) UpdateMask(updateMask string) *DatasetsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DatasetsPatchCall) Fields(s ...googleapi.Field) *DatasetsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DatasetsPatchCall) Context(ctx context.Context) *DatasetsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DatasetsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DatasetsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.datasets.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *DatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, 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 := &GoogleCloudAiplatformV1Dataset{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type DatasetsDatasetVersionsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCachedContentsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a version from a Dataset. +// Create: Creates cached content, this call will initialize the cached content +// in the data storage, and users need to pay for the cache data storage. // -// - parent: The name of the Dataset resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *DatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsCreateCall { - c := &DatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent resource where the cached content will be created. +func (r *ProjectsLocationsCachedContentsService) Create(parent string, googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent) *ProjectsLocationsCachedContentsCreateCall { + c := &ProjectsLocationsCachedContentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + c.googlecloudaiplatformv1cachedcontent = googlecloudaiplatformv1cachedcontent return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsCreateCall { +func (c *ProjectsLocationsCachedContentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *DatasetsDatasetVersionsCreateCall { +func (c *ProjectsLocationsCachedContentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsCachedContentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCachedContentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cachedcontent) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cachedContents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -38189,13 +41988,13 @@ func (c *DatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.create" call. +// Do executes the "aiplatform.projects.locations.cachedContents.create" call. // 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 +// *GoogleCloudAiplatformV1CachedContent.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCachedContentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38214,7 +42013,7 @@ func (c *DatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1CachedContent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38227,7 +42026,7 @@ func (c *DatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type DatasetsDatasetVersionsDeleteCall struct { +type ProjectsLocationsCachedContentsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -38235,13 +42034,11 @@ type DatasetsDatasetVersionsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Dataset version. +// Delete: Deletes cached content // -// - name: The resource name of the Dataset version to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *DatasetsDatasetVersionsService) Delete(name string) *DatasetsDatasetVersionsDeleteCall { - c := &DatasetsDatasetVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name referring to the cached content. +func (r *ProjectsLocationsCachedContentsService) Delete(name string) *ProjectsLocationsCachedContentsDeleteCall { + c := &ProjectsLocationsCachedContentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -38249,27 +42046,27 @@ func (r *DatasetsDatasetVersionsService) Delete(name string) *DatasetsDatasetVer // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsDeleteCall { +func (c *ProjectsLocationsCachedContentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *DatasetsDatasetVersionsDeleteCall { +func (c *ProjectsLocationsCachedContentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsCachedContentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCachedContentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -38287,13 +42084,13 @@ func (c *DatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.delete" call. +// Do executes the "aiplatform.projects.locations.cachedContents.delete" call. // 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 *DatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsCachedContentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38312,7 +42109,7 @@ func (c *DatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*G 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, @@ -38325,7 +42122,7 @@ func (c *DatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type DatasetsDatasetVersionsGetCall struct { +type ProjectsLocationsCachedContentsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -38334,28 +42131,19 @@ type DatasetsDatasetVersionsGetCall struct { header_ http.Header } -// Get: Gets a Dataset version. +// Get: Gets cached content configurations // -// - name: The resource name of the Dataset version to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *DatasetsDatasetVersionsService) Get(name string) *DatasetsDatasetVersionsGetCall { - c := &DatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name referring to the cached content. +func (r *ProjectsLocationsCachedContentsService) Get(name string) *ProjectsLocationsCachedContentsGetCall { + c := &ProjectsLocationsCachedContentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *DatasetsDatasetVersionsGetCall) ReadMask(readMask string) *DatasetsDatasetVersionsGetCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsCachedContentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38363,27 +42151,27 @@ func (c *DatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *DatasetsD // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *DatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsCachedContentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCachedContentsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsGetCall) Context(ctx context.Context) *DatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsCachedContentsGetCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsGetCall) Header() http.Header { +func (c *ProjectsLocationsCachedContentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCachedContentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -38404,13 +42192,13 @@ func (c *DatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.get" call. +// Do executes the "aiplatform.projects.locations.cachedContents.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1CachedContent.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { +func (c *ProjectsLocationsCachedContentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38429,7 +42217,7 @@ func (c *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DatasetVersion{ + ret := &GoogleCloudAiplatformV1CachedContent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38442,7 +42230,7 @@ func (c *DatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*Goog return ret, nil } -type DatasetsDatasetVersionsListCall struct { +type ProjectsLocationsCachedContentsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -38451,55 +42239,37 @@ type DatasetsDatasetVersionsListCall struct { header_ http.Header } -// List: Lists DatasetVersions in a Dataset. +// List: Lists cached contents in a project // -// - parent: The resource name of the Dataset to list DatasetVersions from. -// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *DatasetsDatasetVersionsService) List(parent string) *DatasetsDatasetVersionsListCall { - c := &DatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent, which owns this collection of cached contents. +func (r *ProjectsLocationsCachedContentsService) List(parent string) *ProjectsLocationsCachedContentsListCall { + c := &ProjectsLocationsCachedContentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *DatasetsDatasetVersionsListCall) Filter(filter string) *DatasetsDatasetVersionsListCall { - 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. -func (c *DatasetsDatasetVersionsListCall) OrderBy(orderBy string) *DatasetsDatasetVersionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *DatasetsDatasetVersionsListCall) PageSize(pageSize int64) *DatasetsDatasetVersionsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// cached contents to return. The service may return fewer than this value. If +// unspecified, some default (under maximum) number of items will be returned. +// The maximum value is 1000; values above 1000 will be coerced to 1000. +func (c *ProjectsLocationsCachedContentsListCall) PageSize(pageSize int64) *ProjectsLocationsCachedContentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *DatasetsDatasetVersionsListCall) PageToken(pageToken string) *DatasetsDatasetVersionsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListCachedContents` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `ListCachedContents` must match the call that provided the page token. +func (c *ProjectsLocationsCachedContentsListCall) PageToken(pageToken string) *ProjectsLocationsCachedContentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *DatasetsDatasetVersionsListCall) ReadMask(readMask string) *DatasetsDatasetVersionsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsCachedContentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38507,27 +42277,27 @@ func (c *DatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *Datasets // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *DatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsCachedContentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCachedContentsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsListCall) Context(ctx context.Context) *DatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsCachedContentsListCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsListCall) Header() http.Header { +func (c *ProjectsLocationsCachedContentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCachedContentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -38535,7 +42305,7 @@ func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cachedContents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -38548,13 +42318,13 @@ func (c *DatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.list" call. +// Do executes the "aiplatform.projects.locations.cachedContents.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDatasetVersionsResponse.ServerResponse.Header or +// *GoogleCloudAiplatformV1ListCachedContentsResponse.ServerResponse.Header or // (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetVersionsResponse, error) { +func (c *ProjectsLocationsCachedContentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListCachedContentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38573,7 +42343,7 @@ func (c *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDatasetVersionsResponse{ + ret := &GoogleCloudAiplatformV1ListCachedContentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38589,7 +42359,7 @@ func (c *DatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*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 *DatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetVersionsResponse) error) error { +func (c *ProjectsLocationsCachedContentsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListCachedContentsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -38607,29 +42377,30 @@ func (c *DatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*Goo } } -type DatasetsDatasetVersionsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCachedContentsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DatasetVersion. +// Patch: Updates cached content configurations // -// - name: Output only. Identifier. The resource name of the DatasetVersion. -func (r *DatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *DatasetsDatasetVersionsPatchCall { - c := &DatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Identifier. The server-generated resource name of the +// cached content Format: +// projects/{project}/locations/{location}/cachedContents/{cached_content}. +func (r *ProjectsLocationsCachedContentsService) Patch(name string, googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent) *ProjectsLocationsCachedContentsPatchCall { + c := &ProjectsLocationsCachedContentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + c.googlecloudaiplatformv1cachedcontent = googlecloudaiplatformv1cachedcontent return c } -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. Updatable fields: * `display_name` -func (c *DatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *DatasetsDatasetVersionsPatchCall { +// UpdateMask sets the optional parameter "updateMask": Required. The list of +// fields to update. +func (c *ProjectsLocationsCachedContentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCachedContentsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -38637,30 +42408,30 @@ func (c *DatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *Datase // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsPatchCall { +func (c *ProjectsLocationsCachedContentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *DatasetsDatasetVersionsPatchCall { +func (c *ProjectsLocationsCachedContentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsCachedContentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCachedContentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cachedcontent) if err != nil { return nil, err } @@ -38679,13 +42450,13 @@ func (c *DatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.patch" call. +// Do executes the "aiplatform.projects.locations.cachedContents.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1CachedContent.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { +func (c *ProjectsLocationsCachedContentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38704,7 +42475,7 @@ func (c *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DatasetVersion{ + ret := &GoogleCloudAiplatformV1CachedContent{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38717,68 +42488,68 @@ func (c *DatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type DatasetsDatasetVersionsRestoreCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCustomJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelcustomjobrequest *GoogleCloudAiplatformV1CancelCustomJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Restore: Restores a dataset version. +// Cancel: Cancels a CustomJob. Starts asynchronous cancellation on the +// CustomJob. The server makes a best effort to cancel the job, but success is +// not guaranteed. Clients can use JobService.GetCustomJob or other methods to +// check whether the cancellation succeeded or whether the job completed +// despite cancellation. On successful cancellation, the CustomJob is not +// deleted; instead it becomes a job with a CustomJob.error value with a +// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and +// CustomJob.state is set to `CANCELLED`. // -// - name: The name of the DatasetVersion resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *DatasetsDatasetVersionsService) Restore(name string) *DatasetsDatasetVersionsRestoreCall { - c := &DatasetsDatasetVersionsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the CustomJob to cancel. Format: +// `projects/{project}/locations/{location}/customJobs/{custom_job}`. +func (r *ProjectsLocationsCustomJobsService) Cancel(name string, googlecloudaiplatformv1cancelcustomjobrequest *GoogleCloudAiplatformV1CancelCustomJobRequest) *ProjectsLocationsCustomJobsCancelCall { + c := &ProjectsLocationsCustomJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1cancelcustomjobrequest = googlecloudaiplatformv1cancelcustomjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *DatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *DatasetsDatasetVersionsRestoreCall { +func (c *ProjectsLocationsCustomJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *DatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *DatasetsDatasetVersionsRestoreCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *DatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *DatasetsDatasetVersionsRestoreCall { +func (c *ProjectsLocationsCustomJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *DatasetsDatasetVersionsRestoreCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *DatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsCustomJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelcustomjobrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -38789,13 +42560,13 @@ func (c *DatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.datasets.datasetVersions.restore" call. +// Do executes the "aiplatform.projects.locations.customJobs.cancel" call. // 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 *DatasetsDatasetVersionsRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsCustomJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38814,7 +42585,7 @@ func (c *DatasetsDatasetVersionsRestoreCall) Do(opts ...googleapi.CallOption) (* 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, @@ -38827,59 +42598,60 @@ func (c *DatasetsDatasetVersionsRestoreCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type EndpointsComputeTokensCall struct { - s *Service - endpoint string - googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCustomJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1customjob *GoogleCloudAiplatformV1CustomJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ComputeTokens: Return a list of tokens based on the input text. +// Create: Creates a CustomJob. A created CustomJob right away will be +// attempted to be run. // -// - endpoint: The name of the Endpoint requested to get lists of tokens and -// token ids. -func (r *EndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *EndpointsComputeTokensCall { - c := &EndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest +// - parent: The resource name of the Location to create the CustomJob in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsCustomJobsService) Create(parent string, googlecloudaiplatformv1customjob *GoogleCloudAiplatformV1CustomJob) *ProjectsLocationsCustomJobsCreateCall { + c := &ProjectsLocationsCustomJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1customjob = googlecloudaiplatformv1customjob return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *EndpointsComputeTokensCall) Fields(s ...googleapi.Field) *EndpointsComputeTokensCall { +func (c *ProjectsLocationsCustomJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *EndpointsComputeTokensCall) Context(ctx context.Context) *EndpointsComputeTokensCall { +func (c *ProjectsLocationsCustomJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *EndpointsComputeTokensCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *EndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCustomJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1customjob) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -38887,18 +42659,18 @@ func (c *EndpointsComputeTokensCall) doRequest(alt string) (*http.Response, erro } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.endpoints.computeTokens" call. +// Do executes the "aiplatform.projects.locations.customJobs.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1CustomJob.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { +func (c *ProjectsLocationsCustomJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CustomJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38917,7 +42689,7 @@ func (c *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ + ret := &GoogleCloudAiplatformV1CustomJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38930,78 +42702,181 @@ func (c *EndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCl return ret, nil } -type EndpointsCountTokensCall struct { - s *Service - endpoint string - googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCustomJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CountTokens: Perform a token counting. +// Delete: Deletes a CustomJob. // -// - endpoint: The name of the Endpoint requested to perform token counting. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *EndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *EndpointsCountTokensCall { - c := &EndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest +// - name: The name of the CustomJob resource to be deleted. Format: +// `projects/{project}/locations/{location}/customJobs/{custom_job}`. +func (r *ProjectsLocationsCustomJobsService) Delete(name string) *ProjectsLocationsCustomJobsDeleteCall { + c := &ProjectsLocationsCustomJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *EndpointsCountTokensCall) Fields(s ...googleapi.Field) *EndpointsCountTokensCall { +func (c *ProjectsLocationsCustomJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *EndpointsCountTokensCall) Context(ctx context.Context) *EndpointsCountTokensCall { +func (c *ProjectsLocationsCustomJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *EndpointsCountTokensCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *EndpointsCountTokensCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCustomJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.customJobs.delete" call. +// 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 *ProjectsLocationsCustomJobsDeleteCall) 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 +} + +type ProjectsLocationsCustomJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a CustomJob. +// +// - name: The name of the CustomJob resource. Format: +// `projects/{project}/locations/{location}/customJobs/{custom_job}`. +func (r *ProjectsLocationsCustomJobsService) Get(name string) *ProjectsLocationsCustomJobsGetCall { + c := &ProjectsLocationsCustomJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsCustomJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCustomJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsCustomJobsGetCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsCustomJobsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsCustomJobsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.endpoints.countTokens" call. +// Do executes the "aiplatform.projects.locations.customJobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1CustomJob.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, error) { +func (c *ProjectsLocationsCustomJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CustomJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39020,7 +42895,7 @@ func (c *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CountTokensResponse{ + ret := &GoogleCloudAiplatformV1CustomJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39033,81 +42908,122 @@ func (c *EndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleClou return ret, nil } -type EndpointsGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCustomJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists CustomJobs in a Location. +// +// - parent: The resource name of the Location to list the CustomJobs from. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsCustomJobsService) List(parent string) *ProjectsLocationsCustomJobsListCall { + c := &ProjectsLocationsCustomJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports +// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 +// format. * `labels` supports general map functions that is: +// `labels.key=value` - key:value equality `labels.key:* - key existence Some +// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND +// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR +// display_name="my_job" * `NOT display_name="my_job" * +// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * +// `labels.keyB:*` +func (c *ProjectsLocationsCustomJobsListCall) Filter(filter string) *ProjectsLocationsCustomJobsListCall { + c.urlParams_.Set("filter", filter) + return c } -// GenerateContent: Generate content with multimodal inputs. -// -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *EndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsGenerateContentCall { - c := &EndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCustomJobsListCall) PageSize(pageSize int64) *ProjectsLocationsCustomJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListCustomJobsResponse.next_page_token of the +// previous JobService.ListCustomJobs call. +func (c *ProjectsLocationsCustomJobsListCall) PageToken(pageToken string) *ProjectsLocationsCustomJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsCustomJobsListCall) ReadMask(readMask string) *ProjectsLocationsCustomJobsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *EndpointsGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsGenerateContentCall { +func (c *ProjectsLocationsCustomJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCustomJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *EndpointsGenerateContentCall) Context(ctx context.Context) *EndpointsGenerateContentCall { +func (c *ProjectsLocationsCustomJobsListCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *EndpointsGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *EndpointsGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsCustomJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customJobs") 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{ - "model": c.model, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.endpoints.generateContent" call. +// Do executes the "aiplatform.projects.locations.customJobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// *GoogleCloudAiplatformV1ListCustomJobsResponse.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +func (c *ProjectsLocationsCustomJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListCustomJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39126,7 +43042,7 @@ func (c *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*Google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleCloudAiplatformV1ListCustomJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39139,63 +43055,81 @@ func (c *EndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*Google return ret, nil } -type EndpointsStreamGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - 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 *ProjectsLocationsCustomJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListCustomJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// StreamGenerateContent: Generate content with multimodal inputs with -// streaming support. +type ProjectsLocationsCustomJobsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *EndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *EndpointsStreamGenerateContentCall { - c := &EndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsCustomJobsOperationsService) Cancel(name string) *ProjectsLocationsCustomJobsOperationsCancelCall { + c := &ProjectsLocationsCustomJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *EndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *EndpointsStreamGenerateContentCall { +func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *EndpointsStreamGenerateContentCall) Context(ctx context.Context) *EndpointsStreamGenerateContentCall { +func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *EndpointsStreamGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *EndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCustomJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -39203,18 +43137,18 @@ func (c *EndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "model": c.model, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.endpoints.streamGenerateContent" call. +// Do executes the "aiplatform.projects.locations.customJobs.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +// *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 *ProjectsLocationsCustomJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39233,7 +43167,7 @@ func (c *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39246,128 +43180,74 @@ func (c *EndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type MediaUploadCall struct { - s *Service - parent string - googlecloudaiplatformv1uploadragfilerequest *GoogleCloudAiplatformV1UploadRagFileRequest - urlParams_ gensupport.URLParams - mediaInfo_ *gensupport.MediaInfo - ctx_ context.Context - header_ http.Header -} - -// Upload: Upload a file into a RagCorpus. -// -// - parent: The name of the RagCorpus resource into which to upload the file. -// Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *MediaService) Upload(parent string, googlecloudaiplatformv1uploadragfilerequest *GoogleCloudAiplatformV1UploadRagFileRequest) *MediaUploadCall { - c := &MediaUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1uploadragfilerequest = googlecloudaiplatformv1uploadragfilerequest - return c -} - -// Media specifies the media to upload in one or more chunks. The chunk size -// may be controlled by supplying a MediaOption generated by -// googleapi.ChunkSize. The chunk size defaults to -// googleapi.DefaultUploadChunkSize.The Content-Type header used in the upload -// request will be determined by sniffing the contents of r, unless a -// MediaOption generated by googleapi.ContentType is supplied. -// At most one of Media and ResumableMedia may be set. -func (c *MediaUploadCall) Media(r io.Reader, options ...googleapi.MediaOption) *MediaUploadCall { - c.mediaInfo_ = gensupport.NewInfoFromMedia(r, options) - return c +type ProjectsLocationsCustomJobsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ResumableMedia specifies the media to upload in chunks and can be canceled -// with ctx. -// -// Deprecated: use Media instead. +// 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`. // -// At most one of Media and ResumableMedia may be set. mediaType identifies the -// MIME media type of the upload, such as "image/png". If mediaType is "", it -// will be auto-detected. The provided ctx will supersede any context -// previously provided to the Context method. -func (c *MediaUploadCall) ResumableMedia(ctx context.Context, r io.ReaderAt, size int64, mediaType string) *MediaUploadCall { - c.ctx_ = ctx - c.mediaInfo_ = gensupport.NewInfoFromResumableMedia(r, size, mediaType) - return c -} - -// ProgressUpdater provides a callback function that will be called after every -// chunk. It should be a low-latency function in order to not slow down the -// upload operation. This should only be called when using ResumableMedia (as -// opposed to Media). -func (c *MediaUploadCall) ProgressUpdater(pu googleapi.ProgressUpdater) *MediaUploadCall { - c.mediaInfo_.SetProgressUpdater(pu) +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsCustomJobsOperationsService) Delete(name string) *ProjectsLocationsCustomJobsOperationsDeleteCall { + c := &ProjectsLocationsCustomJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MediaUploadCall) Fields(s ...googleapi.Field) *MediaUploadCall { +func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -// This context will supersede any context previously provided to the -// ResumableMedia method. -func (c *MediaUploadCall) Context(ctx context.Context) *MediaUploadCall { +func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MediaUploadCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MediaUploadCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1uploadragfilerequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragFiles:upload") - if c.mediaInfo_ != nil { - urls = googleapi.ResolveRelative(c.s.BasePath, "/upload/v1/{+parent}/ragFiles:upload") - c.urlParams_.Set("uploadType", c.mediaInfo_.UploadType()) - } - if body == nil { - body = new(bytes.Buffer) - reqHeaders.Set("Content-Type", "application/json") - } - body, getBody, cleanup := c.mediaInfo_.UploadRequest(reqHeaders, body) - defer cleanup() + 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 - req.GetBody = getBody 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 "aiplatform.media.upload" call. +// Do executes the "aiplatform.projects.locations.customJobs.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1UploadRagFileResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1UploadRagFileResponse, error) { +// *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 *ProjectsLocationsCustomJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39386,24 +43266,7 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - rx := c.mediaInfo_.ResumableUpload(res.Header.Get("Location")) - if rx != nil { - rx.Client = c.s.client - rx.UserAgent = c.s.userAgent() - ctx := c.ctx_ - if ctx == nil { - ctx = context.TODO() - } - res, err = rx.Upload(ctx) - if err != nil { - return nil, err - } - defer res.Body.Close() - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - } - ret := &GoogleCloudAiplatformV1UploadRagFileResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39416,7 +43279,7 @@ func (c *MediaUploadCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatfo return ret, nil } -type ProjectsGetCacheConfigCall struct { +type ProjectsLocationsCustomJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -39425,12 +43288,13 @@ type ProjectsGetCacheConfigCall struct { header_ http.Header } -// GetCacheConfig: Gets a GenAI cache config. +// 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: Name of the cache config. Format: - -// `projects/{project}/cacheConfig`. -func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCall { - c := &ProjectsGetCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsCustomJobsOperationsService) Get(name string) *ProjectsLocationsCustomJobsOperationsGetCall { + c := &ProjectsLocationsCustomJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -39438,7 +43302,7 @@ func (r *ProjectsService) GetCacheConfig(name string) *ProjectsGetCacheConfigCal // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsGetCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsGetCacheConfigCall { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39446,27 +43310,27 @@ func (c *ProjectsGetCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsGetCa // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsGetCacheConfigCall) IfNoneMatch(entityTag string) *ProjectsGetCacheConfigCall { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsGetCacheConfigCall) Context(ctx context.Context) *ProjectsGetCacheConfigCall { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsGetCacheConfigCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsGetCacheConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -39487,13 +43351,13 @@ func (c *ProjectsGetCacheConfigCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.getCacheConfig" call. +// Do executes the "aiplatform.projects.locations.customJobs.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CacheConfig.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CacheConfig, error) { +func (c *ProjectsLocationsCustomJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39512,7 +43376,7 @@ func (c *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CacheConfig{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39525,61 +43389,87 @@ func (c *ProjectsGetCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleCl return ret, nil } -type ProjectsUpdateCacheConfigCall struct { - s *Service - name string - googlecloudaiplatformv1cacheconfig *GoogleCloudAiplatformV1CacheConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsCustomJobsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateCacheConfig: Updates a cache config. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - name: Identifier. Name of the cache config. Format: - -// `projects/{project}/cacheConfig`. -func (r *ProjectsService) UpdateCacheConfig(name string, googlecloudaiplatformv1cacheconfig *GoogleCloudAiplatformV1CacheConfig) *ProjectsUpdateCacheConfigCall { - c := &ProjectsUpdateCacheConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsCustomJobsOperationsService) List(name string) *ProjectsLocationsCustomJobsOperationsListCall { + c := &ProjectsLocationsCustomJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1cacheconfig = googlecloudaiplatformv1cacheconfig + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsCustomJobsOperationsListCall) Filter(filter string) *ProjectsLocationsCustomJobsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsCustomJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCustomJobsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsCustomJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCustomJobsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsUpdateCacheConfigCall) Fields(s ...googleapi.Field) *ProjectsUpdateCacheConfigCall { +func (c *ProjectsLocationsCustomJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsCustomJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsUpdateCacheConfigCall) Context(ctx context.Context) *ProjectsUpdateCacheConfigCall { +func (c *ProjectsLocationsCustomJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsUpdateCacheConfigCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsUpdateCacheConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cacheconfig) - if err != nil { - return nil, err +func (c *ProjectsLocationsCustomJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -39590,13 +43480,13 @@ func (c *ProjectsUpdateCacheConfigCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.updateCacheConfig" call. +// Do executes the "aiplatform.projects.locations.customJobs.operations.list" call. // 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 +// *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 *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsCustomJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39615,7 +43505,7 @@ func (c *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*Googl 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, @@ -39628,61 +43518,90 @@ func (c *ProjectsUpdateCacheConfigCall) Do(opts ...googleapi.CallOption) (*Googl return ret, nil } -type ProjectsLocationsAugmentPromptCall struct { - s *Service - parent string - googlecloudaiplatformv1augmentpromptrequest *GoogleCloudAiplatformV1AugmentPromptRequest - 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 *ProjectsLocationsCustomJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// AugmentPrompt: Given an input prompt, it returns augmented prompt from -// vertex rag store to guide LLM towards generating grounded responses. +type ProjectsLocationsCustomJobsOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - parent: The resource name of the Location from which to augment prompt. -// The users must have permission to make a call in the project. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) AugmentPrompt(parent string, googlecloudaiplatformv1augmentpromptrequest *GoogleCloudAiplatformV1AugmentPromptRequest) *ProjectsLocationsAugmentPromptCall { - c := &ProjectsLocationsAugmentPromptCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1augmentpromptrequest = googlecloudaiplatformv1augmentpromptrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsCustomJobsOperationsService) Wait(name string) *ProjectsLocationsCustomJobsOperationsWaitCall { + c := &ProjectsLocationsCustomJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsCustomJobsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAugmentPromptCall) Fields(s ...googleapi.Field) *ProjectsLocationsAugmentPromptCall { +func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAugmentPromptCall) Context(ctx context.Context) *ProjectsLocationsAugmentPromptCall { +func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAugmentPromptCall) Header() http.Header { +func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAugmentPromptCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsCustomJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1augmentpromptrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:augmentPrompt") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -39690,18 +43609,18 @@ func (c *ProjectsLocationsAugmentPromptCall) doRequest(alt string) (*http.Respon } 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 "aiplatform.projects.locations.augmentPrompt" call. +// Do executes the "aiplatform.projects.locations.customJobs.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1AugmentPromptResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsAugmentPromptCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AugmentPromptResponse, error) { +func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39720,7 +43639,7 @@ func (c *ProjectsLocationsAugmentPromptCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1AugmentPromptResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39733,62 +43652,61 @@ func (c *ProjectsLocationsAugmentPromptCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsCorroborateContentCall struct { - s *Service - parent string - googlecloudaiplatformv1corroboratecontentrequest *GoogleCloudAiplatformV1CorroborateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataLabelingJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1canceldatalabelingjobrequest *GoogleCloudAiplatformV1CancelDataLabelingJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CorroborateContent: Given an input text, it returns a score that evaluates -// the factuality of the text. It also extracts and returns claims from the -// text and provides supporting facts. +// Cancel: Cancels a DataLabelingJob. Success of cancellation is not +// guaranteed. // -// - parent: The resource name of the Location from which to corroborate text. -// The users must have permission to make a call in the project. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) CorroborateContent(parent string, googlecloudaiplatformv1corroboratecontentrequest *GoogleCloudAiplatformV1CorroborateContentRequest) *ProjectsLocationsCorroborateContentCall { - c := &ProjectsLocationsCorroborateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1corroboratecontentrequest = googlecloudaiplatformv1corroboratecontentrequest +// - name: The name of the DataLabelingJob. Format: +// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo +// b}`. +func (r *ProjectsLocationsDataLabelingJobsService) Cancel(name string, googlecloudaiplatformv1canceldatalabelingjobrequest *GoogleCloudAiplatformV1CancelDataLabelingJobRequest) *ProjectsLocationsDataLabelingJobsCancelCall { + c := &ProjectsLocationsDataLabelingJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1canceldatalabelingjobrequest = googlecloudaiplatformv1canceldatalabelingjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCorroborateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsCorroborateContentCall { +func (c *ProjectsLocationsDataLabelingJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCorroborateContentCall) Context(ctx context.Context) *ProjectsLocationsCorroborateContentCall { +func (c *ProjectsLocationsDataLabelingJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCorroborateContentCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCorroborateContentCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1corroboratecontentrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1canceldatalabelingjobrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:corroborateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -39796,18 +43714,18 @@ func (c *ProjectsLocationsCorroborateContentCall) doRequest(alt string) (*http.R } 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 "aiplatform.projects.locations.corroborateContent" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CorroborateContentResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCorroborateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CorroborateContentResponse, error) { +// *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 *ProjectsLocationsDataLabelingJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39826,7 +43744,7 @@ func (c *ProjectsLocationsCorroborateContentCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CorroborateContentResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39839,59 +43757,59 @@ func (c *ProjectsLocationsCorroborateContentCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsEvaluateInstancesCall struct { - s *Service - location string - googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataLabelingJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1datalabelingjob *GoogleCloudAiplatformV1DataLabelingJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EvaluateInstances: Evaluates instances based on a given metric. +// Create: Creates a DataLabelingJob. // -// - location: The resource name of the Location to evaluate the instances. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) EvaluateInstances(location string, googlecloudaiplatformv1evaluateinstancesrequest *GoogleCloudAiplatformV1EvaluateInstancesRequest) *ProjectsLocationsEvaluateInstancesCall { - c := &ProjectsLocationsEvaluateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location - c.googlecloudaiplatformv1evaluateinstancesrequest = googlecloudaiplatformv1evaluateinstancesrequest +// - parent: The parent of the DataLabelingJob. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDataLabelingJobsService) Create(parent string, googlecloudaiplatformv1datalabelingjob *GoogleCloudAiplatformV1DataLabelingJob) *ProjectsLocationsDataLabelingJobsCreateCall { + c := &ProjectsLocationsDataLabelingJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1datalabelingjob = googlecloudaiplatformv1datalabelingjob return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEvaluateInstancesCall) Fields(s ...googleapi.Field) *ProjectsLocationsEvaluateInstancesCall { +func (c *ProjectsLocationsDataLabelingJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEvaluateInstancesCall) Context(ctx context.Context) *ProjectsLocationsEvaluateInstancesCall { +func (c *ProjectsLocationsDataLabelingJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEvaluateInstancesCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEvaluateInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1evaluateinstancesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datalabelingjob) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}:evaluateInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataLabelingJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -39899,18 +43817,18 @@ func (c *ProjectsLocationsEvaluateInstancesCall) doRequest(alt string) (*http.Re } 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 "aiplatform.projects.locations.evaluateInstances" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1EvaluateInstancesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1DataLabelingJob.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EvaluateInstancesResponse, error) { +func (c *ProjectsLocationsDataLabelingJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DataLabelingJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39929,7 +43847,7 @@ func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1EvaluateInstancesResponse{ + ret := &GoogleCloudAiplatformV1DataLabelingJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39942,20 +43860,21 @@ func (c *ProjectsLocationsEvaluateInstancesCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataLabelingJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets information about a location. +// Delete: Deletes a DataLabelingJob. // -// - name: Resource name for the location. -func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { - c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DataLabelingJob to be deleted. Format: +// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo +// b}`. +func (r *ProjectsLocationsDataLabelingJobsService) Delete(name string) *ProjectsLocationsDataLabelingJobsDeleteCall { + c := &ProjectsLocationsDataLabelingJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -39963,45 +43882,34 @@ func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall { +func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsDeleteCall) 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 *ProjectsLocationsDataLabelingJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -40012,13 +43920,13 @@ func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.get" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationLocation.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudLocationLocation, error) { +func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40037,7 +43945,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationLocation{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40050,7 +43958,7 @@ func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleClou return ret, nil } -type ProjectsLocationsListCall struct { +type ProjectsLocationsDataLabelingJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -40059,43 +43967,21 @@ type ProjectsLocationsListCall struct { header_ http.Header } -// List: Lists information about the supported locations for this service. +// Get: Gets a DataLabelingJob. // -// - 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)} +// - name: The name of the DataLabelingJob. Format: +// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo +// b}`. +func (r *ProjectsLocationsDataLabelingJobsService) Get(name string) *ProjectsLocationsDataLabelingJobsGetCall { + c := &ProjectsLocationsDataLabelingJobsGetCall{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 // details. -func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDataLabelingJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40103,27 +43989,27 @@ func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocati // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDataLabelingJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall { +func (c *ProjectsLocationsDataLabelingJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsListCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsGetCall) 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 *ProjectsLocationsDataLabelingJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -40131,7 +44017,7 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error 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 := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -40144,13 +44030,13 @@ func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.list" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudLocationListLocationsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1DataLabelingJob.ServerResponse.Header or (if a // response was returned 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) (*GoogleCloudLocationListLocationsResponse, error) { +func (c *ProjectsLocationsDataLabelingJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DataLabelingJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40169,7 +44055,7 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudLocationListLocationsResponse{ + ret := &GoogleCloudAiplatformV1DataLabelingJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40182,211 +44068,132 @@ func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*GoogleClo return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*GoogleCloudLocationListLocationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsRetrieveContextsCall struct { - s *Service - parent string - googlecloudaiplatformv1retrievecontextsrequest *GoogleCloudAiplatformV1RetrieveContextsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDataLabelingJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RetrieveContexts: Retrieves relevant contexts for a query. +// List: Lists DataLabelingJobs in a Location. // -// - parent: The resource name of the Location from which to retrieve -// RagContexts. The users must have permission to make a call in the project. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsService) RetrieveContexts(parent string, googlecloudaiplatformv1retrievecontextsrequest *GoogleCloudAiplatformV1RetrieveContextsRequest) *ProjectsLocationsRetrieveContextsCall { - c := &ProjectsLocationsRetrieveContextsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent of the DataLabelingJob. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDataLabelingJobsService) List(parent string) *ProjectsLocationsDataLabelingJobsListCall { + c := &ProjectsLocationsDataLabelingJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1retrievecontextsrequest = googlecloudaiplatformv1retrievecontextsrequest return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsRetrieveContextsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRetrieveContextsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// Filter sets the optional parameter "filter": The standard list filter. +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports +// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 +// format. * `labels` supports general map functions that is: +// `labels.key=value` - key:value equality `labels.key:* - key existence Some +// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND +// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR +// display_name="my_job" * `NOT display_name="my_job" * +// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * +// `labels.keyB:*` +func (c *ProjectsLocationsDataLabelingJobsListCall) Filter(filter string) *ProjectsLocationsDataLabelingJobsListCall { + c.urlParams_.Set("filter", filter) return c } -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRetrieveContextsCall) Context(ctx context.Context) *ProjectsLocationsRetrieveContextsCall { - c.ctx_ = ctx +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by, sorted in ascending order by default. Use `desc` after a +// field name for descending. +func (c *ProjectsLocationsDataLabelingJobsListCall) OrderBy(orderBy string) *ProjectsLocationsDataLabelingJobsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsRetrieveContextsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRetrieveContextsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1retrievecontextsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:retrieveContexts") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.retrieveContexts" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1RetrieveContextsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsRetrieveContextsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RetrieveContextsResponse, 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 := &GoogleCloudAiplatformV1RetrieveContextsResponse{ - 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 +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDataLabelingJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDataLabelingJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -type ProjectsLocationsBatchPredictionJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDataLabelingJobsListCall) PageToken(pageToken string) *ProjectsLocationsDataLabelingJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -// Cancel: Cancels a BatchPredictionJob. Starts asynchronous cancellation on -// the BatchPredictionJob. The server makes the best effort to cancel the job, -// but success is not guaranteed. Clients can use -// JobService.GetBatchPredictionJob or other methods to check whether the -// cancellation succeeded or whether the job completed despite cancellation. On -// a successful cancellation, the BatchPredictionJob is not deleted;instead its -// BatchPredictionJob.state is set to `CANCELLED`. Any files already outputted -// by the job are not deleted. -// -// - name: The name of the BatchPredictionJob to cancel. Format: -// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict -// ion_job}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Cancel(name string, googlecloudaiplatformv1cancelbatchpredictionjobrequest *GoogleCloudAiplatformV1CancelBatchPredictionJobRequest) *ProjectsLocationsBatchPredictionJobsCancelCall { - c := &ProjectsLocationsBatchPredictionJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1cancelbatchpredictionjobrequest = googlecloudaiplatformv1cancelbatchpredictionjobrequest +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. FieldMask represents a set of symbolic field paths. For +// example, the mask can be `paths: "name". The "name" here is a field in +// DataLabelingJob. If this field is not set, all fields of the DataLabelingJob +// are returned. +func (c *ProjectsLocationsDataLabelingJobsListCall) ReadMask(readMask string) *ProjectsLocationsDataLabelingJobsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCancelCall { +func (c *ProjectsLocationsDataLabelingJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDataLabelingJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCancelCall { +func (c *ProjectsLocationsDataLabelingJobsListCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelbatchpredictionjobrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDataLabelingJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataLabelingJobs") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.cancel" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.list" call. // 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 *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListDataLabelingJobsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDataLabelingJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDataLabelingJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40405,7 +44212,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListDataLabelingJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40418,60 +44225,81 @@ func (c *ProjectsLocationsBatchPredictionJobsCancelCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsBatchPredictionJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob - 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 *ProjectsLocationsDataLabelingJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDataLabelingJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Create: Creates a BatchPredictionJob. A BatchPredictionJob once created will -// right away be attempted to start. -// -// - parent: The resource name of the Location to create the BatchPredictionJob -// in. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Create(parent string, googlecloudaiplatformv1batchpredictionjob *GoogleCloudAiplatformV1BatchPredictionJob) *ProjectsLocationsBatchPredictionJobsCreateCall { - c := &ProjectsLocationsBatchPredictionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchpredictionjob = googlecloudaiplatformv1batchpredictionjob +type ProjectsLocationsDataLabelingJobsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDataLabelingJobsOperationsService) Cancel(name string) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { + c := &ProjectsLocationsDataLabelingJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsCreateCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsCreateCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchpredictionjob) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -40479,18 +44307,18 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) doRequest(alt string) ( } 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 "aiplatform.projects.locations.batchPredictionJobs.create" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1BatchPredictionJob.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, error) { +// *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 *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40509,7 +44337,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1BatchPredictionJob{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40522,7 +44350,7 @@ func (c *ProjectsLocationsBatchPredictionJobsCreateCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsBatchPredictionJobsDeleteCall struct { +type ProjectsLocationsDataLabelingJobsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -40530,14 +44358,14 @@ type ProjectsLocationsBatchPredictionJobsDeleteCall struct { header_ http.Header } -// Delete: Deletes a BatchPredictionJob. Can only be called on jobs that -// already finished. +// 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 BatchPredictionJob resource to be deleted. Format: -// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict -// ion_job}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *ProjectsLocationsBatchPredictionJobsDeleteCall { - c := &ProjectsLocationsBatchPredictionJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsDataLabelingJobsOperationsService) Delete(name string) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { + c := &ProjectsLocationsDataLabelingJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -40545,27 +44373,27 @@ func (r *ProjectsLocationsBatchPredictionJobsService) Delete(name string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsDeleteCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsDeleteCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -40583,13 +44411,13 @@ func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.delete" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.delete" call. // 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 *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40608,7 +44436,7 @@ func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.Ca 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, @@ -40621,7 +44449,7 @@ func (c *ProjectsLocationsBatchPredictionJobsDeleteCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsBatchPredictionJobsGetCall struct { +type ProjectsLocationsDataLabelingJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -40630,13 +44458,13 @@ type ProjectsLocationsBatchPredictionJobsGetCall struct { header_ http.Header } -// Get: Gets a BatchPredictionJob +// 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 BatchPredictionJob resource. Format: -// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_predict -// ion_job}`. -func (r *ProjectsLocationsBatchPredictionJobsService) Get(name string) *ProjectsLocationsBatchPredictionJobsGetCall { - c := &ProjectsLocationsBatchPredictionJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDataLabelingJobsOperationsService) Get(name string) *ProjectsLocationsDataLabelingJobsOperationsGetCall { + c := &ProjectsLocationsDataLabelingJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -40644,7 +44472,7 @@ func (r *ProjectsLocationsBatchPredictionJobsService) Get(name string) *Projects // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsGetCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40652,27 +44480,27 @@ func (c *ProjectsLocationsBatchPredictionJobsGetCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsBatchPredictionJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsBatchPredictionJobsGetCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsGetCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsGetCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -40693,13 +44521,13 @@ func (c *ProjectsLocationsBatchPredictionJobsGetCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.batchPredictionJobs.get" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1BatchPredictionJob.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsBatchPredictionJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchPredictionJob, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40718,7 +44546,7 @@ func (c *ProjectsLocationsBatchPredictionJobsGetCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1BatchPredictionJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40731,68 +44559,49 @@ func (c *ProjectsLocationsBatchPredictionJobsGetCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsBatchPredictionJobsListCall struct { +type ProjectsLocationsDataLabelingJobsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists BatchPredictionJobs in a Location. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the Location to list the BatchPredictionJobs -// from. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsBatchPredictionJobsService) List(parent string) *ProjectsLocationsBatchPredictionJobsListCall { - c := &ProjectsLocationsBatchPredictionJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDataLabelingJobsOperationsService) List(name string) *ProjectsLocationsDataLabelingJobsOperationsListCall { + c := &ProjectsLocationsDataLabelingJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `model_display_name` supports `=`, `!=` comparisons. * `state` -// supports `=`, `!=` comparisons. * `create_time` supports `=`, `!=`,`<`, -// `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 format. * -// `labels` supports general map functions that is: `labels.key=value` - -// key:value equality `labels.key:* - key existence Some examples of using the -// filter are: * `state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*" * -// `state!="JOB_STATE_FAILED" OR display_name="my_job" * `NOT -// display_name="my_job" * `create_time>"2021-05-18T00:00:00Z" * -// `labels.keyA=valueA` * `labels.keyB:*` -func (c *ProjectsLocationsBatchPredictionJobsListCall) Filter(filter string) *ProjectsLocationsBatchPredictionJobsListCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Filter(filter string) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsBatchPredictionJobsListCall) PageSize(pageSize int64) *ProjectsLocationsBatchPredictionJobsListCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via -// ListBatchPredictionJobsResponse.next_page_token of the previous -// JobService.ListBatchPredictionJobs call. -func (c *ProjectsLocationsBatchPredictionJobsListCall) PageToken(pageToken string) *ProjectsLocationsBatchPredictionJobsListCall { +// token. +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsBatchPredictionJobsListCall) ReadMask(readMask string) *ProjectsLocationsBatchPredictionJobsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsBatchPredictionJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsBatchPredictionJobsListCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40800,27 +44609,27 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) Fields(s ...googleapi.Fie // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsBatchPredictionJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsBatchPredictionJobsListCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsBatchPredictionJobsListCall) Context(ctx context.Context) *ProjectsLocationsBatchPredictionJobsListCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsBatchPredictionJobsListCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsBatchPredictionJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -40828,7 +44637,7 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) doRequest(alt string) (*h var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/batchPredictionJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -40836,20 +44645,18 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) doRequest(alt string) (*h } 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 "aiplatform.projects.locations.batchPredictionJobs.list" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListBatchPredictionJobsResponse.ServerResponse.Header -// -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// -// Use googleapi.IsNotModified to check whether the returned error was because +// *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 *ProjectsLocationsBatchPredictionJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListBatchPredictionJobsResponse, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40868,7 +44675,7 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListBatchPredictionJobsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40884,7 +44691,7 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) Do(opts ...googleapi.Call // 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 *ProjectsLocationsBatchPredictionJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListBatchPredictionJobsResponse) error) error { +func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -40902,110 +44709,7 @@ func (c *ProjectsLocationsBatchPredictionJobsListCall) Pages(ctx context.Context } } -type ProjectsLocationsCachedContentsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates cached content, this call will initialize the cached content -// in the data storage, and users need to pay for the cache data storage. -// -// - parent: The parent resource where the cached content will be created. -func (r *ProjectsLocationsCachedContentsService) Create(parent string, googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent) *ProjectsLocationsCachedContentsCreateCall { - c := &ProjectsLocationsCachedContentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1cachedcontent = googlecloudaiplatformv1cachedcontent - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCachedContentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCachedContentsCreateCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCachedContentsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCachedContentsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cachedcontent) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cachedContents") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.cachedContents.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CachedContent.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsCachedContentsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, 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 := &GoogleCloudAiplatformV1CachedContent{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsCachedContentsDeleteCall struct { +type ProjectsLocationsDataLabelingJobsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -41013,46 +44717,63 @@ type ProjectsLocationsCachedContentsDeleteCall struct { header_ http.Header } -// Delete: Deletes cached content +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - name: The resource name referring to the cached content. -func (r *ProjectsLocationsCachedContentsService) Delete(name string) *ProjectsLocationsCachedContentsDeleteCall { - c := &ProjectsLocationsCachedContentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsDataLabelingJobsOperationsService) Wait(name string) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { + c := &ProjectsLocationsDataLabelingJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCachedContentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsDeleteCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCachedContentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsDeleteCall { +func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCachedContentsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCachedContentsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -41063,13 +44784,13 @@ func (c *ProjectsLocationsCachedContentsDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.cachedContents.delete" call. +// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.wait" call. // 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 *ProjectsLocationsCachedContentsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41088,7 +44809,7 @@ func (c *ProjectsLocationsCachedContentsDeleteCall) Do(opts ...googleapi.CallOpt 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, @@ -41101,83 +44822,78 @@ func (c *ProjectsLocationsCachedContentsDeleteCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsCachedContentsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets cached content configurations +// Create: Creates a Dataset. // -// - name: The resource name referring to the cached content. -func (r *ProjectsLocationsCachedContentsService) Get(name string) *ProjectsLocationsCachedContentsGetCall { - c := &ProjectsLocationsCachedContentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create the Dataset in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDatasetsService) Create(parent string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *ProjectsLocationsDatasetsCreateCall { + c := &ProjectsLocationsDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCachedContentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsGetCall { +func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCachedContentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCachedContentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCachedContentsGetCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsGetCall { +func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCachedContentsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCachedContentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasets") 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 "aiplatform.projects.locations.cachedContents.get" call. +// Do executes the "aiplatform.projects.locations.datasets.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CachedContent.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCachedContentsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, error) { +func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41196,7 +44912,7 @@ func (c *ProjectsLocationsCachedContentsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CachedContent{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41209,101 +44925,72 @@ func (c *ProjectsLocationsCachedContentsGetCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsCachedContentsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists cached contents in a project +// Delete: Deletes a Dataset. // -// - parent: The parent, which owns this collection of cached contents. -func (r *ProjectsLocationsCachedContentsService) List(parent string) *ProjectsLocationsCachedContentsListCall { - c := &ProjectsLocationsCachedContentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// cached contents to return. The service may return fewer than this value. If -// unspecified, some default (under maximum) number of items will be returned. -// The maximum value is 1000; values above 1000 will be coerced to 1000. -func (c *ProjectsLocationsCachedContentsListCall) PageSize(pageSize int64) *ProjectsLocationsCachedContentsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListCachedContents` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `ListCachedContents` must match the call that provided the page token. -func (c *ProjectsLocationsCachedContentsListCall) PageToken(pageToken string) *ProjectsLocationsCachedContentsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The resource name of the Dataset to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocationsDatasetsDeleteCall { + c := &ProjectsLocationsDatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCachedContentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsListCall { +func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCachedContentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCachedContentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCachedContentsListCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsListCall { +func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCachedContentsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCachedContentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/cachedContents") + 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 "aiplatform.projects.locations.cachedContents.list" call. +// Do executes the "aiplatform.projects.locations.datasets.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListCachedContentsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCachedContentsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListCachedContentsResponse, error) { +func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41322,103 +45009,74 @@ func (c *ProjectsLocationsCachedContentsListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListCachedContentsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsCachedContentsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListCachedContentsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } + 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 } -type ProjectsLocationsCachedContentsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsExportCall struct { + s *Service + name string + googlecloudaiplatformv1exportdatarequest *GoogleCloudAiplatformV1ExportDataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates cached content configurations +// Export: Exports data from a Dataset. // -// - name: Immutable. Identifier. The server-generated resource name of the -// cached content Format: -// projects/{project}/locations/{location}/cachedContents/{cached_content}. -func (r *ProjectsLocationsCachedContentsService) Patch(name string, googlecloudaiplatformv1cachedcontent *GoogleCloudAiplatformV1CachedContent) *ProjectsLocationsCachedContentsPatchCall { - c := &ProjectsLocationsCachedContentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsService) Export(name string, googlecloudaiplatformv1exportdatarequest *GoogleCloudAiplatformV1ExportDataRequest) *ProjectsLocationsDatasetsExportCall { + c := &ProjectsLocationsDatasetsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1cachedcontent = googlecloudaiplatformv1cachedcontent - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *ProjectsLocationsCachedContentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsCachedContentsPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.googlecloudaiplatformv1exportdatarequest = googlecloudaiplatformv1exportdatarequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCachedContentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsCachedContentsPatchCall { +func (c *ProjectsLocationsDatasetsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsExportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCachedContentsPatchCall) Context(ctx context.Context) *ProjectsLocationsCachedContentsPatchCall { +func (c *ProjectsLocationsDatasetsExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsExportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCachedContentsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsExportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCachedContentsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsExportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cachedcontent) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportdatarequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -41429,13 +45087,13 @@ func (c *ProjectsLocationsCachedContentsPatchCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.cachedContents.patch" call. +// Do executes the "aiplatform.projects.locations.datasets.export" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CachedContent.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCachedContentsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CachedContent, error) { +func (c *ProjectsLocationsDatasetsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41454,7 +45112,7 @@ func (c *ProjectsLocationsCachedContentsPatchCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CachedContent{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41467,68 +45125,73 @@ func (c *ProjectsLocationsCachedContentsPatchCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsCustomJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelcustomjobrequest *GoogleCloudAiplatformV1CancelCustomJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a CustomJob. Starts asynchronous cancellation on the -// CustomJob. The server makes a best effort to cancel the job, but success is -// not guaranteed. Clients can use JobService.GetCustomJob or other methods to -// check whether the cancellation succeeded or whether the job completed -// despite cancellation. On successful cancellation, the CustomJob is not -// deleted; instead it becomes a job with a CustomJob.error value with a -// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and -// CustomJob.state is set to `CANCELLED`. +// Get: Gets a Dataset. // -// - name: The name of the CustomJob to cancel. Format: -// `projects/{project}/locations/{location}/customJobs/{custom_job}`. -func (r *ProjectsLocationsCustomJobsService) Cancel(name string, googlecloudaiplatformv1cancelcustomjobrequest *GoogleCloudAiplatformV1CancelCustomJobRequest) *ProjectsLocationsCustomJobsCancelCall { - c := &ProjectsLocationsCustomJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Dataset resource. +func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall { + c := &ProjectsLocationsDatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1cancelcustomjobrequest = googlecloudaiplatformv1cancelcustomjobrequest + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsGetCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsCancelCall { +func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsCancelCall { +func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelcustomjobrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + 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 } @@ -41539,13 +45202,13 @@ func (c *ProjectsLocationsCustomJobsCancelCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.get" call. // 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 *ProjectsLocationsCustomJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41564,7 +45227,7 @@ func (c *ProjectsLocationsCustomJobsCancelCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1Dataset{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41577,60 +45240,59 @@ func (c *ProjectsLocationsCustomJobsCancelCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsCustomJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1customjob *GoogleCloudAiplatformV1CustomJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsImportCall struct { + s *Service + name string + googlecloudaiplatformv1importdatarequest *GoogleCloudAiplatformV1ImportDataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a CustomJob. A created CustomJob right away will be -// attempted to be run. +// Import: Imports data into a Dataset. // -// - parent: The resource name of the Location to create the CustomJob in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsCustomJobsService) Create(parent string, googlecloudaiplatformv1customjob *GoogleCloudAiplatformV1CustomJob) *ProjectsLocationsCustomJobsCreateCall { - c := &ProjectsLocationsCustomJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1customjob = googlecloudaiplatformv1customjob +// - name: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsService) Import(name string, googlecloudaiplatformv1importdatarequest *GoogleCloudAiplatformV1ImportDataRequest) *ProjectsLocationsDatasetsImportCall { + c := &ProjectsLocationsDatasetsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1importdatarequest = googlecloudaiplatformv1importdatarequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsCreateCall { +func (c *ProjectsLocationsDatasetsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsCreateCall { +func (c *ProjectsLocationsDatasetsImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsImportCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1customjob) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importdatarequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/customJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -41638,18 +45300,18 @@ func (c *ProjectsLocationsCustomJobsCreateCall) doRequest(alt string) (*http.Res } 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 "aiplatform.projects.locations.customJobs.create" call. +// Do executes the "aiplatform.projects.locations.datasets.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CustomJob.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsCustomJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CustomJob, error) { +func (c *ProjectsLocationsDatasetsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41668,7 +45330,7 @@ func (c *ProjectsLocationsCustomJobsCreateCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CustomJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41681,72 +45343,126 @@ func (c *ProjectsLocationsCustomJobsCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsCustomJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a CustomJob. +// List: Lists Datasets in a Location. // -// - name: The name of the CustomJob resource to be deleted. Format: -// `projects/{project}/locations/{location}/customJobs/{custom_job}`. -func (r *ProjectsLocationsCustomJobsService) Delete(name string) *ProjectsLocationsCustomJobsDeleteCall { - c := &ProjectsLocationsCustomJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The name of the Dataset's parent resource. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall { + c := &ProjectsLocationsDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `display_name`: supports = and != * `metadata_schema_uri`: +// supports = and != * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". Some +// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" +func (c *ProjectsLocationsDatasetsListCall) Filter(filter string) *ProjectsLocationsDatasetsListCall { + 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: * `display_name` * `create_time` * +// `update_time` +func (c *ProjectsLocationsDatasetsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsDeleteCall { +func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsDeleteCall { +func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasets") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.list" call. // 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 +// *GoogleCloudAiplatformV1ListDatasetsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCustomJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41765,7 +45481,7 @@ func (c *ProjectsLocationsCustomJobsDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListDatasetsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41778,67 +45494,90 @@ func (c *ProjectsLocationsCustomJobsDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsCustomJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Get: Gets a CustomJob. +type ProjectsLocationsDatasetsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a Dataset. // -// - name: The name of the CustomJob resource. Format: -// `projects/{project}/locations/{location}/customJobs/{custom_job}`. -func (r *ProjectsLocationsCustomJobsService) Get(name string) *ProjectsLocationsCustomJobsGetCall { - c := &ProjectsLocationsCustomJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Identifier. The resource name of the Dataset. +func (r *ProjectsLocationsDatasetsService) Patch(name string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *ProjectsLocationsDatasetsPatchCall { + c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` * +// `description` * `labels` +func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsGetCall { +func (c *ProjectsLocationsDatasetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCustomJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsGetCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsGetCall { +func (c *ProjectsLocationsDatasetsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsDatasetsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -41849,13 +45588,13 @@ func (c *ProjectsLocationsCustomJobsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.get" call. +// Do executes the "aiplatform.projects.locations.datasets.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CustomJob.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCustomJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CustomJob, error) { +func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41874,7 +45613,7 @@ func (c *ProjectsLocationsCustomJobsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CustomJob{ + ret := &GoogleCloudAiplatformV1Dataset{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41887,67 +45626,142 @@ func (c *ProjectsLocationsCustomJobsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsCustomJobsListCall struct { +type ProjectsLocationsDatasetsSearchDataItemsCall struct { s *Service - parent string + dataset string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists CustomJobs in a Location. +// SearchDataItems: Searches DataItems in a Dataset. // -// - parent: The resource name of the Location to list the CustomJobs from. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsCustomJobsService) List(parent string) *ProjectsLocationsCustomJobsListCall { - c := &ProjectsLocationsCustomJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - dataset: The resource name of the Dataset from which to search DataItems. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsService) SearchDataItems(dataset string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c := &ProjectsLocationsDatasetsSearchDataItemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.dataset = dataset return c } -// Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports -// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 -// format. * `labels` supports general map functions that is: -// `labels.key=value` - key:value equality `labels.key:* - key existence Some -// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND -// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR -// display_name="my_job" * `NOT display_name="my_job" * -// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * -// `labels.keyB:*` -func (c *ProjectsLocationsCustomJobsListCall) Filter(filter string) *ProjectsLocationsCustomJobsListCall { - c.urlParams_.Set("filter", filter) +// AnnotationFilters sets the optional parameter "annotationFilters": An +// expression that specifies what Annotations will be returned per DataItem. +// Annotations satisfied either of the conditions will be returned. * +// `annotation_spec_id` - for = or !=. Must specify `saved_query_id=` - saved +// query id that annotations should belong to. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationFilters(annotationFilters ...string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.SetMulti("annotationFilters", append([]string{}, annotationFilters...)) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCustomJobsListCall) PageSize(pageSize int64) *ProjectsLocationsCustomJobsListCall { +// AnnotationsFilter sets the optional parameter "annotationsFilter": An +// expression for filtering the Annotations that will be returned per DataItem. +// * `annotation_spec_id` - for = or !=. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationsFilter(annotationsFilter string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("annotationsFilter", annotationsFilter) + return c +} + +// AnnotationsLimit sets the optional parameter "annotationsLimit": If set, +// only up to this many of Annotations will be returned per DataItemView. The +// maximum value is 1000. If not set, the maximum value will be used. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationsLimit(annotationsLimit int64) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("annotationsLimit", fmt.Sprint(annotationsLimit)) + return c +} + +// DataItemFilter sets the optional parameter "dataItemFilter": An expression +// for filtering the DataItem that will be returned. * `data_item_id` - for = +// or !=. * `labeled` - for = or !=. * `has_annotation(ANNOTATION_SPEC_ID)` - +// true only for DataItem that have at least one annotation with +// annotation_spec_id = `ANNOTATION_SPEC_ID` in the context of SavedQuery or +// DataLabelingJob. For example: * `data_item=1` * `has_annotation(5)` +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) DataItemFilter(dataItemFilter string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("dataItemFilter", dataItemFilter) + return c +} + +// DataLabelingJob sets the optional parameter "dataLabelingJob": The resource +// name of a DataLabelingJob. Format: +// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job} +// ` If this field is set, all of the search will be done in the context of +// this DataLabelingJob. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) DataLabelingJob(dataLabelingJob string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("dataLabelingJob", dataLabelingJob) + return c +} + +// FieldMask sets the optional parameter "fieldMask": Mask specifying which +// fields of DataItemView to read. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) FieldMask(fieldMask string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("fieldMask", fieldMask) + 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. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// OrderByAnnotationOrderBy sets the optional parameter +// "orderByAnnotation.orderBy": A comma-separated list of annotation fields to +// order by, sorted in ascending order. Use "desc" after a field name for +// descending. Must also specify saved_query. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByAnnotationOrderBy(orderByAnnotationOrderBy string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("orderByAnnotation.orderBy", orderByAnnotationOrderBy) + return c +} + +// OrderByAnnotationSavedQuery sets the optional parameter +// "orderByAnnotation.savedQuery": Required. Saved query of the Annotation. +// Only Annotations belong to this saved query will be considered for ordering. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByAnnotationSavedQuery(orderByAnnotationSavedQuery string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("orderByAnnotation.savedQuery", orderByAnnotationSavedQuery) + return c +} + +// OrderByDataItem sets the optional parameter "orderByDataItem": A +// comma-separated list of data item fields to order by, sorted in ascending +// order. Use "desc" after a field name for descending. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByDataItem(orderByDataItem string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("orderByDataItem", orderByDataItem) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer results than requested. Default and maximum page size is +// 100. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSearchDataItemsCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListCustomJobsResponse.next_page_token of the -// previous JobService.ListCustomJobs call. -func (c *ProjectsLocationsCustomJobsListCall) PageToken(pageToken string) *ProjectsLocationsCustomJobsListCall { +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results for the server to return Typically obtained via +// SearchDataItemsResponse.next_page_token of the previous +// DatasetService.SearchDataItems call. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSearchDataItemsCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsCustomJobsListCall) ReadMask(readMask string) *ProjectsLocationsCustomJobsListCall { - c.urlParams_.Set("readMask", readMask) +// SavedQuery sets the optional parameter "savedQuery": The resource name of a +// SavedQuery(annotation set in UI). Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{sav +// ed_query}` All of the search will be done in the context of this SavedQuery. +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) SavedQuery(savedQuery string) *ProjectsLocationsDatasetsSearchDataItemsCall { + c.urlParams_.Set("savedQuery", savedQuery) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsListCall { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSearchDataItemsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -41955,27 +45769,27 @@ func (c *ProjectsLocationsCustomJobsListCall) Fields(s ...googleapi.Field) *Proj // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCustomJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsListCall { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSearchDataItemsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsListCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsListCall { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSearchDataItemsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -41983,7 +45797,7 @@ func (c *ProjectsLocationsCustomJobsListCall) 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/{+parent}/customJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+dataset}:searchDataItems") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -41991,18 +45805,18 @@ func (c *ProjectsLocationsCustomJobsListCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "dataset": c.dataset, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.list" call. +// Do executes the "aiplatform.projects.locations.datasets.searchDataItems" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListCustomJobsResponse.ServerResponse.Header or (if +// *GoogleCloudAiplatformV1SearchDataItemsResponse.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsCustomJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListCustomJobsResponse, error) { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchDataItemsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42021,7 +45835,7 @@ func (c *ProjectsLocationsCustomJobsListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListCustomJobsResponse{ + ret := &GoogleCloudAiplatformV1SearchDataItemsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42037,7 +45851,7 @@ func (c *ProjectsLocationsCustomJobsListCall) 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 *ProjectsLocationsCustomJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListCustomJobsResponse) error) error { +func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchDataItemsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -42055,62 +45869,75 @@ func (c *ProjectsLocationsCustomJobsListCall) Pages(ctx context.Context, f func( } } -type ProjectsLocationsCustomJobsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsAnnotationSpecsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// Get: Gets an AnnotationSpec. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsCustomJobsOperationsService) Cancel(name string) *ProjectsLocationsCustomJobsOperationsCancelCall { - c := &ProjectsLocationsCustomJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the AnnotationSpec resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs +// /{annotation_spec}`. +func (r *ProjectsLocationsDatasetsAnnotationSpecsService) Get(name string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + 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 } @@ -42121,13 +45948,13 @@ func (c *ProjectsLocationsCustomJobsOperationsCancelCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.get" call. // 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 *ProjectsLocationsCustomJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1AnnotationSpec.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AnnotationSpec, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42146,7 +45973,7 @@ func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1AnnotationSpec{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42159,7 +45986,7 @@ func (c *ProjectsLocationsCustomJobsOperationsCancelCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsCustomJobsOperationsDeleteCall struct { +type ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -42167,14 +45994,19 @@ type ProjectsLocationsCustomJobsOperationsDeleteCall struct { 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`. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsCustomJobsOperationsService) Delete(name string) *ProjectsLocationsCustomJobsOperationsDeleteCall { - c := &ProjectsLocationsCustomJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -42182,34 +46014,34 @@ func (r *ProjectsLocationsCustomJobsOperationsService) Delete(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -42220,13 +46052,13 @@ func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.cancel" call. // 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 *ProjectsLocationsCustomJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42258,22 +46090,22 @@ func (c *ProjectsLocationsCustomJobsOperationsDeleteCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsCustomJobsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall 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 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. -func (r *ProjectsLocationsCustomJobsOperationsService) Get(name string) *ProjectsLocationsCustomJobsOperationsGetCall { - c := &ProjectsLocationsCustomJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Delete(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -42281,45 +46113,34 @@ func (r *ProjectsLocationsCustomJobsOperationsService) Get(name string) *Project // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsGetCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCustomJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsGetCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -42330,13 +46151,13 @@ func (c *ProjectsLocationsCustomJobsOperationsGetCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.delete" call. // 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 *ProjectsLocationsCustomJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42355,7 +46176,7 @@ func (c *ProjectsLocationsCustomJobsOperationsGetCall) Do(opts ...googleapi.Call 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, @@ -42368,7 +46189,7 @@ func (c *ProjectsLocationsCustomJobsOperationsGetCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsCustomJobsOperationsListCall struct { +type ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -42377,40 +46198,21 @@ type ProjectsLocationsCustomJobsOperationsListCall 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 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's parent resource. -func (r *ProjectsLocationsCustomJobsOperationsService) List(name string) *ProjectsLocationsCustomJobsOperationsListCall { - c := &ProjectsLocationsCustomJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Get(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsCustomJobsOperationsListCall) Filter(filter string) *ProjectsLocationsCustomJobsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsCustomJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsCustomJobsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsCustomJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsCustomJobsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCustomJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42418,27 +46220,27 @@ func (c *ProjectsLocationsCustomJobsOperationsListCall) Fields(s ...googleapi.Fi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsCustomJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsCustomJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCustomJobsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCustomJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -42446,7 +46248,7 @@ func (c *ProjectsLocationsCustomJobsOperationsListCall) 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/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -42459,147 +46261,13 @@ func (c *ProjectsLocationsCustomJobsOperationsListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.customJobs.operations.list" call. -// 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 *ProjectsLocationsCustomJobsOperationsListCall) 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 -} - -// 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 *ProjectsLocationsCustomJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsCustomJobsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. -// -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsCustomJobsOperationsService) Wait(name string) *ProjectsLocationsCustomJobsOperationsWaitCall { - c := &ProjectsLocationsCustomJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsCustomJobsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsCustomJobsOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsCustomJobsOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsCustomJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.customJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.get" call. // 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 *ProjectsLocationsCustomJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42631,183 +46299,104 @@ func (c *ProjectsLocationsCustomJobsOperationsWaitCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDataLabelingJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1canceldatalabelingjobrequest *GoogleCloudAiplatformV1CancelDataLabelingJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a DataLabelingJob. Success of cancellation is not -// guaranteed. +// 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 DataLabelingJob. Format: -// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo -// b}`. -func (r *ProjectsLocationsDataLabelingJobsService) Cancel(name string, googlecloudaiplatformv1canceldatalabelingjobrequest *GoogleCloudAiplatformV1CancelDataLabelingJobRequest) *ProjectsLocationsDataLabelingJobsCancelCall { - c := &ProjectsLocationsDataLabelingJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) List(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1canceldatalabelingjobrequest = googlecloudaiplatformv1canceldatalabelingjobrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsDataLabelingJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsCancelCall { - c.ctx_ = ctx return c } - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsDataLabelingJobsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataLabelingJobsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1canceldatalabelingjobrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.cancel" call. -// 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 *ProjectsLocationsDataLabelingJobsCancelCall) 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 + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c } -type ProjectsLocationsDataLabelingJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1datalabelingjob *GoogleCloudAiplatformV1DataLabelingJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// Create: Creates a DataLabelingJob. -// -// - parent: The parent of the DataLabelingJob. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDataLabelingJobsService) Create(parent string, googlecloudaiplatformv1datalabelingjob *GoogleCloudAiplatformV1DataLabelingJob) *ProjectsLocationsDataLabelingJobsCreateCall { - c := &ProjectsLocationsDataLabelingJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1datalabelingjob = googlecloudaiplatformv1datalabelingjob +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsCreateCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsCreateCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datalabelingjob) - if err != nil { - return nil, err +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataLabelingJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 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 "aiplatform.projects.locations.dataLabelingJobs.create" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DataLabelingJob.ServerResponse.Header or (if a +// *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 *ProjectsLocationsDataLabelingJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DataLabelingJob, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42826,7 +46415,7 @@ func (c *ProjectsLocationsDataLabelingJobsCreateCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DataLabelingJob{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42839,7 +46428,28 @@ func (c *ProjectsLocationsDataLabelingJobsCreateCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsDataLabelingJobsDeleteCall struct { +// 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -42847,48 +46457,63 @@ type ProjectsLocationsDataLabelingJobsDeleteCall struct { header_ http.Header } -// Delete: Deletes a DataLabelingJob. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - name: The name of the DataLabelingJob to be deleted. Format: -// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo -// b}`. -func (r *ProjectsLocationsDataLabelingJobsService) Delete(name string) *ProjectsLocationsDataLabelingJobsDeleteCall { - c := &ProjectsLocationsDataLabelingJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Wait(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { + c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsDeleteCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsDeleteCall { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -42899,13 +46524,13 @@ func (c *ProjectsLocationsDataLabelingJobsDeleteCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.wait" call. // 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 *ProjectsLocationsDataLabelingJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42937,30 +46562,64 @@ func (c *ProjectsLocationsDataLabelingJobsDeleteCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsDataLabelingJobsGetCall struct { +type ProjectsLocationsDatasetsDataItemsListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Gets a DataLabelingJob. +// List: Lists DataItems in a Dataset. // -// - name: The name of the DataLabelingJob. Format: -// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_jo -// b}`. -func (r *ProjectsLocationsDataLabelingJobsService) Get(name string) *ProjectsLocationsDataLabelingJobsGetCall { - c := &ProjectsLocationsDataLabelingJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Dataset to list DataItems from. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsDataItemsService) List(parent string) *ProjectsLocationsDatasetsDataItemsListCall { + c := &ProjectsLocationsDatasetsDataItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDatasetsDataItemsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsListCall { + 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. +func (c *ProjectsLocationsDatasetsDataItemsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDataItemsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDatasetsDataItemsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDatasetsDataItemsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsDataItemsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDataItemsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42968,27 +46627,27 @@ func (c *ProjectsLocationsDataLabelingJobsGetCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataLabelingJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsGetCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -42996,7 +46655,7 @@ func (c *ProjectsLocationsDataLabelingJobsGetCall) doRequest(alt string) (*http. 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/{+parent}/dataItems") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -43004,18 +46663,18 @@ func (c *ProjectsLocationsDataLabelingJobsGetCall) doRequest(alt string) (*http. } 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 "aiplatform.projects.locations.dataLabelingJobs.get" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DataLabelingJob.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1ListDataItemsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataLabelingJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DataLabelingJob, error) { +func (c *ProjectsLocationsDatasetsDataItemsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDataItemsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43034,7 +46693,7 @@ func (c *ProjectsLocationsDataLabelingJobsGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DataLabelingJob{ + ret := &GoogleCloudAiplatformV1ListDataItemsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43047,7 +46706,28 @@ func (c *ProjectsLocationsDataLabelingJobsGetCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsDataLabelingJobsListCall struct { +// 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 *ProjectsLocationsDatasetsDataItemsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDataItemsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsDatasetsDataItemsAnnotationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -43056,60 +46736,51 @@ type ProjectsLocationsDataLabelingJobsListCall struct { header_ http.Header } -// List: Lists DataLabelingJobs in a Location. +// List: Lists Annotations belongs to a dataitem This RPC is only available in +// InternalDatasetService. It is only used for exporting conversation data to +// CCAI Insights. // -// - parent: The parent of the DataLabelingJob. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDataLabelingJobsService) List(parent string) *ProjectsLocationsDataLabelingJobsListCall { - c := &ProjectsLocationsDataLabelingJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the DataItem to list Annotations from. +// Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data +// _item}`. +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsService) List(parent string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports -// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 -// format. * `labels` supports general map functions that is: -// `labels.key=value` - key:value equality `labels.key:* - key existence Some -// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND -// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR -// display_name="my_job" * `NOT display_name="my_job" * -// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * -// `labels.keyB:*` -func (c *ProjectsLocationsDataLabelingJobsListCall) Filter(filter string) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { 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 by default. Use `desc` after a -// field name for descending. -func (c *ProjectsLocationsDataLabelingJobsListCall) OrderBy(orderBy string) *ProjectsLocationsDataLabelingJobsListCall { +// fields to order by, sorted in ascending order. Use "desc" after a field name +// for descending. +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDataLabelingJobsListCall) PageSize(pageSize int64) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDataLabelingJobsListCall) PageToken(pageToken string) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } // ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. FieldMask represents a set of symbolic field paths. For -// example, the mask can be `paths: "name". The "name" here is a field in -// DataLabelingJob. If this field is not set, all fields of the DataLabelingJob -// are returned. -func (c *ProjectsLocationsDataLabelingJobsListCall) ReadMask(readMask string) *ProjectsLocationsDataLabelingJobsListCall { +// fields to read. +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.urlParams_.Set("readMask", readMask) return c } @@ -43117,7 +46788,7 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) ReadMask(readMask string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43125,27 +46796,27 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataLabelingJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsListCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -43153,7 +46824,7 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataLabelingJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/annotations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -43166,13 +46837,13 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.list" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDataLabelingJobsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudAiplatformV1ListAnnotationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDataLabelingJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDataLabelingJobsResponse, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListAnnotationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43191,7 +46862,7 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDataLabelingJobsResponse{ + ret := &GoogleCloudAiplatformV1ListAnnotationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43207,7 +46878,7 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) Do(opts ...googleapi.CallOpt // 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 *ProjectsLocationsDataLabelingJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDataLabelingJobsResponse) error) error { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListAnnotationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -43225,7 +46896,7 @@ func (c *ProjectsLocationsDataLabelingJobsListCall) Pages(ctx context.Context, f } } -type ProjectsLocationsDataLabelingJobsOperationsCancelCall struct { +type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43244,8 +46915,8 @@ type ProjectsLocationsDataLabelingJobsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDataLabelingJobsOperationsService) Cancel(name string) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { - c := &ProjectsLocationsDataLabelingJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -43253,27 +46924,27 @@ func (r *ProjectsLocationsDataLabelingJobsOperationsService) Cancel(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -43291,13 +46962,13 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.cancel" call. // 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 *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43329,7 +47000,7 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsCancelCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataLabelingJobsOperationsDeleteCall struct { +type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43343,8 +47014,8 @@ type ProjectsLocationsDataLabelingJobsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDataLabelingJobsOperationsService) Delete(name string) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { - c := &ProjectsLocationsDataLabelingJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Delete(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -43352,27 +47023,27 @@ func (r *ProjectsLocationsDataLabelingJobsOperationsService) Delete(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -43390,13 +47061,13 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.delete" call. // 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 *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43428,7 +47099,7 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsDeleteCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsDataLabelingJobsOperationsGetCall struct { +type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43442,8 +47113,8 @@ type ProjectsLocationsDataLabelingJobsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsDataLabelingJobsOperationsService) Get(name string) *ProjectsLocationsDataLabelingJobsOperationsGetCall { - c := &ProjectsLocationsDataLabelingJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Get(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -43451,7 +47122,7 @@ func (r *ProjectsLocationsDataLabelingJobsOperationsService) Get(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43459,27 +47130,27 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Fields(s ...googlea // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -43500,13 +47171,13 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.get" call. // 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 *ProjectsLocationsDataLabelingJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43538,7 +47209,7 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDataLabelingJobsOperationsListCall struct { +type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43551,28 +47222,28 @@ type ProjectsLocationsDataLabelingJobsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDataLabelingJobsOperationsService) List(name string) *ProjectsLocationsDataLabelingJobsOperationsListCall { - c := &ProjectsLocationsDataLabelingJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) List(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Filter(filter string) *ProjectsLocationsDataLabelingJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDataLabelingJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDataLabelingJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -43580,7 +47251,7 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43588,171 +47259,37 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Fields(s ...google // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDataLabelingJobsOperationsListCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDataLabelingJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.list" call. -// 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 *ProjectsLocationsDataLabelingJobsOperationsListCall) 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 -} - -// 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 *ProjectsLocationsDataLabelingJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDataLabelingJobsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. -// -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsDataLabelingJobsOperationsService) Wait(name string) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { - c := &ProjectsLocationsDataLabelingJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDataLabelingJobsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -43763,13 +47300,13 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.dataLabelingJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.list" call. // 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 +// *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 *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43788,7 +47325,7 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Do(opts ...googlea 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, @@ -43801,59 +47338,90 @@ func (c *ProjectsLocationsDataLabelingJobsOperationsWaitCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDatasetsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset - 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Create: Creates a Dataset. +type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - parent: The resource name of the Location to create the Dataset in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDatasetsService) Create(parent string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *ProjectsLocationsDatasetsCreateCall { - c := &ProjectsLocationsDatasetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Wait(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { + c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsCreateCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsCreateCall { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -43861,18 +47429,18 @@ func (c *ProjectsLocationsDatasetsCreateCall) doRequest(alt string) (*http.Respo } 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 "aiplatform.projects.locations.datasets.create" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.wait" call. // 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 *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43904,7 +47472,7 @@ func (c *ProjectsLocationsDatasetsCreateCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsDatasetsDeleteCall struct { +type ProjectsLocationsDatasetsDataItemsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -43912,12 +47480,19 @@ type ProjectsLocationsDatasetsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Dataset. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - name: The resource name of the Dataset to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocationsDatasetsDeleteCall { - c := &ProjectsLocationsDatasetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { + c := &ProjectsLocationsDatasetsDataItemsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -43925,34 +47500,34 @@ func (r *ProjectsLocationsDatasetsService) Delete(name string) *ProjectsLocation // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDeleteCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDeleteCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -43963,13 +47538,13 @@ func (c *ProjectsLocationsDatasetsDeleteCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.cancel" call. // 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 *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43988,7 +47563,7 @@ func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) ( 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, @@ -44001,61 +47576,57 @@ func (c *ProjectsLocationsDatasetsDeleteCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsDatasetsExportCall struct { - s *Service - name string - googlecloudaiplatformv1exportdatarequest *GoogleCloudAiplatformV1ExportDataRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDataItemsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Export: Exports data from a Dataset. +// 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 Dataset resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsService) Export(name string, googlecloudaiplatformv1exportdatarequest *GoogleCloudAiplatformV1ExportDataRequest) *ProjectsLocationsDatasetsExportCall { - c := &ProjectsLocationsDatasetsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Delete(name string) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { + c := &ProjectsLocationsDatasetsDataItemsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1exportdatarequest = googlecloudaiplatformv1exportdatarequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsExportCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsExportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsExportCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsExportCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsExportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportdatarequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") + 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 } @@ -44066,13 +47637,13 @@ func (c *ProjectsLocationsDatasetsExportCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.export" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.delete" call. // 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 *ProjectsLocationsDatasetsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44091,7 +47662,7 @@ func (c *ProjectsLocationsDatasetsExportCall) Do(opts ...googleapi.CallOption) ( 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, @@ -44104,7 +47675,7 @@ func (c *ProjectsLocationsDatasetsExportCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsDatasetsGetCall struct { +type ProjectsLocationsDatasetsDataItemsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -44113,26 +47684,21 @@ type ProjectsLocationsDatasetsGetCall struct { header_ http.Header } -// Get: Gets a Dataset. +// 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 Dataset resource. -func (r *ProjectsLocationsDatasetsService) Get(name string) *ProjectsLocationsDatasetsGetCall { - c := &ProjectsLocationsDatasetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Get(name string) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { + c := &ProjectsLocationsDatasetsDataItemsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsGetCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -44140,27 +47706,27 @@ func (c *ProjectsLocationsDatasetsGetCall) Fields(s ...googleapi.Field) *Project // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsGetCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -44181,13 +47747,13 @@ func (c *ProjectsLocationsDatasetsGetCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.get" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44206,7 +47772,7 @@ func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Dataset{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44219,61 +47785,87 @@ func (c *ProjectsLocationsDatasetsGetCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type ProjectsLocationsDatasetsImportCall struct { - s *Service - name string - googlecloudaiplatformv1importdatarequest *GoogleCloudAiplatformV1ImportDataRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDataItemsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Imports data into a Dataset. +// 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 Dataset resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsService) Import(name string, googlecloudaiplatformv1importdatarequest *GoogleCloudAiplatformV1ImportDataRequest) *ProjectsLocationsDatasetsImportCall { - c := &ProjectsLocationsDatasetsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDatasetsDataItemsOperationsService) List(name string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { + c := &ProjectsLocationsDatasetsDataItemsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1importdatarequest = googlecloudaiplatformv1importdatarequest + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsImportCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsImportCall) Context(ctx context.Context) *ProjectsLocationsDatasetsImportCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsImportCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsImportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importdatarequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -44284,13 +47876,13 @@ func (c *ProjectsLocationsDatasetsImportCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.import" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.list" call. // 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 +// *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 *ProjectsLocationsDatasetsImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44309,7 +47901,7 @@ func (c *ProjectsLocationsDatasetsImportCall) Do(opts ...googleapi.CallOption) ( 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, @@ -44322,126 +47914,109 @@ func (c *ProjectsLocationsDatasetsImportCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsDatasetsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Datasets in a Location. -// -// - parent: The name of the Dataset's parent resource. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDatasetsService) List(parent string) *ProjectsLocationsDatasetsListCall { - c := &ProjectsLocationsDatasetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `display_name`: supports = and != * `metadata_schema_uri`: -// supports = and != * `labels` supports general map functions that is: * -// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key -// existence * A key including a space must be quoted. `labels."a key". Some -// examples: * `displayName="myDisplayName" * `labels.myKey="myValue" -func (c *ProjectsLocationsDatasetsListCall) Filter(filter string) *ProjectsLocationsDatasetsListCall { - 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: * `display_name` * `create_time` * -// `update_time` -func (c *ProjectsLocationsDatasetsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c +// 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 *ProjectsLocationsDatasetsDataItemsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsDatasetsDataItemsOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDatasetsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. +// +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Wait(name string) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { + c := &ProjectsLocationsDatasetsDataItemsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsListCall { - c.urlParams_.Set("readMask", readMask) +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsListCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsListCall { +func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasets") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") 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 "aiplatform.projects.locations.datasets.list" call. +// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDatasetsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetsResponse, error) { +func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44460,7 +48035,7 @@ func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDatasetsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44473,107 +48048,78 @@ func (c *ProjectsLocationsDatasetsListCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDatasetsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDatasetsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDatasetVersionsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a Dataset. +// Create: Create a version from a Dataset. // -// - name: Output only. Identifier. The resource name of the Dataset. -func (r *ProjectsLocationsDatasetsService) Patch(name string, googlecloudaiplatformv1dataset *GoogleCloudAiplatformV1Dataset) *ProjectsLocationsDatasetsPatchCall { - c := &ProjectsLocationsDatasetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1dataset = googlecloudaiplatformv1dataset - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. Updatable fields: * `display_name` * -// `description` * `labels` -func (c *ProjectsLocationsDatasetsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The name of the Dataset resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { + c := &ProjectsLocationsDatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsPatchCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsPatchCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1dataset) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") 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 "aiplatform.projects.locations.datasets.patch" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Dataset.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Dataset, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44592,7 +48138,7 @@ func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Dataset{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44605,197 +48151,73 @@ func (c *ProjectsLocationsDatasetsPatchCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsDatasetsSearchDataItemsCall struct { - s *Service - dataset string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDatasetVersionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SearchDataItems: Searches DataItems in a Dataset. +// Delete: Deletes a Dataset version. // -// - dataset: The resource name of the Dataset from which to search DataItems. -// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsService) SearchDataItems(dataset string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c := &ProjectsLocationsDatasetsSearchDataItemsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.dataset = dataset - return c -} - -// AnnotationFilters sets the optional parameter "annotationFilters": An -// expression that specifies what Annotations will be returned per DataItem. -// Annotations satisfied either of the conditions will be returned. * -// `annotation_spec_id` - for = or !=. Must specify `saved_query_id=` - saved -// query id that annotations should belong to. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationFilters(annotationFilters ...string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.SetMulti("annotationFilters", append([]string{}, annotationFilters...)) - return c -} - -// AnnotationsFilter sets the optional parameter "annotationsFilter": An -// expression for filtering the Annotations that will be returned per DataItem. -// * `annotation_spec_id` - for = or !=. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationsFilter(annotationsFilter string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("annotationsFilter", annotationsFilter) - return c -} - -// AnnotationsLimit sets the optional parameter "annotationsLimit": If set, -// only up to this many of Annotations will be returned per DataItemView. The -// maximum value is 1000. If not set, the maximum value will be used. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) AnnotationsLimit(annotationsLimit int64) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("annotationsLimit", fmt.Sprint(annotationsLimit)) - return c -} - -// DataItemFilter sets the optional parameter "dataItemFilter": An expression -// for filtering the DataItem that will be returned. * `data_item_id` - for = -// or !=. * `labeled` - for = or !=. * `has_annotation(ANNOTATION_SPEC_ID)` - -// true only for DataItem that have at least one annotation with -// annotation_spec_id = `ANNOTATION_SPEC_ID` in the context of SavedQuery or -// DataLabelingJob. For example: * `data_item=1` * `has_annotation(5)` -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) DataItemFilter(dataItemFilter string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("dataItemFilter", dataItemFilter) - return c -} - -// DataLabelingJob sets the optional parameter "dataLabelingJob": The resource -// name of a DataLabelingJob. Format: -// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job} -// ` If this field is set, all of the search will be done in the context of -// this DataLabelingJob. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) DataLabelingJob(dataLabelingJob string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("dataLabelingJob", dataLabelingJob) - return c -} - -// FieldMask sets the optional parameter "fieldMask": Mask specifying which -// fields of DataItemView to read. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) FieldMask(fieldMask string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("fieldMask", fieldMask) - 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. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// OrderByAnnotationOrderBy sets the optional parameter -// "orderByAnnotation.orderBy": A comma-separated list of annotation fields to -// order by, sorted in ascending order. Use "desc" after a field name for -// descending. Must also specify saved_query. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByAnnotationOrderBy(orderByAnnotationOrderBy string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("orderByAnnotation.orderBy", orderByAnnotationOrderBy) - return c -} - -// OrderByAnnotationSavedQuery sets the optional parameter -// "orderByAnnotation.savedQuery": Required. Saved query of the Annotation. -// Only Annotations belong to this saved query will be considered for ordering. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByAnnotationSavedQuery(orderByAnnotationSavedQuery string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("orderByAnnotation.savedQuery", orderByAnnotationSavedQuery) - return c -} - -// OrderByDataItem sets the optional parameter "orderByDataItem": A -// comma-separated list of data item fields to order by, sorted in ascending -// order. Use "desc" after a field name for descending. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) OrderByDataItem(orderByDataItem string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("orderByDataItem", orderByDataItem) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. Server -// may return fewer results than requested. Default and maximum page size is -// 100. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token identifying a -// page of results for the server to return Typically obtained via -// SearchDataItemsResponse.next_page_token of the previous -// DatasetService.SearchDataItems call. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// SavedQuery sets the optional parameter "savedQuery": The resource name of a -// SavedQuery(annotation set in UI). Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{sav -// ed_query}` All of the search will be done in the context of this SavedQuery. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) SavedQuery(savedQuery string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.urlParams_.Set("savedQuery", savedQuery) +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) Delete(name string) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { + c := &ProjectsLocationsDatasetsDatasetVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSearchDataItemsCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSearchDataItemsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSearchDataItemsCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+dataset}:searchDataItems") + 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{ - "dataset": c.dataset, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.searchDataItems" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SearchDataItemsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsSearchDataItemsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchDataItemsResponse, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44814,7 +48236,7 @@ func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SearchDataItemsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44827,28 +48249,7 @@ func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Do(opts ...googleapi.Call return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDatasetsSearchDataItemsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchDataItemsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDatasetsAnnotationSpecsGetCall struct { +type ProjectsLocationsDatasetsDatasetVersionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -44857,20 +48258,20 @@ type ProjectsLocationsDatasetsAnnotationSpecsGetCall struct { header_ http.Header } -// Get: Gets an AnnotationSpec. +// Get: Gets a Dataset version. // -// - name: The name of the AnnotationSpec resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs -// /{annotation_spec}`. -func (r *ProjectsLocationsDatasetsAnnotationSpecsService) Get(name string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Dataset version to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) Get(name string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { + c := &ProjectsLocationsDatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // ReadMask sets the optional parameter "readMask": Mask specifying which // fields to read. -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { c.urlParams_.Set("readMask", readMask) return c } @@ -44878,7 +48279,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) ReadMask(readMask stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -44886,27 +48287,27 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Fields(s ...googleapi. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -44927,13 +48328,13 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.get" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1AnnotationSpec.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AnnotationSpec, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44952,7 +48353,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1AnnotationSpec{ + ret := &GoogleCloudAiplatformV1DatasetVersion{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44965,79 +48366,119 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDatasetsDatasetVersionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// List: Lists DatasetVersions in a Dataset. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Dataset to list DatasetVersions from. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) List(parent string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c := &ProjectsLocationsDatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Filter(filter string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + 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. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.list" call. // 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListDatasetVersionsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetVersionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45056,7 +48497,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListDatasetVersionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45069,57 +48510,89 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsCancelCall) Do(opts . return ret, nil } -type ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall 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 *ProjectsLocationsDatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// 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`. +type ProjectsLocationsDatasetsDatasetVersionsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a DatasetVersion. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Delete(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Identifier. The resource name of the DatasetVersion. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { + c := &ProjectsLocationsDatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Updatable fields: * `display_name` +func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -45130,13 +48603,13 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.patch" call. // 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45155,7 +48628,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1DatasetVersion{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45168,7 +48641,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsDeleteCall) Do(opts . return ret, nil } -type ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall struct { +type ProjectsLocationsDatasetsDatasetVersionsRestoreCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -45177,13 +48650,13 @@ type ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall 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. +// Restore: Restores a dataset version. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Get(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DatasetVersion resource. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions +// /{dataset_version}`. +func (r *ProjectsLocationsDatasetsDatasetVersionsService) Restore(name string) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { + c := &ProjectsLocationsDatasetsDatasetVersionsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -45191,7 +48664,7 @@ func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Get(name str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -45199,27 +48672,27 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Fields(s ... // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -45227,7 +48700,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) doRequest(al var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -45240,13 +48713,13 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.get" call. +// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.restore" call. // 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45267,98 +48740,73 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsGetCall) Do(opts ...g } 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 -} - -type ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) List(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsDatasetsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsDatasetsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsOperationsCancelCall { + c := &ProjectsLocationsDatasetsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { +func (c *ProjectsLocationsDatasetsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall { +func (c *ProjectsLocationsDatasetsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -45369,13 +48817,13 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.list" call. +// Do executes the "aiplatform.projects.locations.datasets.operations.cancel" call. // 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *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 *ProjectsLocationsDatasetsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45394,7 +48842,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45407,28 +48855,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Do(opts ... return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall struct { +type ProjectsLocationsDatasetsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -45436,63 +48863,49 @@ type ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall struct { header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// 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 wait on. -func (r *ProjectsLocationsDatasetsAnnotationSpecsOperationsService) Wait(name string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { - c := &ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsDatasetsOperationsService) Delete(name string) *ProjectsLocationsDatasetsOperationsDeleteCall { + c := &ProjectsLocationsDatasetsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + 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 } @@ -45503,13 +48916,13 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.annotationSpecs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.datasets.operations.delete" call. // 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 *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsDatasetsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45528,7 +48941,7 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) 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, @@ -45541,64 +48954,30 @@ func (c *ProjectsLocationsDatasetsAnnotationSpecsOperationsWaitCall) Do(opts ... return ret, nil } -type ProjectsLocationsDatasetsDataItemsListCall struct { +type ProjectsLocationsDatasetsOperationsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists DataItems in a Dataset. +// 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 resource name of the Dataset to list DataItems from. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsDataItemsService) List(parent string) *ProjectsLocationsDatasetsDataItemsListCall { - c := &ProjectsLocationsDatasetsDataItemsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsDataItemsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsListCall { - 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. -func (c *ProjectsLocationsDatasetsDataItemsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDataItemsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsDataItemsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDatasetsDataItemsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsDataItemsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDataItemsListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the operation resource. +func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall { + c := &ProjectsLocationsDatasetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsListCall { +func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -45606,27 +48985,27 @@ func (c *ProjectsLocationsDatasetsDataItemsListCall) Fields(s ...googleapi.Field // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsDataItemsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsListCall { +func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsListCall { +func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -45634,7 +49013,7 @@ func (c *ProjectsLocationsDatasetsDataItemsListCall) doRequest(alt string) (*htt var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/dataItems") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -45642,18 +49021,18 @@ func (c *ProjectsLocationsDatasetsDataItemsListCall) doRequest(alt string) (*htt } 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 "aiplatform.projects.locations.datasets.dataItems.list" call. +// Do executes the "aiplatform.projects.locations.datasets.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDataItemsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsDataItemsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDataItemsResponse, error) { +func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45672,7 +49051,7 @@ func (c *ProjectsLocationsDatasetsDataItemsListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDataItemsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45685,89 +49064,49 @@ func (c *ProjectsLocationsDatasetsDataItemsListCall) Do(opts ...googleapi.CallOp return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDatasetsDataItemsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDataItemsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDatasetsDataItemsAnnotationsListCall struct { +type ProjectsLocationsDatasetsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists Annotations belongs to a dataitem This RPC is only available in -// InternalDatasetService. It is only used for exporting conversation data to -// CCAI Insights. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the DataItem to list Annotations from. -// Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data -// _item}`. -func (r *ProjectsLocationsDatasetsDataItemsAnnotationsService) List(parent string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall { + c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall { 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. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -45775,27 +49114,27 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsListCall { +func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -45803,7 +49142,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/annotations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -45811,18 +49150,18 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) doRequest(alt st } 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 "aiplatform.projects.locations.datasets.dataItems.annotations.list" call. +// Do executes the "aiplatform.projects.locations.datasets.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListAnnotationsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListAnnotationsResponse, error) { +func (c *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45841,7 +49180,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListAnnotationsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45857,7 +49196,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) 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 *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListAnnotationsResponse) error) error { +func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -45875,7 +49214,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsListCall) Pages(ctx contex } } -type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall struct { +type ProjectsLocationsDatasetsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -45883,52 +49222,61 @@ type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall struct { header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsDatasetsOperationsService) Wait(name string) *ProjectsLocationsDatasetsOperationsWaitCall { + c := &ProjectsLocationsDatasetsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsDatasetsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -45941,13 +49289,13 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) doRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.operations.wait" call. // 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsDatasetsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45966,7 +49314,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) 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, @@ -45979,7 +49327,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsCancelCall) Do(o return ret, nil } -type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall struct { +type ProjectsLocationsDatasetsSavedQueriesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -45987,14 +49335,13 @@ type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall struct { 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`. +// Delete: Deletes a SavedQuery. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Delete(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the SavedQuery to delete. Format: +// `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{s +// aved_query}`. +func (r *ProjectsLocationsDatasetsSavedQueriesService) Delete(name string) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { + c := &ProjectsLocationsDatasetsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -46002,27 +49349,27 @@ func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Delete( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -46040,123 +49387,13 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) doRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.delete" call. -// 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsDeleteCall) 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 -} - -type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Get(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.get" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.delete" call. // 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46188,49 +49425,64 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsGetCall) Do(opts return ret, nil } -type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall struct { +type ProjectsLocationsDatasetsSavedQueriesListCall 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 SavedQueries in a Dataset. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) List(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Dataset to list SavedQueries from. +// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. +func (r *ProjectsLocationsDatasetsSavedQueriesService) List(parent string) *ProjectsLocationsDatasetsSavedQueriesListCall { + c := &ProjectsLocationsDatasetsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Filter(filter string) *ProjectsLocationsDatasetsSavedQueriesListCall { 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. +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsSavedQueriesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSavedQueriesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSavedQueriesListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsSavedQueriesListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -46238,27 +49490,27 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Fields // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -46266,7 +49518,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) doRequ 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}/savedQueries") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -46274,18 +49526,18 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) doRequ } 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 "aiplatform.projects.locations.datasets.dataItems.annotations.operations.list" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.list" call. // 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 +// *GoogleCloudAiplatformV1ListSavedQueriesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListSavedQueriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46304,7 +49556,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ListSavedQueriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46320,7 +49572,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListSavedQueriesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -46338,120 +49590,7 @@ func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsListCall) Pages( } } -type ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. -// -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsService) Wait(name string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { - c := &ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.datasets.dataItems.annotations.operations.wait" call. -// 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 *ProjectsLocationsDatasetsDataItemsAnnotationsOperationsWaitCall) 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 -} - -type ProjectsLocationsDatasetsDataItemsOperationsCancelCall struct { +type ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -46470,8 +49609,8 @@ type ProjectsLocationsDatasetsDataItemsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { - c := &ProjectsLocationsDatasetsDataItemsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Cancel(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { + c := &ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -46479,27 +49618,27 @@ func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Cancel(name string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsCancelCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -46517,13 +49656,13 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.cancel" call. // 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 *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46555,7 +49694,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsCancelCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDatasetsDataItemsOperationsDeleteCall struct { +type ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -46569,8 +49708,8 @@ type ProjectsLocationsDatasetsDataItemsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Delete(name string) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { - c := &ProjectsLocationsDatasetsDataItemsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Delete(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { + c := &ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -46578,27 +49717,27 @@ func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Delete(name string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -46616,13 +49755,13 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.delete" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.delete" call. // 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 *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46654,7 +49793,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsDeleteCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDatasetsDataItemsOperationsGetCall struct { +type ProjectsLocationsDatasetsSavedQueriesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -46668,8 +49807,8 @@ type ProjectsLocationsDatasetsDataItemsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Get(name string) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { - c := &ProjectsLocationsDatasetsDataItemsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Get(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { + c := &ProjectsLocationsDatasetsSavedQueriesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -46677,7 +49816,7 @@ func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Get(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -46685,27 +49824,27 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Fields(s ...google // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsGetCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -46726,13 +49865,13 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.get" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.get" call. // 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 *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46764,7 +49903,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsGetCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDatasetsDataItemsOperationsListCall struct { +type ProjectsLocationsDatasetsSavedQueriesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -46777,28 +49916,28 @@ type ProjectsLocationsDatasetsDataItemsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDatasetsDataItemsOperationsService) List(name string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { - c := &ProjectsLocationsDatasetsDataItemsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) List(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { + c := &ProjectsLocationsDatasetsSavedQueriesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -46806,7 +49945,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) PageToken(pageTok // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -46814,27 +49953,27 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsListCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -46855,13 +49994,13 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.list" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.list" call. // 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 *ProjectsLocationsDatasetsDataItemsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46896,7 +50035,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Do(opts ...google // 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 *ProjectsLocationsDatasetsDataItemsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -46914,7 +50053,7 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsListCall) Pages(ctx context } } -type ProjectsLocationsDatasetsDataItemsOperationsWaitCall struct { +type ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -46933,8 +50072,8 @@ type ProjectsLocationsDatasetsDataItemsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Wait(name string) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { - c := &ProjectsLocationsDatasetsDataItemsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Wait(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { + c := &ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -46943,7 +50082,7 @@ func (r *ProjectsLocationsDatasetsDataItemsOperationsService) Wait(name string) // before timing out. If left blank, the wait will be at most the time // permitted by the underlying HTTP/RPC protocol. If RPC context deadline is // also specified, the shorter one will be used. -func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -46951,27 +50090,27 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Timeout(timeout s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDataItemsOperationsWaitCall { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -46989,13 +50128,13 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.dataItems.operations.wait" call. +// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.wait" call. // 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 *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47027,59 +50166,59 @@ func (c *ProjectsLocationsDatasetsDataItemsOperationsWaitCall) Do(opts ...google return ret, nil } -type ProjectsLocationsDatasetsDatasetVersionsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDeploymentResourcePoolsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1createdeploymentresourcepoolrequest *GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a version from a Dataset. +// Create: Create a DeploymentResourcePool. // -// - parent: The name of the Dataset resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) Create(parent string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { - c := &ProjectsLocationsDatasetsDatasetVersionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent location resource where this DeploymentResourcePool +// will be created. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) Create(parent string, googlecloudaiplatformv1createdeploymentresourcepoolrequest *GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest) *ProjectsLocationsDeploymentResourcePoolsCreateCall { + c := &ProjectsLocationsDeploymentResourcePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + c.googlecloudaiplatformv1createdeploymentresourcepoolrequest = googlecloudaiplatformv1createdeploymentresourcepoolrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { +func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsCreateCall { +func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1createdeploymentresourcepoolrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/datasetVersions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deploymentResourcePools") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -47092,13 +50231,13 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.create" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.create" call. // 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 *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47130,7 +50269,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsCreateCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDatasetsDatasetVersionsDeleteCall struct { +type ProjectsLocationsDeploymentResourcePoolsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -47138,13 +50277,13 @@ type ProjectsLocationsDatasetsDatasetVersionsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Dataset version. +// Delete: Delete a DeploymentResourcePool. // -// - name: The resource name of the Dataset version to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) Delete(name string) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { - c := &ProjectsLocationsDatasetsDatasetVersionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DeploymentResourcePool to delete. Format: +// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen +// t_resource_pool}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) Delete(name string) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { + c := &ProjectsLocationsDeploymentResourcePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -47152,27 +50291,27 @@ func (r *ProjectsLocationsDatasetsDatasetVersionsService) Delete(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { +func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsDeleteCall { +func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -47190,13 +50329,13 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.delete" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.delete" call. // 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 *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47228,7 +50367,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDatasetsDatasetVersionsGetCall struct { +type ProjectsLocationsDeploymentResourcePoolsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -47237,28 +50376,21 @@ type ProjectsLocationsDatasetsDatasetVersionsGetCall struct { header_ http.Header } -// Get: Gets a Dataset version. +// Get: Get a DeploymentResourcePool. // -// - name: The resource name of the Dataset version to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) Get(name string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { - c := &ProjectsLocationsDatasetsDatasetVersionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the DeploymentResourcePool to retrieve. Format: +// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen +// t_resource_pool}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) Get(name string) *ProjectsLocationsDeploymentResourcePoolsGetCall { + c := &ProjectsLocationsDeploymentResourcePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -47266,27 +50398,27 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Fields(s ...googleapi. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -47307,13 +50439,13 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.get" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1DeploymentResourcePool.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DeploymentResourcePool, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47332,7 +50464,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DatasetVersion{ + ret := &GoogleCloudAiplatformV1DeploymentResourcePool{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47345,7 +50477,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDatasetsDatasetVersionsListCall struct { +type ProjectsLocationsDeploymentResourcePoolsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -47354,55 +50486,38 @@ type ProjectsLocationsDatasetsDatasetVersionsListCall struct { header_ http.Header } -// List: Lists DatasetVersions in a Dataset. +// List: List DeploymentResourcePools in a location. // -// - parent: The resource name of the Dataset to list DatasetVersions from. -// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) List(parent string) *ProjectsLocationsDatasetsDatasetVersionsListCall { - c := &ProjectsLocationsDatasetsDatasetVersionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The parent Location which owns this collection of +// DeploymentResourcePools. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) List(parent string) *ProjectsLocationsDeploymentResourcePoolsListCall { + c := &ProjectsLocationsDeploymentResourcePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Filter(filter string) *ProjectsLocationsDatasetsDatasetVersionsListCall { - 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. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsDatasetVersionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsDatasetVersionsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// DeploymentResourcePools to return. The service may return fewer than this +// value. +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `ListDeploymentResourcePools` call. Provide this to retrieve +// the subsequent page. When paginating, all other parameters provided to +// `ListDeploymentResourcePools` must match the call that provided the page // token. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsDatasetVersionsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -47410,27 +50525,27 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -47438,7 +50553,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) 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/{+parent}/datasetVersions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deploymentResourcePools") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -47451,13 +50566,13 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.list" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDatasetVersionsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDatasetVersionsResponse, error) { +// *GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47476,7 +50591,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDatasetVersionsResponse{ + ret := &GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47492,7 +50607,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Do(opts ...googleapi. // 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 *ProjectsLocationsDatasetsDatasetVersionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDatasetVersionsResponse) error) error { +func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -47510,29 +50625,30 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsListCall) Pages(ctx context.Con } } -type ProjectsLocationsDatasetsDatasetVersionsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDeploymentResourcePoolsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1deploymentresourcepool *GoogleCloudAiplatformV1DeploymentResourcePool + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a DatasetVersion. +// Patch: Update a DeploymentResourcePool. // -// - name: Output only. Identifier. The resource name of the DatasetVersion. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) Patch(name string, googlecloudaiplatformv1datasetversion *GoogleCloudAiplatformV1DatasetVersion) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { - c := &ProjectsLocationsDatasetsDatasetVersionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The resource name of the DeploymentResourcePool. Format: +// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen +// t_resource_pool}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) Patch(name string, googlecloudaiplatformv1deploymentresourcepool *GoogleCloudAiplatformV1DeploymentResourcePool) *ProjectsLocationsDeploymentResourcePoolsPatchCall { + c := &ProjectsLocationsDeploymentResourcePoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1datasetversion = googlecloudaiplatformv1datasetversion + c.googlecloudaiplatformv1deploymentresourcepool = googlecloudaiplatformv1deploymentresourcepool return c } -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. Updatable fields: * `display_name` -func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { +// UpdateMask sets the optional parameter "updateMask": Required. The list of +// fields to update. +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDeploymentResourcePoolsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -47540,30 +50656,30 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) UpdateMask(updateMas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsPatchCall { +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1datasetversion) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deploymentresourcepool) if err != nil { return nil, err } @@ -47582,13 +50698,13 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.patch" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DatasetVersion.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DatasetVersion, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47607,7 +50723,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DatasetVersion{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47620,30 +50736,48 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsPatchCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsDatasetsDatasetVersionsRestoreCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall struct { + s *Service + deploymentResourcePool string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Restore: Restores a dataset version. +// QueryDeployedModels: List DeployedModels that have been deployed on this +// DeploymentResourcePool. // -// - name: The name of the DatasetVersion resource. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions -// /{dataset_version}`. -func (r *ProjectsLocationsDatasetsDatasetVersionsService) Restore(name string) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { - c := &ProjectsLocationsDatasetsDatasetVersionsRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - deploymentResourcePool: The name of the target DeploymentResourcePool to +// query. Format: +// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen +// t_resource_pool}`. +func (r *ProjectsLocationsDeploymentResourcePoolsService) QueryDeployedModels(deploymentResourcePool string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { + c := &ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.deploymentResourcePool = deploymentResourcePool + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// DeployedModels to return. The service may return fewer than this value. +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous `QueryDeployedModels` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `QueryDeployedModels` must match the call that provided the page token. +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -47651,27 +50785,27 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Fields(s ...google // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Context(ctx context.Context) *ProjectsLocationsDatasetsDatasetVersionsRestoreCall { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -47679,7 +50813,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) doRequest(alt stri var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:restore") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+deploymentResourcePool}:queryDeployedModels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -47687,18 +50821,18 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "deploymentResourcePool": c.deploymentResourcePool, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.datasetVersions.restore" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.queryDeployedModels" call. // 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 +// *GoogleCloudAiplatformV1QueryDeployedModelsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1QueryDeployedModelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47717,7 +50851,7 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1QueryDeployedModelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47730,7 +50864,28 @@ func (c *ProjectsLocationsDatasetsDatasetVersionsRestoreCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsDatasetsOperationsCancelCall struct { +// 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 *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1QueryDeployedModelsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -47749,8 +50904,8 @@ type ProjectsLocationsDatasetsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDatasetsOperationsService) Cancel(name string) *ProjectsLocationsDatasetsOperationsCancelCall { - c := &ProjectsLocationsDatasetsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Cancel(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { + c := &ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -47758,27 +50913,27 @@ func (r *ProjectsLocationsDatasetsOperationsService) Cancel(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsCancelCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsCancelCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -47796,13 +50951,13 @@ func (c *ProjectsLocationsDatasetsOperationsCancelCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.cancel" call. // 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 *ProjectsLocationsDatasetsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47834,7 +50989,7 @@ func (c *ProjectsLocationsDatasetsOperationsCancelCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDatasetsOperationsDeleteCall struct { +type ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -47848,8 +51003,8 @@ type ProjectsLocationsDatasetsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDatasetsOperationsService) Delete(name string) *ProjectsLocationsDatasetsOperationsDeleteCall { - c := &ProjectsLocationsDatasetsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Delete(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { + c := &ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -47857,27 +51012,27 @@ func (r *ProjectsLocationsDatasetsOperationsService) Delete(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsDeleteCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsDeleteCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -47895,13 +51050,13 @@ func (c *ProjectsLocationsDatasetsOperationsDeleteCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.operations.delete" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.delete" call. // 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 *ProjectsLocationsDatasetsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47933,7 +51088,7 @@ func (c *ProjectsLocationsDatasetsOperationsDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsDatasetsOperationsGetCall struct { +type ProjectsLocationsDeploymentResourcePoolsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -47947,8 +51102,8 @@ type ProjectsLocationsDatasetsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsLocationsDatasetsOperationsGetCall { - c := &ProjectsLocationsDatasetsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Get(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { + c := &ProjectsLocationsDeploymentResourcePoolsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -47956,7 +51111,7 @@ func (r *ProjectsLocationsDatasetsOperationsService) Get(name string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -47964,27 +51119,27 @@ func (c *ProjectsLocationsDatasetsOperationsGetCall) Fields(s ...googleapi.Field // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsGetCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -48005,13 +51160,13 @@ func (c *ProjectsLocationsDatasetsOperationsGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.operations.get" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.get" call. // 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 *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48043,7 +51198,7 @@ func (c *ProjectsLocationsDatasetsOperationsGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsDatasetsOperationsListCall struct { +type ProjectsLocationsDeploymentResourcePoolsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -48056,28 +51211,28 @@ type ProjectsLocationsDatasetsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDatasetsOperationsService) List(name string) *ProjectsLocationsDatasetsOperationsListCall { - c := &ProjectsLocationsDatasetsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) List(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { + c := &ProjectsLocationsDeploymentResourcePoolsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Filter(filter string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsDatasetsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -48085,7 +51240,7 @@ func (c *ProjectsLocationsDatasetsOperationsListCall) PageToken(pageToken string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -48093,27 +51248,27 @@ func (c *ProjectsLocationsDatasetsOperationsListCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsListCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -48134,13 +51289,13 @@ func (c *ProjectsLocationsDatasetsOperationsListCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.operations.list" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.list" call. // 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 *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48175,7 +51330,7 @@ func (c *ProjectsLocationsDatasetsOperationsListCall) Do(opts ...googleapi.CallO // 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 *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -48193,7 +51348,7 @@ func (c *ProjectsLocationsDatasetsOperationsListCall) Pages(ctx context.Context, } } -type ProjectsLocationsDatasetsOperationsWaitCall struct { +type ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -48212,8 +51367,8 @@ type ProjectsLocationsDatasetsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsDatasetsOperationsService) Wait(name string) *ProjectsLocationsDatasetsOperationsWaitCall { - c := &ProjectsLocationsDatasetsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Wait(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { + c := &ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -48222,7 +51377,7 @@ func (r *ProjectsLocationsDatasetsOperationsService) Wait(name string) *Projects // before timing out. If left blank, the wait will be at most the time // permitted by the underlying HTTP/RPC protocol. If RPC context deadline is // also specified, the shorter one will be used. -func (c *ProjectsLocationsDatasetsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsOperationsWaitCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -48230,27 +51385,27 @@ func (c *ProjectsLocationsDatasetsOperationsWaitCall) Timeout(timeout string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsOperationsWaitCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsOperationsWaitCall { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -48268,13 +51423,13 @@ func (c *ProjectsLocationsDatasetsOperationsWaitCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.operations.wait" call. +// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.wait" call. // 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 *ProjectsLocationsDatasetsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48306,73 +51461,78 @@ func (c *ProjectsLocationsDatasetsOperationsWaitCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsDatasetsSavedQueriesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a SavedQuery. +// ComputeTokens: Return a list of tokens based on the input text. // -// - name: The resource name of the SavedQuery to delete. Format: -// `projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{s -// aved_query}`. -func (r *ProjectsLocationsDatasetsSavedQueriesService) Delete(name string) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { - c := &ProjectsLocationsDatasetsSavedQueriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *ProjectsLocationsEndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *ProjectsLocationsEndpointsComputeTokensCall { + c := &ProjectsLocationsEndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { +func (c *ProjectsLocationsEndpointsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsComputeTokensCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesDeleteCall { +func (c *ProjectsLocationsEndpointsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsEndpointsComputeTokensCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsComputeTokensCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.delete" call. +// Do executes the "aiplatform.projects.locations.endpoints.computeTokens" call. // 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 +// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48391,7 +51551,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -48404,102 +51564,179 @@ func (c *ProjectsLocationsDatasetsSavedQueriesDeleteCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDatasetsSavedQueriesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists SavedQueries in a Dataset. +// CountTokens: Perform a token counting. // -// - parent: The resource name of the Dataset to list SavedQueries from. -// Format: `projects/{project}/locations/{location}/datasets/{dataset}`. -func (r *ProjectsLocationsDatasetsSavedQueriesService) List(parent string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c := &ProjectsLocationsDatasetsSavedQueriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *ProjectsLocationsEndpointsCountTokensCall { + c := &ProjectsLocationsEndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Filter(filter string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.urlParams_.Set("filter", filter) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEndpointsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsCountTokensCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) 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. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) OrderBy(orderBy string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.urlParams_.Set("orderBy", orderBy) +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEndpointsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsEndpointsCountTokensCall { + c.ctx_ = ctx return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEndpointsCountTokensCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.urlParams_.Set("pageToken", pageToken) +func (c *ProjectsLocationsEndpointsCountTokensCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.countTokens" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, 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 := &GoogleCloudAiplatformV1CountTokensResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsEndpointsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates an Endpoint. +// +// - parent: The resource name of the Location to create the Endpoint in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsEndpointsService) Create(parent string, googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint) *ProjectsLocationsEndpointsCreateCall { + c := &ProjectsLocationsEndpointsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1endpoint = googlecloudaiplatformv1endpoint return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) ReadMask(readMask string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.urlParams_.Set("readMask", readMask) +// EndpointId sets the optional parameter "endpointId": Immutable. The ID to +// use for endpoint, which will become the final component of the endpoint +// resource name. If not provided, Vertex AI will generate a value for this ID. +// If the first character is a letter, this value may be up to 63 characters, +// and valid characters are `[a-z0-9-]`. The last character must be a letter or +// number. If the first character is a number, this value may be up to 9 +// characters, and valid characters are `[0-9]` with no leading zeros. When +// using HTTP/JSON, this field is populated based on a query string argument, +// such as `?endpoint_id=12345`. This is the fallback for fields that are not +// included in either the URI or the body. +func (c *ProjectsLocationsEndpointsCreateCall) EndpointId(endpointId string) *ProjectsLocationsEndpointsCreateCall { + c.urlParams_.Set("endpointId", endpointId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesListCall { +func (c *ProjectsLocationsEndpointsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesListCall { +func (c *ProjectsLocationsEndpointsCreateCall) Context(ctx context.Context) *ProjectsLocationsEndpointsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1endpoint) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/savedQueries") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpoints") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -48510,13 +51747,13 @@ func (c *ProjectsLocationsDatasetsSavedQueriesListCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.list" call. +// Do executes the "aiplatform.projects.locations.endpoints.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListSavedQueriesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsDatasetsSavedQueriesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListSavedQueriesResponse, error) { +func (c *ProjectsLocationsEndpointsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48535,7 +51772,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListSavedQueriesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -48548,28 +51785,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Do(opts ...googleapi.Cal return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDatasetsSavedQueriesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListSavedQueriesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall struct { +type ProjectsLocationsEndpointsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -48577,19 +51793,12 @@ type ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall struct { header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// Delete: Deletes an Endpoint. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Cancel(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { - c := &ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Endpoint resource to be deleted. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) Delete(name string) *ProjectsLocationsEndpointsDeleteCall { + c := &ProjectsLocationsEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -48597,34 +51806,34 @@ func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Cancel(name str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { +func (c *ProjectsLocationsEndpointsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall { +func (c *ProjectsLocationsEndpointsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + 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 } @@ -48635,13 +51844,13 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.endpoints.delete" call. // 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 *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48660,7 +51869,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Do(opts ...g 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, @@ -48673,74 +51882,79 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsCancelCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsDeployModelCall struct { + s *Service + endpoint string + googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest + 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`. +// DeployModel: Deploys a Model into this Endpoint, creating a DeployedModel +// within it. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Delete(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { - c := &ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint resource into which to deploy a Model. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) DeployModel(endpoint string, googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest) *ProjectsLocationsEndpointsDeployModelCall { + c := &ProjectsLocationsEndpointsDeployModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1deploymodelrequest = googlecloudaiplatformv1deploymodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { +func (c *ProjectsLocationsEndpointsDeployModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeployModelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall { +func (c *ProjectsLocationsEndpointsDeployModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeployModelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsDeployModelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsDeployModelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deploymodelrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:deployModel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.delete" call. +// Do executes the "aiplatform.projects.locations.endpoints.deployModel" call. // 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 *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48759,7 +51973,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Do(opts ...g 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, @@ -48772,85 +51986,79 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsDeleteCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDatasetsSavedQueriesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsDirectPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1directpredictrequest *GoogleCloudAiplatformV1DirectPredictRequest + 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. +// DirectPredict: Perform an unary online prediction request to a gRPC model +// server for Vertex first-party products and frameworks. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Get(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { - c := &ProjectsLocationsDatasetsSavedQueriesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) DirectPredict(endpoint string, googlecloudaiplatformv1directpredictrequest *GoogleCloudAiplatformV1DirectPredictRequest) *ProjectsLocationsEndpointsDirectPredictCall { + c := &ProjectsLocationsEndpointsDirectPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1directpredictrequest = googlecloudaiplatformv1directpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { +func (c *ProjectsLocationsEndpointsDirectPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall { +func (c *ProjectsLocationsEndpointsDirectPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsDirectPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsDirectPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1directpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:directPredict") 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.get" call. +// Do executes the "aiplatform.projects.locations.endpoints.directPredict" call. // 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 +// *GoogleCloudAiplatformV1DirectPredictResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsDirectPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DirectPredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48869,7 +52077,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1DirectPredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -48882,104 +52090,79 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsGetCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsDatasetsSavedQueriesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsDirectRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1directrawpredictrequest *GoogleCloudAiplatformV1DirectRawPredictRequest + 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`. +// DirectRawPredict: Perform an unary online prediction request to a gRPC model +// server for custom containers. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) List(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { - c := &ProjectsLocationsDatasetsSavedQueriesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Filter(filter string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) DirectRawPredict(endpoint string, googlecloudaiplatformv1directrawpredictrequest *GoogleCloudAiplatformV1DirectRawPredictRequest) *ProjectsLocationsEndpointsDirectRawPredictCall { + c := &ProjectsLocationsEndpointsDirectRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1directrawpredictrequest = googlecloudaiplatformv1directrawpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectRawPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsListCall { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectRawPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1directrawpredictrequest) + if err != nil { + return nil, err + } 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/{+endpoint}:directRawPredict") 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.list" call. +// Do executes the "aiplatform.projects.locations.endpoints.directRawPredict" call. // 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 +// *GoogleCloudAiplatformV1DirectRawPredictResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DirectRawPredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48998,7 +52181,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1DirectRawPredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49011,90 +52194,62 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Do(opts ...goo return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsExplainCall struct { + s *Service + endpoint string + googlecloudaiplatformv1explainrequest *GoogleCloudAiplatformV1ExplainRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// Explain: Perform an online explanation. If deployed_model_id is specified, +// the corresponding DeployModel must have explanation_spec populated. If +// deployed_model_id is not specified, all DeployedModels must have +// explanation_spec populated. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsDatasetsSavedQueriesOperationsService) Wait(name string) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { - c := &ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - endpoint: The name of the Endpoint requested to serve the explanation. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) Explain(endpoint string, googlecloudaiplatformv1explainrequest *GoogleCloudAiplatformV1ExplainRequest) *ProjectsLocationsEndpointsExplainCall { + c := &ProjectsLocationsEndpointsExplainCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1explainrequest = googlecloudaiplatformv1explainrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { +func (c *ProjectsLocationsEndpointsExplainCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsExplainCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall { +func (c *ProjectsLocationsEndpointsExplainCall) Context(ctx context.Context) *ProjectsLocationsEndpointsExplainCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsExplainCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsExplainCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1explainrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:explain") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -49102,18 +52257,18 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.datasets.savedQueries.operations.wait" call. +// Do executes the "aiplatform.projects.locations.endpoints.explain" call. // 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 +// *GoogleCloudAiplatformV1ExplainResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsExplainCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ExplainResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49132,7 +52287,7 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ExplainResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49145,59 +52300,61 @@ func (c *ProjectsLocationsDatasetsSavedQueriesOperationsWaitCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1createdeploymentresourcepoolrequest *GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsFetchPredictOperationCall struct { + s *Service + endpoint string + googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Create a DeploymentResourcePool. +// FetchPredictOperation: Fetch an asynchronous online prediction operation. // -// - parent: The parent location resource where this DeploymentResourcePool -// will be created. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) Create(parent string, googlecloudaiplatformv1createdeploymentresourcepoolrequest *GoogleCloudAiplatformV1CreateDeploymentResourcePoolRequest) *ProjectsLocationsDeploymentResourcePoolsCreateCall { - c := &ProjectsLocationsDeploymentResourcePoolsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1createdeploymentresourcepoolrequest = googlecloudaiplatformv1createdeploymentresourcepoolrequest +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or +// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod +// el}`. +func (r *ProjectsLocationsEndpointsService) FetchPredictOperation(endpoint string, googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest) *ProjectsLocationsEndpointsFetchPredictOperationCall { + c := &ProjectsLocationsEndpointsFetchPredictOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1fetchpredictoperationrequest = googlecloudaiplatformv1fetchpredictoperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsCreateCall { +func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsFetchPredictOperationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsCreateCall { +func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Context(ctx context.Context) *ProjectsLocationsEndpointsFetchPredictOperationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1createdeploymentresourcepoolrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchpredictoperationrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/deploymentResourcePools") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:fetchPredictOperation") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -49205,18 +52362,18 @@ func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) doRequest(alt strin } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.create" call. +// Do executes the "aiplatform.projects.locations.endpoints.fetchPredictOperation" call. // 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 *ProjectsLocationsDeploymentResourcePoolsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49248,73 +52405,81 @@ func (c *ProjectsLocationsDeploymentResourcePoolsCreateCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Delete a DeploymentResourcePool. -// -// - name: The name of the DeploymentResourcePool to delete. Format: -// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen -// t_resource_pool}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) Delete(name string) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { - c := &ProjectsLocationsDeploymentResourcePoolsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// GenerateContent: Generate content with multimodal inputs. +// +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsGenerateContentCall { + c := &ProjectsLocationsEndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { +func (c *ProjectsLocationsEndpointsGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsGenerateContentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsDeleteCall { +func (c *ProjectsLocationsEndpointsGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsEndpointsGenerateContentCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsGenerateContentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") 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, + "model": c.model, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.delete" call. +// Do executes the "aiplatform.projects.locations.endpoints.generateContent" call. // 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 +// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49333,7 +52498,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1GenerateContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49346,7 +52511,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsGetCall struct { +type ProjectsLocationsEndpointsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -49355,13 +52520,12 @@ type ProjectsLocationsDeploymentResourcePoolsGetCall struct { header_ http.Header } -// Get: Get a DeploymentResourcePool. +// Get: Gets an Endpoint. // -// - name: The name of the DeploymentResourcePool to retrieve. Format: -// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen -// t_resource_pool}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) Get(name string) *ProjectsLocationsDeploymentResourcePoolsGetCall { - c := &ProjectsLocationsDeploymentResourcePoolsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Endpoint resource. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) Get(name string) *ProjectsLocationsEndpointsGetCall { + c := &ProjectsLocationsEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -49369,7 +52533,7 @@ func (r *ProjectsLocationsDeploymentResourcePoolsService) Get(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsGetCall { +func (c *ProjectsLocationsEndpointsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -49377,27 +52541,27 @@ func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Fields(s ...googleapi. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsGetCall { +func (c *ProjectsLocationsEndpointsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsGetCall { +func (c *ProjectsLocationsEndpointsGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -49418,13 +52582,13 @@ func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.get" call. +// Do executes the "aiplatform.projects.locations.endpoints.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DeploymentResourcePool.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1Endpoint.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DeploymentResourcePool, error) { +func (c *ProjectsLocationsEndpointsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Endpoint, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49443,7 +52607,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DeploymentResourcePool{ + ret := &GoogleCloudAiplatformV1Endpoint{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49456,7 +52620,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsListCall struct { +type ProjectsLocationsEndpointsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -49465,38 +52629,66 @@ type ProjectsLocationsDeploymentResourcePoolsListCall struct { header_ http.Header } -// List: List DeploymentResourcePools in a location. +// List: Lists Endpoints in a Location. // -// - parent: The parent Location which owns this collection of -// DeploymentResourcePools. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) List(parent string) *ProjectsLocationsDeploymentResourcePoolsListCall { - c := &ProjectsLocationsDeploymentResourcePoolsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location from which to list the +// Endpoints. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsEndpointsService) List(parent string) *ProjectsLocationsEndpointsListCall { + c := &ProjectsLocationsEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// DeploymentResourcePools to return. The service may return fewer than this -// value. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsListCall { +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `endpoint` supports `=` and `!=`. `endpoint` represents the +// Endpoint ID, i.e. the last segment of the Endpoint's resource name. * +// `display_name` supports `=` and `!=`. * `labels` supports general map +// functions that is: * `labels.key=value` - key:value equality * +// `labels.key:*` or `labels:key` - key existence * A key including a space +// must be quoted. `labels."a key". * `base_model_name` only supports `=`. +// Some examples: * `endpoint=1` * `displayName="myDisplayName" * +// `labels.myKey="myValue" * `baseModelName="text-bison" +func (c *ProjectsLocationsEndpointsListCall) Filter(filter string) *ProjectsLocationsEndpointsListCall { + 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: * `display_name` * `create_time` * +// `update_time` Example: `display_name, create_time desc`. +func (c *ProjectsLocationsEndpointsListCall) OrderBy(orderBy string) *ProjectsLocationsEndpointsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsEndpointsListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `ListDeploymentResourcePools` call. Provide this to retrieve -// the subsequent page. When paginating, all other parameters provided to -// `ListDeploymentResourcePools` must match the call that provided the page -// token. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListEndpointsResponse.next_page_token of the +// previous EndpointService.ListEndpoints call. +func (c *ProjectsLocationsEndpointsListCall) PageToken(pageToken string) *ProjectsLocationsEndpointsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsEndpointsListCall) ReadMask(readMask string) *ProjectsLocationsEndpointsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsListCall { +func (c *ProjectsLocationsEndpointsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -49504,27 +52696,27 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsListCall { +func (c *ProjectsLocationsEndpointsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsListCall { +func (c *ProjectsLocationsEndpointsListCall) Context(ctx context.Context) *ProjectsLocationsEndpointsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -49532,7 +52724,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) 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/{+parent}/deploymentResourcePools") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -49545,13 +52737,13 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.list" call. +// Do executes the "aiplatform.projects.locations.endpoints.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse.ServerResponse.He -// ader or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse, error) { +// *GoogleCloudAiplatformV1ListEndpointsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEndpointsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListEndpointsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49570,7 +52762,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse{ + ret := &GoogleCloudAiplatformV1ListEndpointsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49586,7 +52778,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Do(opts ...googleapi. // 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 *ProjectsLocationsDeploymentResourcePoolsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListDeploymentResourcePoolsResponse) error) error { +func (c *ProjectsLocationsEndpointsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListEndpointsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -49604,86 +52796,82 @@ func (c *ProjectsLocationsDeploymentResourcePoolsListCall) Pages(ctx context.Con } } -type ProjectsLocationsDeploymentResourcePoolsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1deploymentresourcepool *GoogleCloudAiplatformV1DeploymentResourcePool - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsMutateDeployedModelCall struct { + s *Service + endpoint string + googlecloudaiplatformv1mutatedeployedmodelrequest *GoogleCloudAiplatformV1MutateDeployedModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Update a DeploymentResourcePool. +// MutateDeployedModel: Updates an existing deployed model. Updatable fields +// include `min_replica_count`, `max_replica_count`, +// `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and +// `enable_container_logging` (v1beta1 only). // -// - name: Immutable. The resource name of the DeploymentResourcePool. Format: -// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen -// t_resource_pool}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) Patch(name string, googlecloudaiplatformv1deploymentresourcepool *GoogleCloudAiplatformV1DeploymentResourcePool) *ProjectsLocationsDeploymentResourcePoolsPatchCall { - c := &ProjectsLocationsDeploymentResourcePoolsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1deploymentresourcepool = googlecloudaiplatformv1deploymentresourcepool - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The list of -// fields to update. -func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsDeploymentResourcePoolsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - endpoint: The name of the Endpoint resource into which to mutate a +// DeployedModel. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) MutateDeployedModel(endpoint string, googlecloudaiplatformv1mutatedeployedmodelrequest *GoogleCloudAiplatformV1MutateDeployedModelRequest) *ProjectsLocationsEndpointsMutateDeployedModelCall { + c := &ProjectsLocationsEndpointsMutateDeployedModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1mutatedeployedmodelrequest = googlecloudaiplatformv1mutatedeployedmodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsPatchCall { +func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsMutateDeployedModelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsPatchCall { +func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsMutateDeployedModelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deploymentresourcepool) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1mutatedeployedmodelrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:mutateDeployedModel") 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.patch" call. +// Do executes the "aiplatform.projects.locations.endpoints.mutateDeployedModel" call. // 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 *ProjectsLocationsDeploymentResourcePoolsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49715,103 +52903,84 @@ func (c *ProjectsLocationsDeploymentResourcePoolsPatchCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall struct { - s *Service - deploymentResourcePool string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// QueryDeployedModels: List DeployedModels that have been deployed on this -// DeploymentResourcePool. +// Patch: Updates an Endpoint. // -// - deploymentResourcePool: The name of the target DeploymentResourcePool to -// query. Format: -// `projects/{project}/locations/{location}/deploymentResourcePools/{deploymen -// t_resource_pool}`. -func (r *ProjectsLocationsDeploymentResourcePoolsService) QueryDeployedModels(deploymentResourcePool string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { - c := &ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.deploymentResourcePool = deploymentResourcePool - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// DeployedModels to return. The service may return fewer than this value. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - name: Output only. The resource name of the Endpoint. +func (r *ProjectsLocationsEndpointsService) Patch(name string, googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint) *ProjectsLocationsEndpointsPatchCall { + c := &ProjectsLocationsEndpointsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1endpoint = googlecloudaiplatformv1endpoint return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous `QueryDeployedModels` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `QueryDeployedModels` must match the call that provided the page token. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { - c.urlParams_.Set("pageToken", pageToken) +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. See google.protobuf.FieldMask. +func (c *ProjectsLocationsEndpointsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { +func (c *ProjectsLocationsEndpointsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall { +func (c *ProjectsLocationsEndpointsPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1endpoint) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+deploymentResourcePool}:queryDeployedModels") + 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{ - "deploymentResourcePool": c.deploymentResourcePool, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.queryDeployedModels" call. +// Do executes the "aiplatform.projects.locations.endpoints.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1QueryDeployedModelsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1Endpoint.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1QueryDeployedModelsResponse, error) { +func (c *ProjectsLocationsEndpointsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Endpoint, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49830,7 +52999,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1QueryDeployedModelsResponse{ + ret := &GoogleCloudAiplatformV1Endpoint{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49843,81 +53012,164 @@ func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Do(opt return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDeploymentResourcePoolsQueryDeployedModelsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1QueryDeployedModelsResponse) error) error { +type ProjectsLocationsEndpointsPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Predict: Perform an online prediction. +// +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) Predict(endpoint string, googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest) *ProjectsLocationsEndpointsPredictCall { + c := &ProjectsLocationsEndpointsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1predictrequest = googlecloudaiplatformv1predictrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsEndpointsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPredictCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsEndpointsPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPredictCall { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsEndpointsPredictCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsEndpointsPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predict") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "endpoint": c.endpoint, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.endpoints.predict" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1PredictResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsEndpointsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PredictResponse, 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() } - c.PageToken(x.NextPageToken) + 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 := &GoogleCloudAiplatformV1PredictResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err } + return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsPredictLongRunningCall struct { + s *Service + endpoint string + googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// PredictLongRunning: // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Cancel(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { - c := &ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or +// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod +// el}`. +func (r *ProjectsLocationsEndpointsService) PredictLongRunning(endpoint string, googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest) *ProjectsLocationsEndpointsPredictLongRunningCall { + c := &ProjectsLocationsEndpointsPredictLongRunningCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1predictlongrunningrequest = googlecloudaiplatformv1predictlongrunningrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { +func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPredictLongRunningCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall { +func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPredictLongRunningCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsPredictLongRunningCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictlongrunningrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predictLongRunning") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -49925,18 +53177,18 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) doRequest } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.endpoints.predictLongRunning" call. // 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 *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsEndpointsPredictLongRunningCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49955,7 +53207,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Do(opts . 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, @@ -49968,74 +53220,82 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsCancelCall) Do(opts . return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest + 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`. +// RawPredict: Perform an online prediction with an arbitrary HTTP payload. The +// response includes the following HTTP headers: * `X-Vertex-AI-Endpoint-Id`: +// ID of the Endpoint that served this prediction. * +// `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's DeployedModel that +// served this prediction. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Delete(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { - c := &ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) RawPredict(endpoint string, googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest) *ProjectsLocationsEndpointsRawPredictCall { + c := &ProjectsLocationsEndpointsRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1rawpredictrequest = googlecloudaiplatformv1rawpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { +func (c *ProjectsLocationsEndpointsRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsRawPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall { +func (c *ProjectsLocationsEndpointsRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsRawPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsRawPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rawpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:rawPredict") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.delete" call. +// Do executes the "aiplatform.projects.locations.endpoints.rawPredict" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsEndpointsRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50054,7 +53314,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50067,85 +53327,79 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsDeleteCall) Do(opts . return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsServerStreamingPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest + 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. +// ServerStreamingPredict: Perform a server-side streaming online prediction +// request for Vertex LLM streaming. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Get(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { - c := &ProjectsLocationsDeploymentResourcePoolsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) ServerStreamingPredict(endpoint string, googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest) *ProjectsLocationsEndpointsServerStreamingPredictCall { + c := &ProjectsLocationsEndpointsServerStreamingPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1streamingpredictrequest = googlecloudaiplatformv1streamingpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { +func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsServerStreamingPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall { +func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsServerStreamingPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:serverStreamingPredict") 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.get" call. +// Do executes the "aiplatform.projects.locations.endpoints.serverStreamingPredict" call. // 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 +// *GoogleCloudAiplatformV1StreamingPredictResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1StreamingPredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50164,7 +53418,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1StreamingPredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50177,104 +53431,82 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsGetCall) Do(opts ...g return ret, nil } -type ProjectsLocationsDeploymentResourcePoolsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + 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`. +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) List(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { - c := &ProjectsLocationsDeploymentResourcePoolsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Filter(filter string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsStreamGenerateContentCall { + c := &ProjectsLocationsEndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { +func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsStreamGenerateContentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsListCall { +func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsEndpointsStreamGenerateContentCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } 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/{+model}:streamGenerateContent") 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, + "model": c.model, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.list" call. +// Do executes the "aiplatform.projects.locations.endpoints.streamGenerateContent" call. // 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 +// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50293,7 +53525,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1GenerateContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50306,90 +53538,60 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Do(opts ... return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsStreamRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// StreamRawPredict: Perform a streaming online prediction with an arbitrary +// HTTP payload. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsDeploymentResourcePoolsOperationsService) Wait(name string) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { - c := &ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) StreamRawPredict(endpoint string, googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest) *ProjectsLocationsEndpointsStreamRawPredictCall { + c := &ProjectsLocationsEndpointsStreamRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1streamrawpredictrequest = googlecloudaiplatformv1streamrawpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { +func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsStreamRawPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall { +func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsStreamRawPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsEndpointsStreamRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamrawpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:streamRawPredict") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -50397,18 +53599,18 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) doRequest(a } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.deploymentResourcePools.operations.wait" call. +// Do executes the "aiplatform.projects.locations.endpoints.streamRawPredict" call. // 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 *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsEndpointsStreamRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50427,7 +53629,7 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Do(opts ... 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, @@ -50440,59 +53642,61 @@ func (c *ProjectsLocationsDeploymentResourcePoolsOperationsWaitCall) Do(opts ... return ret, nil } -type ProjectsLocationsEndpointsComputeTokensCall struct { +type ProjectsLocationsEndpointsUndeployModelCall struct { s *Service endpoint string - googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + googlecloudaiplatformv1undeploymodelrequest *GoogleCloudAiplatformV1UndeployModelRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// ComputeTokens: Return a list of tokens based on the input text. +// UndeployModel: Undeploys a Model from an Endpoint, removing a DeployedModel +// from it, and freeing all resources it's using. // -// - endpoint: The name of the Endpoint requested to get lists of tokens and -// token ids. -func (r *ProjectsLocationsEndpointsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *ProjectsLocationsEndpointsComputeTokensCall { - c := &ProjectsLocationsEndpointsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - endpoint: The name of the Endpoint resource from which to undeploy a +// Model. Format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsService) UndeployModel(endpoint string, googlecloudaiplatformv1undeploymodelrequest *GoogleCloudAiplatformV1UndeployModelRequest) *ProjectsLocationsEndpointsUndeployModelCall { + c := &ProjectsLocationsEndpointsUndeployModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.endpoint = endpoint - c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest + c.googlecloudaiplatformv1undeploymodelrequest = googlecloudaiplatformv1undeploymodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsComputeTokensCall { +func (c *ProjectsLocationsEndpointsUndeployModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsUndeployModelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsEndpointsComputeTokensCall { +func (c *ProjectsLocationsEndpointsUndeployModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsUndeployModelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsComputeTokensCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsUndeployModelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsComputeTokensCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsUndeployModelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1undeploymodelrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:undeployModel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -50505,13 +53709,13 @@ func (c *ProjectsLocationsEndpointsComputeTokensCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.computeTokens" call. +// Do executes the "aiplatform.projects.locations.endpoints.undeployModel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { +func (c *ProjectsLocationsEndpointsUndeployModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50530,7 +53734,7 @@ func (c *ProjectsLocationsEndpointsComputeTokensCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50543,59 +53747,58 @@ func (c *ProjectsLocationsEndpointsComputeTokensCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEndpointsCountTokensCall struct { - s *Service - endpoint string - googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsUpdateCall struct { + s *Service + name string + googlecloudaiplatformv1updateendpointlongrunningrequest *GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CountTokens: Perform a token counting. +// Update: Updates an Endpoint with a long running operation. // -// - endpoint: The name of the Endpoint requested to perform token counting. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *ProjectsLocationsEndpointsCountTokensCall { - c := &ProjectsLocationsEndpointsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest +// - name: Output only. The resource name of the Endpoint. +func (r *ProjectsLocationsEndpointsService) Update(name string, googlecloudaiplatformv1updateendpointlongrunningrequest *GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest) *ProjectsLocationsEndpointsUpdateCall { + c := &ProjectsLocationsEndpointsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1updateendpointlongrunningrequest = googlecloudaiplatformv1updateendpointlongrunningrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsCountTokensCall { +func (c *ProjectsLocationsEndpointsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsEndpointsCountTokensCall { +func (c *ProjectsLocationsEndpointsUpdateCall) Context(ctx context.Context) *ProjectsLocationsEndpointsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsCountTokensCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsCountTokensCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1updateendpointlongrunningrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:update") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -50603,18 +53806,18 @@ func (c *ProjectsLocationsEndpointsCountTokensCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.countTokens" call. +// Do executes the "aiplatform.projects.locations.endpoints.update" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, error) { +func (c *ProjectsLocationsEndpointsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50633,7 +53836,7 @@ func (c *ProjectsLocationsEndpointsCountTokensCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CountTokensResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50646,74 +53849,59 @@ func (c *ProjectsLocationsEndpointsCountTokensCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsEndpointsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsChatCompletionsCall struct { + s *Service + endpoint string + googleapihttpbody *GoogleApiHttpBody + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an Endpoint. +// Completions: Exposes an OpenAI-compatible endpoint for chat completions. // -// - parent: The resource name of the Location to create the Endpoint in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsEndpointsService) Create(parent string, googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint) *ProjectsLocationsEndpointsCreateCall { - c := &ProjectsLocationsEndpointsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1endpoint = googlecloudaiplatformv1endpoint - return c -} - -// EndpointId sets the optional parameter "endpointId": Immutable. The ID to -// use for endpoint, which will become the final component of the endpoint -// resource name. If not provided, Vertex AI will generate a value for this ID. -// If the first character is a letter, this value may be up to 63 characters, -// and valid characters are `[a-z0-9-]`. The last character must be a letter or -// number. If the first character is a number, this value may be up to 9 -// characters, and valid characters are `[0-9]` with no leading zeros. When -// using HTTP/JSON, this field is populated based on a query string argument, -// such as `?endpoint_id=12345`. This is the fallback for fields that are not -// included in either the URI or the body. -func (c *ProjectsLocationsEndpointsCreateCall) EndpointId(endpointId string) *ProjectsLocationsEndpointsCreateCall { - c.urlParams_.Set("endpointId", endpointId) +// - endpoint: The name of the endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsEndpointsChatService) Completions(endpoint string, googleapihttpbody *GoogleApiHttpBody) *ProjectsLocationsEndpointsChatCompletionsCall { + c := &ProjectsLocationsEndpointsChatCompletionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googleapihttpbody = googleapihttpbody return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsCreateCall { +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsChatCompletionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsCreateCall) Context(ctx context.Context) *ProjectsLocationsEndpointsCreateCall { +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Context(ctx context.Context) *ProjectsLocationsEndpointsChatCompletionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsCreateCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsChatCompletionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1endpoint) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/endpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}/chat/completions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -50721,18 +53909,18 @@ func (c *ProjectsLocationsEndpointsCreateCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.create" call. +// Do executes the "aiplatform.projects.locations.endpoints.chat.completions" call. // 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 *ProjectsLocationsEndpointsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsEndpointsChatCompletionsCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50751,7 +53939,7 @@ func (c *ProjectsLocationsEndpointsCreateCall) Do(opts ...googleapi.CallOption) 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, @@ -50764,7 +53952,7 @@ func (c *ProjectsLocationsEndpointsCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEndpointsDeleteCall struct { +type ProjectsLocationsEndpointsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -50772,12 +53960,19 @@ type ProjectsLocationsEndpointsDeleteCall struct { header_ http.Header } -// Delete: Deletes an Endpoint. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - name: The name of the Endpoint resource to be deleted. Format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) Delete(name string) *ProjectsLocationsEndpointsDeleteCall { - c := &ProjectsLocationsEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsEndpointsOperationsService) Cancel(name string) *ProjectsLocationsEndpointsOperationsCancelCall { + c := &ProjectsLocationsEndpointsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -50785,34 +53980,34 @@ func (r *ProjectsLocationsEndpointsService) Delete(name string) *ProjectsLocatio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeleteCall { +func (c *ProjectsLocationsEndpointsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeleteCall { +func (c *ProjectsLocationsEndpointsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsEndpointsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -50823,13 +54018,13 @@ func (c *ProjectsLocationsEndpointsDeleteCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.delete" call. +// Do executes the "aiplatform.projects.locations.endpoints.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsEndpointsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50848,7 +54043,7 @@ func (c *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) 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, @@ -50861,79 +54056,74 @@ func (c *ProjectsLocationsEndpointsDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEndpointsDeployModelCall struct { - s *Service - endpoint string - googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// DeployModel: Deploys a Model into this Endpoint, creating a DeployedModel -// within it. +type ProjectsLocationsEndpointsOperationsDeleteCall 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`. // -// - endpoint: The name of the Endpoint resource into which to deploy a Model. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) DeployModel(endpoint string, googlecloudaiplatformv1deploymodelrequest *GoogleCloudAiplatformV1DeployModelRequest) *ProjectsLocationsEndpointsDeployModelCall { - c := &ProjectsLocationsEndpointsDeployModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1deploymodelrequest = googlecloudaiplatformv1deploymodelrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsEndpointsOperationsService) Delete(name string) *ProjectsLocationsEndpointsOperationsDeleteCall { + c := &ProjectsLocationsEndpointsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsDeployModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDeployModelCall { +func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsDeployModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDeployModelCall { +func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsDeployModelCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsDeployModelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsEndpointsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deploymodelrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:deployModel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.deployModel" call. +// Do executes the "aiplatform.projects.locations.endpoints.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsEndpointsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50952,7 +54142,7 @@ func (c *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOpt 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, @@ -50965,79 +54155,85 @@ func (c *ProjectsLocationsEndpointsDeployModelCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsEndpointsDirectPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1directpredictrequest *GoogleCloudAiplatformV1DirectPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DirectPredict: Perform an unary online prediction request to a gRPC model -// server for Vertex first-party products and frameworks. +// 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. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) DirectPredict(endpoint string, googlecloudaiplatformv1directpredictrequest *GoogleCloudAiplatformV1DirectPredictRequest) *ProjectsLocationsEndpointsDirectPredictCall { - c := &ProjectsLocationsEndpointsDirectPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1directpredictrequest = googlecloudaiplatformv1directpredictrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsEndpointsOperationsService) Get(name string) *ProjectsLocationsEndpointsOperationsGetCall { + c := &ProjectsLocationsEndpointsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsDirectPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectPredictCall { +func (c *ProjectsLocationsEndpointsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsEndpointsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsDirectPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectPredictCall { +func (c *ProjectsLocationsEndpointsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsDirectPredictCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsDirectPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1directpredictrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsEndpointsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:directPredict") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.directPredict" call. +// Do executes the "aiplatform.projects.locations.endpoints.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DirectPredictResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsDirectPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DirectPredictResponse, error) { +func (c *ProjectsLocationsEndpointsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51056,7 +54252,7 @@ func (c *ProjectsLocationsEndpointsDirectPredictCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DirectPredictResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51069,79 +54265,104 @@ func (c *ProjectsLocationsEndpointsDirectPredictCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEndpointsDirectRawPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1directrawpredictrequest *GoogleCloudAiplatformV1DirectRawPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsEndpointsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DirectRawPredict: Perform an unary online prediction request to a gRPC model -// server for custom containers. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) DirectRawPredict(endpoint string, googlecloudaiplatformv1directrawpredictrequest *GoogleCloudAiplatformV1DirectRawPredictRequest) *ProjectsLocationsEndpointsDirectRawPredictCall { - c := &ProjectsLocationsEndpointsDirectRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1directrawpredictrequest = googlecloudaiplatformv1directrawpredictrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsEndpointsOperationsService) List(name string) *ProjectsLocationsEndpointsOperationsListCall { + c := &ProjectsLocationsEndpointsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsEndpointsOperationsListCall) Filter(filter string) *ProjectsLocationsEndpointsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsEndpointsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsEndpointsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsEndpointsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsDirectRawPredictCall { +func (c *ProjectsLocationsEndpointsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsEndpointsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsDirectRawPredictCall { +func (c *ProjectsLocationsEndpointsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsDirectRawPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1directrawpredictrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsEndpointsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:directRawPredict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.directRawPredict" call. +// Do executes the "aiplatform.projects.locations.endpoints.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1DirectRawPredictResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsDirectRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1DirectRawPredictResponse, error) { +func (c *ProjectsLocationsEndpointsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51160,7 +54381,7 @@ func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1DirectRawPredictResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51173,62 +54394,90 @@ func (c *ProjectsLocationsEndpointsDirectRawPredictCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsEndpointsExplainCall struct { - s *Service - endpoint string - googlecloudaiplatformv1explainrequest *GoogleCloudAiplatformV1ExplainRequest - 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 *ProjectsLocationsEndpointsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Explain: Perform an online explanation. If deployed_model_id is specified, -// the corresponding DeployModel must have explanation_spec populated. If -// deployed_model_id is not specified, all DeployedModels must have -// explanation_spec populated. +type ProjectsLocationsEndpointsOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - endpoint: The name of the Endpoint requested to serve the explanation. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) Explain(endpoint string, googlecloudaiplatformv1explainrequest *GoogleCloudAiplatformV1ExplainRequest) *ProjectsLocationsEndpointsExplainCall { - c := &ProjectsLocationsEndpointsExplainCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1explainrequest = googlecloudaiplatformv1explainrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsEndpointsOperationsService) Wait(name string) *ProjectsLocationsEndpointsOperationsWaitCall { + c := &ProjectsLocationsEndpointsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsEndpointsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsEndpointsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsExplainCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsExplainCall { +func (c *ProjectsLocationsEndpointsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsExplainCall) Context(ctx context.Context) *ProjectsLocationsEndpointsExplainCall { +func (c *ProjectsLocationsEndpointsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsExplainCall) Header() http.Header { +func (c *ProjectsLocationsEndpointsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsExplainCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsEndpointsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1explainrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:explain") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -51236,18 +54485,18 @@ func (c *ProjectsLocationsEndpointsExplainCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.explain" call. +// Do executes the "aiplatform.projects.locations.endpoints.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ExplainResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsExplainCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ExplainResponse, error) { +func (c *ProjectsLocationsEndpointsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51266,7 +54515,7 @@ func (c *ProjectsLocationsEndpointsExplainCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ExplainResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51279,61 +54528,69 @@ func (c *ProjectsLocationsEndpointsExplainCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEndpointsFetchPredictOperationCall struct { - s *Service - endpoint string - googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FetchPredictOperation: Fetch an asynchronous online prediction operation. +// Create: Creates a new FeatureGroup in a given project and location. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or -// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod -// el}`. -func (r *ProjectsLocationsEndpointsService) FetchPredictOperation(endpoint string, googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest) *ProjectsLocationsEndpointsFetchPredictOperationCall { - c := &ProjectsLocationsEndpointsFetchPredictOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1fetchpredictoperationrequest = googlecloudaiplatformv1fetchpredictoperationrequest +// - parent: The resource name of the Location to create FeatureGroups. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeatureGroupsService) Create(parent string, googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup) *ProjectsLocationsFeatureGroupsCreateCall { + c := &ProjectsLocationsFeatureGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1featuregroup = googlecloudaiplatformv1featuregroup + return c +} + +// FeatureGroupId sets the optional parameter "featureGroupId": Required. The +// ID to use for this FeatureGroup, which will become the final component of +// the FeatureGroup's resource name. This value may be up to 128 characters, +// and valid characters are `[a-z0-9_]`. The first character cannot be a +// number. The value must be unique within the project and location. +func (c *ProjectsLocationsFeatureGroupsCreateCall) FeatureGroupId(featureGroupId string) *ProjectsLocationsFeatureGroupsCreateCall { + c.urlParams_.Set("featureGroupId", featureGroupId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsFetchPredictOperationCall { +func (c *ProjectsLocationsFeatureGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Context(ctx context.Context) *ProjectsLocationsEndpointsFetchPredictOperationCall { +func (c *ProjectsLocationsFeatureGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchpredictoperationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featuregroup) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:fetchPredictOperation") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -51341,18 +54598,18 @@ func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.fetchPredictOperation" call. +// Do executes the "aiplatform.projects.locations.featureGroups.create" call. // 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 *ProjectsLocationsEndpointsFetchPredictOperationCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51384,81 +54641,80 @@ func (c *ProjectsLocationsEndpointsFetchPredictOperationCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsEndpointsGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GenerateContent: Generate content with multimodal inputs. +// Delete: Deletes a single FeatureGroup. // -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsGenerateContentCall { - c := &ProjectsLocationsEndpointsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// - name: The name of the FeatureGroup to be deleted. Format: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsService) Delete(name string) *ProjectsLocationsFeatureGroupsDeleteCall { + c := &ProjectsLocationsFeatureGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If set to true, any Features +// under this FeatureGroup will also be deleted. (Otherwise, the request will +// only work if the FeatureGroup has no Features.) +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Force(force bool) *ProjectsLocationsFeatureGroupsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsGenerateContentCall { +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsEndpointsGenerateContentCall { +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") + 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{ - "model": c.model, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.generateContent" call. +// Do executes the "aiplatform.projects.locations.featureGroups.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +func (c *ProjectsLocationsFeatureGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51477,7 +54733,7 @@ func (c *ProjectsLocationsEndpointsGenerateContentCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51490,7 +54746,7 @@ func (c *ProjectsLocationsEndpointsGenerateContentCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsEndpointsGetCall struct { +type ProjectsLocationsFeatureGroupsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -51499,12 +54755,11 @@ type ProjectsLocationsEndpointsGetCall struct { header_ http.Header } -// Get: Gets an Endpoint. +// Get: Gets details of a single FeatureGroup. // -// - name: The name of the Endpoint resource. Format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) Get(name string) *ProjectsLocationsEndpointsGetCall { - c := &ProjectsLocationsEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the FeatureGroup resource. +func (r *ProjectsLocationsFeatureGroupsService) Get(name string) *ProjectsLocationsFeatureGroupsGetCall { + c := &ProjectsLocationsFeatureGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -51512,7 +54767,7 @@ func (r *ProjectsLocationsEndpointsService) Get(name string) *ProjectsLocationsE // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsGetCall { +func (c *ProjectsLocationsFeatureGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -51520,27 +54775,27 @@ func (c *ProjectsLocationsEndpointsGetCall) Fields(s ...googleapi.Field) *Projec // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsEndpointsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsGetCall { +func (c *ProjectsLocationsFeatureGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointsGetCall { +func (c *ProjectsLocationsFeatureGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -51561,13 +54816,13 @@ func (c *ProjectsLocationsEndpointsGetCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.get" call. +// Do executes the "aiplatform.projects.locations.featureGroups.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Endpoint.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1FeatureGroup.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Endpoint, error) { +func (c *ProjectsLocationsFeatureGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51586,7 +54841,7 @@ func (c *ProjectsLocationsEndpointsGetCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Endpoint{ + ret := &GoogleCloudAiplatformV1FeatureGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51599,7 +54854,7 @@ func (c *ProjectsLocationsEndpointsGetCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsEndpointsListCall struct { +type ProjectsLocationsFeatureGroupsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -51608,66 +54863,61 @@ type ProjectsLocationsEndpointsListCall struct { header_ http.Header } -// List: Lists Endpoints in a Location. +// List: Lists FeatureGroups in a given project and location. // -// - parent: The resource name of the Location from which to list the -// Endpoints. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsEndpointsService) List(parent string) *ProjectsLocationsEndpointsListCall { - c := &ProjectsLocationsEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to list FeatureGroups. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeatureGroupsService) List(parent string) *ProjectsLocationsFeatureGroupsListCall { + c := &ProjectsLocationsFeatureGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `endpoint` supports `=` and `!=`. `endpoint` represents the -// Endpoint ID, i.e. the last segment of the Endpoint's resource name. * -// `display_name` supports `=` and `!=`. * `labels` supports general map -// functions that is: * `labels.key=value` - key:value equality * -// `labels.key:*` or `labels:key` - key existence * A key including a space -// must be quoted. `labels."a key". * `base_model_name` only supports `=`. -// Some examples: * `endpoint=1` * `displayName="myDisplayName" * -// `labels.myKey="myValue" * `baseModelName="text-bison" -func (c *ProjectsLocationsEndpointsListCall) Filter(filter string) *ProjectsLocationsEndpointsListCall { +// Filter sets the optional parameter "filter": Lists the FeatureGroups that +// match the filter expression. The following fields are supported: * +// `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. +// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, +// `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 format. * +// `labels`: Supports key-value equality and key presence. Examples: * +// `create_time > "2020-01-01" OR update_time > "2020-01-01" FeatureGroups +// created or updated after 2020-01-01. * `labels.env = "prod" FeatureGroups +// with label "env" set to "prod". +func (c *ProjectsLocationsFeatureGroupsListCall) Filter(filter string) *ProjectsLocationsFeatureGroupsListCall { 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: * `display_name` * `create_time` * -// `update_time` Example: `display_name, create_time desc`. -func (c *ProjectsLocationsEndpointsListCall) OrderBy(orderBy string) *ProjectsLocationsEndpointsListCall { +// for descending. Supported Fields: * `create_time` * `update_time` +func (c *ProjectsLocationsFeatureGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureGroupsListCall { c.urlParams_.Set("orderBy", orderBy) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsEndpointsListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// FeatureGroups to return. The service may return fewer than this value. If +// unspecified, at most 100 FeatureGroups will be returned. The maximum value +// is 100; any value greater than 100 will be coerced to 100. +func (c *ProjectsLocationsFeatureGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListEndpointsResponse.next_page_token of the -// previous EndpointService.ListEndpoints call. -func (c *ProjectsLocationsEndpointsListCall) PageToken(pageToken string) *ProjectsLocationsEndpointsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeatureRegistryService.ListFeatureGroups call. Provide this +// to retrieve the subsequent page. When paginating, all other parameters +// provided to FeatureRegistryService.ListFeatureGroups must match the call +// that provided the page token. +func (c *ProjectsLocationsFeatureGroupsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsEndpointsListCall) ReadMask(readMask string) *ProjectsLocationsEndpointsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsListCall { +func (c *ProjectsLocationsFeatureGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -51675,27 +54925,27 @@ func (c *ProjectsLocationsEndpointsListCall) Fields(s ...googleapi.Field) *Proje // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsEndpointsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsListCall { +func (c *ProjectsLocationsFeatureGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsListCall) Context(ctx context.Context) *ProjectsLocationsEndpointsListCall { +func (c *ProjectsLocationsFeatureGroupsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsListCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -51703,7 +54953,7 @@ func (c *ProjectsLocationsEndpointsListCall) 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/{+parent}/endpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -51716,13 +54966,13 @@ func (c *ProjectsLocationsEndpointsListCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.list" call. +// Do executes the "aiplatform.projects.locations.featureGroups.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListEndpointsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListFeatureGroupsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListEndpointsResponse, error) { +func (c *ProjectsLocationsFeatureGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureGroupsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51741,7 +54991,7 @@ func (c *ProjectsLocationsEndpointsListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListEndpointsResponse{ + ret := &GoogleCloudAiplatformV1ListFeatureGroupsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51757,7 +55007,7 @@ func (c *ProjectsLocationsEndpointsListCall) 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 *ProjectsLocationsEndpointsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListEndpointsResponse) error) error { +func (c *ProjectsLocationsFeatureGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureGroupsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -51775,82 +55025,91 @@ func (c *ProjectsLocationsEndpointsListCall) Pages(ctx context.Context, f func(* } } -type ProjectsLocationsEndpointsMutateDeployedModelCall struct { - s *Service - endpoint string - googlecloudaiplatformv1mutatedeployedmodelrequest *GoogleCloudAiplatformV1MutateDeployedModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// MutateDeployedModel: Updates an existing deployed model. Updatable fields -// include `min_replica_count`, `max_replica_count`, -// `autoscaling_metric_specs`, `disable_container_logging` (v1 only), and -// `enable_container_logging` (v1beta1 only). +// Patch: Updates the parameters of a single FeatureGroup. // -// - endpoint: The name of the Endpoint resource into which to mutate a -// DeployedModel. Format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) MutateDeployedModel(endpoint string, googlecloudaiplatformv1mutatedeployedmodelrequest *GoogleCloudAiplatformV1MutateDeployedModelRequest) *ProjectsLocationsEndpointsMutateDeployedModelCall { - c := &ProjectsLocationsEndpointsMutateDeployedModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1mutatedeployedmodelrequest = googlecloudaiplatformv1mutatedeployedmodelrequest +// - name: Identifier. Name of the FeatureGroup. Format: +// `projects/{project}/locations/{location}/featureGroups/{featureGroup}`. +func (r *ProjectsLocationsFeatureGroupsService) Patch(name string, googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup) *ProjectsLocationsFeatureGroupsPatchCall { + c := &ProjectsLocationsFeatureGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1featuregroup = googlecloudaiplatformv1featuregroup + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the FeatureGroup 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 only the non-empty fields +// present in the request will be overwritten. Set the update_mask to `*` to +// override all fields. Updatable fields: * `labels` * `description` * +// `big_query` * `big_query.entity_id_columns` +func (c *ProjectsLocationsFeatureGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureGroupsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsMutateDeployedModelCall { +func (c *ProjectsLocationsFeatureGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsMutateDeployedModelCall { +func (c *ProjectsLocationsFeatureGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1mutatedeployedmodelrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featuregroup) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:mutateDeployedModel") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.mutateDeployedModel" call. +// Do executes the "aiplatform.projects.locations.featureGroups.patch" call. // 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 *ProjectsLocationsEndpointsMutateDeployedModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51882,84 +55141,81 @@ func (c *ProjectsLocationsEndpointsMutateDeployedModelCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsEndpointsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an Endpoint. +// BatchCreate: Creates a batch of Features in a given FeatureGroup. // -// - name: Output only. The resource name of the Endpoint. -func (r *ProjectsLocationsEndpointsService) Patch(name string, googlecloudaiplatformv1endpoint *GoogleCloudAiplatformV1Endpoint) *ProjectsLocationsEndpointsPatchCall { - c := &ProjectsLocationsEndpointsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1endpoint = googlecloudaiplatformv1endpoint - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. See google.protobuf.FieldMask. -func (c *ProjectsLocationsEndpointsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsEndpointsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// - parent: The resource name of the EntityType/FeatureGroup to create the +// batch of Features under. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) BatchCreate(parent string, googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { + c := &ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchcreatefeaturesrequest = googlecloudaiplatformv1batchcreatefeaturesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPatchCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsPatchCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPatchCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1endpoint) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcreatefeaturesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features:batchCreate") 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 "aiplatform.projects.locations.endpoints.patch" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.batchCreate" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Endpoint.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsEndpointsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Endpoint, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51978,7 +55234,7 @@ func (c *ProjectsLocationsEndpointsPatchCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Endpoint{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51991,59 +55247,72 @@ func (c *ProjectsLocationsEndpointsPatchCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsEndpointsPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Predict: Perform an online prediction. +// Create: Creates a new Feature in a given FeatureGroup. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) Predict(endpoint string, googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest) *ProjectsLocationsEndpointsPredictCall { - c := &ProjectsLocationsEndpointsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1predictrequest = googlecloudaiplatformv1predictrequest +// - parent: The resource name of the EntityType or FeatureGroup to create a +// Feature. Format for entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) Create(parent string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { + c := &ProjectsLocationsFeatureGroupsFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature + return c +} + +// FeatureId sets the optional parameter "featureId": Required. The ID to use +// for the Feature, which will become the final component of the Feature's +// resource name. This value may be up to 128 characters, and valid characters +// are `[a-z0-9_]`. The first character cannot be a number. The value must be +// unique within an EntityType/FeatureGroup. +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { + c.urlParams_.Set("featureId", featureId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsPredictCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsPredictCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -52051,18 +55320,18 @@ func (c *ProjectsLocationsEndpointsPredictCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.predict" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1PredictResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsEndpointsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PredictResponse, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52081,7 +55350,7 @@ func (c *ProjectsLocationsEndpointsPredictCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1PredictResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52094,80 +55363,75 @@ func (c *ProjectsLocationsEndpointsPredictCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEndpointsPredictLongRunningCall struct { - s *Service - endpoint string - googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PredictLongRunning: +// Delete: Deletes a single Feature. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or -// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod -// el}`. -func (r *ProjectsLocationsEndpointsService) PredictLongRunning(endpoint string, googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest) *ProjectsLocationsEndpointsPredictLongRunningCall { - c := &ProjectsLocationsEndpointsPredictLongRunningCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1predictlongrunningrequest = googlecloudaiplatformv1predictlongrunningrequest +// - name: The name of the Features to be deleted. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}/features/{feature}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat +// ures/{feature}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) Delete(name string) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { + c := &ProjectsLocationsFeatureGroupsFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsPredictLongRunningCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Context(ctx context.Context) *ProjectsLocationsEndpointsPredictLongRunningCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsPredictLongRunningCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictlongrunningrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predictLongRunning") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.predictLongRunning" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.delete" call. // 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 *ProjectsLocationsEndpointsPredictLongRunningCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52199,82 +55463,86 @@ func (c *ProjectsLocationsEndpointsPredictLongRunningCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsEndpointsRawPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RawPredict: Perform an online prediction with an arbitrary HTTP payload. The -// response includes the following HTTP headers: * `X-Vertex-AI-Endpoint-Id`: -// ID of the Endpoint that served this prediction. * -// `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's DeployedModel that -// served this prediction. +// Get: Gets details of a single Feature. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) RawPredict(endpoint string, googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest) *ProjectsLocationsEndpointsRawPredictCall { - c := &ProjectsLocationsEndpointsRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1rawpredictrequest = googlecloudaiplatformv1rawpredictrequest +// - name: The name of the Feature resource. Format for entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) Get(name string) *ProjectsLocationsFeatureGroupsFeaturesGetCall { + c := &ProjectsLocationsFeatureGroupsFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsRawPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsRawPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsRawPredictCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsRawPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rawpredictrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:rawPredict") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.rawPredict" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.get" call. // 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 *ProjectsLocationsEndpointsRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *GoogleCloudAiplatformV1Feature.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52293,7 +55561,7 @@ func (c *ProjectsLocationsEndpointsRawPredictCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleCloudAiplatformV1Feature{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52306,186 +55574,150 @@ func (c *ProjectsLocationsEndpointsRawPredictCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsEndpointsServerStreamingPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ServerStreamingPredict: Perform a server-side streaming online prediction -// request for Vertex LLM streaming. +// List: Lists Features in a given FeatureGroup. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) ServerStreamingPredict(endpoint string, googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest) *ProjectsLocationsEndpointsServerStreamingPredictCall { - c := &ProjectsLocationsEndpointsServerStreamingPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1streamingpredictrequest = googlecloudaiplatformv1streamingpredictrequest +// - parent: The resource name of the Location to list Features. Format for +// entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) List(parent string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c := &ProjectsLocationsFeatureGroupsFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsServerStreamingPredictCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// Filter sets the optional parameter "filter": Lists the Features that match +// the filter expression. The following filters are supported: * `value_type`: +// Supports = and != comparisons. * `create_time`: Supports =, !=, <, >, >=, +// and <= comparisons. Values must be in RFC 3339 format. * `update_time`: +// Supports =, !=, <, >, >=, and <= comparisons. Values must be in RFC 3339 +// format. * `labels`: Supports key-value equality as well as key presence. +// Examples: * `value_type = DOUBLE` --> Features whose type is DOUBLE. * +// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > +// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after +// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` +// --> Features having both (active: yes) and (env: prod) labels. * +// `labels.env: *` --> Any Feature which has a label with 'env' as the key. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Filter(filter string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("filter", filter) return c } -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsServerStreamingPredictCall { - c.ctx_ = ctx +// LatestStatsCount sets the optional parameter "latestStatsCount": Only +// applicable for Vertex AI Feature Store (Legacy). If set, return the most +// recent ListFeaturesRequest.latest_stats_count of stats for each Feature in +// response. Valid value is [0, 10]. If number of stats exists < +// ListFeaturesRequest.latest_stats_count, return all existing stats. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) LatestStatsCount(latestStatsCount int64) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("latestStatsCount", fmt.Sprint(latestStatsCount)) return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingpredictrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:serverStreamingPredict") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// 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: * `feature_id` * `value_type` (Not +// supported for FeatureRegistry Feature) * `create_time` * `update_time` +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// Do executes the "aiplatform.projects.locations.endpoints.serverStreamingPredict" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1StreamingPredictResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointsServerStreamingPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1StreamingPredictResponse, 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 := &GoogleCloudAiplatformV1StreamingPredictResponse{ - 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 +// PageSize sets the optional parameter "pageSize": The maximum number of +// Features to return. The service may return fewer than this value. If +// unspecified, at most 1000 Features will be returned. The maximum value is +// 1000; any value greater than 1000 will be coerced to 1000. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -type ProjectsLocationsEndpointsStreamGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeaturestoreService.ListFeatures call or +// FeatureRegistryService.ListFeatures call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must +// match the call that provided the page token. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -// StreamGenerateContent: Generate content with multimodal inputs with -// streaming support. -// -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsEndpointsStreamGenerateContentCall { - c := &ProjectsLocationsEndpointsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) ReadMask(readMask string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsStreamGenerateContentCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsEndpointsStreamGenerateContentCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") 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{ - "model": c.model, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.streamGenerateContent" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListFeaturesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52504,7 +55736,7 @@ func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleCloudAiplatformV1ListFeaturesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52517,79 +55749,119 @@ func (c *ProjectsLocationsEndpointsStreamGenerateContentCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsEndpointsStreamRawPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest - 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 *ProjectsLocationsFeatureGroupsFeaturesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// StreamRawPredict: Perform a streaming online prediction with an arbitrary -// HTTP payload. +type ProjectsLocationsFeatureGroupsFeaturesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single Feature. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) StreamRawPredict(endpoint string, googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest) *ProjectsLocationsEndpointsStreamRawPredictCall { - c := &ProjectsLocationsEndpointsStreamRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1streamrawpredictrequest = googlecloudaiplatformv1streamrawpredictrequest +// - name: Immutable. Name of the Feature. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}/features/{feature}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat +// ures/{feature}` The last part feature is assigned by the client. The +// feature can be up to 64 characters long and can consist only of ASCII +// Latin letters A-Z and a-z, underscore(_), and ASCII digits 0-9 starting +// with a letter. The value will be unique given an entity type. +func (r *ProjectsLocationsFeatureGroupsFeaturesService) Patch(name string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { + c := &ProjectsLocationsFeatureGroupsFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the Features 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 only the non-empty fields present in the +// request will be overwritten. Set the update_mask to `*` to override all +// fields. Updatable fields: * `description` * `labels` * `disable_monitoring` +// (Not supported for FeatureRegistryService Feature) * `point_of_contact` (Not +// supported for FeaturestoreService FeatureStore) +func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsStreamRawPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Context(ctx context.Context) *ProjectsLocationsEndpointsStreamRawPredictCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsStreamRawPredictCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamrawpredictrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:streamRawPredict") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.streamRawPredict" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.patch" call. // 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 *ProjectsLocationsEndpointsStreamRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *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 *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52608,7 +55880,7 @@ func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52621,80 +55893,74 @@ func (c *ProjectsLocationsEndpointsStreamRawPredictCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsEndpointsUndeployModelCall struct { - s *Service - endpoint string - googlecloudaiplatformv1undeploymodelrequest *GoogleCloudAiplatformV1UndeployModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UndeployModel: Undeploys a Model from an Endpoint, removing a DeployedModel -// from it, and freeing all resources it's using. +// 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`. // -// - endpoint: The name of the Endpoint resource from which to undeploy a -// Model. Format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsService) UndeployModel(endpoint string, googlecloudaiplatformv1undeploymodelrequest *GoogleCloudAiplatformV1UndeployModelRequest) *ProjectsLocationsEndpointsUndeployModelCall { - c := &ProjectsLocationsEndpointsUndeployModelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1undeploymodelrequest = googlecloudaiplatformv1undeploymodelrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Delete(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { + c := &ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsUndeployModelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsUndeployModelCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsUndeployModelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsUndeployModelCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsUndeployModelCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsUndeployModelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1undeploymodelrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:undeployModel") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.undeployModel" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.delete" call. // 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 *ProjectsLocationsEndpointsUndeployModelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52713,7 +55979,7 @@ func (c *ProjectsLocationsEndpointsUndeployModelCall) Do(opts ...googleapi.CallO 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, @@ -52726,60 +55992,68 @@ func (c *ProjectsLocationsEndpointsUndeployModelCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEndpointsUpdateCall struct { - s *Service - name string - googlecloudaiplatformv1updateendpointlongrunningrequest *GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Update: Updates an Endpoint with a long running operation. +// 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: Output only. The resource name of the Endpoint. -func (r *ProjectsLocationsEndpointsService) Update(name string, googlecloudaiplatformv1updateendpointlongrunningrequest *GoogleCloudAiplatformV1UpdateEndpointLongRunningRequest) *ProjectsLocationsEndpointsUpdateCall { - c := &ProjectsLocationsEndpointsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Get(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { + c := &ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1updateendpointlongrunningrequest = googlecloudaiplatformv1updateendpointlongrunningrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsUpdateCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsUpdateCall) Context(ctx context.Context) *ProjectsLocationsEndpointsUpdateCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsUpdateCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1updateendpointlongrunningrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:update") + 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 } @@ -52790,13 +56064,13 @@ func (c *ProjectsLocationsEndpointsUpdateCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.update" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.get" call. // 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 *ProjectsLocationsEndpointsUpdateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52828,78 +56102,104 @@ func (c *ProjectsLocationsEndpointsUpdateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsEndpointsChatCompletionsCall struct { - s *Service - endpoint string - googleapihttpbody *GoogleApiHttpBody - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Completions: Exposes an OpenAI-compatible endpoint for chat completions. +// ListWait: Lists operations that match the specified filter in the request. +// If the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - endpoint: The name of the endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsEndpointsChatService) Completions(endpoint string, googleapihttpbody *GoogleApiHttpBody) *ProjectsLocationsEndpointsChatCompletionsCall { - c := &ProjectsLocationsEndpointsChatCompletionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googleapihttpbody = googleapihttpbody +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) ListWait(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { + c := &ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsChatCompletionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsChatCompletionsCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsChatCompletionsCall) Context(ctx context.Context) *ProjectsLocationsEndpointsChatCompletionsCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsChatCompletionsCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsChatCompletionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleapihttpbody) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}/chat/completions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.chat.completions" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.listWait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsEndpointsChatCompletionsCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *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 *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52918,7 +56218,7 @@ func (c *ProjectsLocationsEndpointsChatCompletionsCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52931,7 +56231,28 @@ func (c *ProjectsLocationsEndpointsChatCompletionsCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsEndpointsOperationsCancelCall struct { +// 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 *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -52939,52 +56260,61 @@ type ProjectsLocationsEndpointsOperationsCancelCall struct { header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsEndpointsOperationsService) Cancel(name string) *ProjectsLocationsEndpointsOperationsCancelCall { - c := &ProjectsLocationsEndpointsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Wait(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { + c := &ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsCancelCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsCancelCall { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -52997,13 +56327,13 @@ func (c *ProjectsLocationsEndpointsOperationsCancelCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.wait" call. // 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 *ProjectsLocationsEndpointsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53022,7 +56352,7 @@ func (c *ProjectsLocationsEndpointsOperationsCancelCall) Do(opts ...googleapi.Ca 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, @@ -53035,7 +56365,7 @@ func (c *ProjectsLocationsEndpointsOperationsCancelCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsEndpointsOperationsDeleteCall struct { +type ProjectsLocationsFeatureGroupsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53049,8 +56379,8 @@ type ProjectsLocationsEndpointsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsEndpointsOperationsService) Delete(name string) *ProjectsLocationsEndpointsOperationsDeleteCall { - c := &ProjectsLocationsEndpointsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeatureGroupsOperationsService) Delete(name string) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { + c := &ProjectsLocationsFeatureGroupsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -53058,27 +56388,27 @@ func (r *ProjectsLocationsEndpointsOperationsService) Delete(name string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsDeleteCall { +func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsDeleteCall { +func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -53096,13 +56426,13 @@ func (c *ProjectsLocationsEndpointsOperationsDeleteCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.operations.delete" call. +// Do executes the "aiplatform.projects.locations.featureGroups.operations.delete" call. // 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 *ProjectsLocationsEndpointsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53134,7 +56464,7 @@ func (c *ProjectsLocationsEndpointsOperationsDeleteCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsEndpointsOperationsGetCall struct { +type ProjectsLocationsFeatureGroupsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53148,8 +56478,8 @@ type ProjectsLocationsEndpointsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsEndpointsOperationsService) Get(name string) *ProjectsLocationsEndpointsOperationsGetCall { - c := &ProjectsLocationsEndpointsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeatureGroupsOperationsService) Get(name string) *ProjectsLocationsFeatureGroupsOperationsGetCall { + c := &ProjectsLocationsFeatureGroupsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -53157,7 +56487,7 @@ func (r *ProjectsLocationsEndpointsOperationsService) Get(name string) *Projects // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsGetCall { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -53165,27 +56495,27 @@ func (c *ProjectsLocationsEndpointsOperationsGetCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsEndpointsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsOperationsGetCall { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsGetCall { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -53206,13 +56536,13 @@ func (c *ProjectsLocationsEndpointsOperationsGetCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.operations.get" call. +// Do executes the "aiplatform.projects.locations.featureGroups.operations.get" call. // 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 *ProjectsLocationsEndpointsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53244,7 +56574,7 @@ func (c *ProjectsLocationsEndpointsOperationsGetCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsEndpointsOperationsListCall struct { +type ProjectsLocationsFeatureGroupsOperationsListWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53253,32 +56583,32 @@ type ProjectsLocationsEndpointsOperationsListCall 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`. +// ListWait: 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 *ProjectsLocationsEndpointsOperationsService) List(name string) *ProjectsLocationsEndpointsOperationsListCall { - c := &ProjectsLocationsEndpointsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeatureGroupsOperationsService) ListWait(name string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { + c := &ProjectsLocationsFeatureGroupsOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsEndpointsOperationsListCall) Filter(filter string) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsEndpointsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsEndpointsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -53286,7 +56616,7 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) PageToken(pageToken strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -53294,27 +56624,27 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) Fields(s ...googleapi.Fie // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsEndpointsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsListCall { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -53322,7 +56652,7 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) doRequest(alt string) (*h 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/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -53335,13 +56665,13 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.operations.list" call. +// Do executes the "aiplatform.projects.locations.featureGroups.operations.listWait" call. // 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 *ProjectsLocationsEndpointsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53376,7 +56706,7 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) Do(opts ...googleapi.Call // 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 *ProjectsLocationsEndpointsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -53394,7 +56724,7 @@ func (c *ProjectsLocationsEndpointsOperationsListCall) Pages(ctx context.Context } } -type ProjectsLocationsEndpointsOperationsWaitCall struct { +type ProjectsLocationsFeatureGroupsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53413,8 +56743,8 @@ type ProjectsLocationsEndpointsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsEndpointsOperationsService) Wait(name string) *ProjectsLocationsEndpointsOperationsWaitCall { - c := &ProjectsLocationsEndpointsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeatureGroupsOperationsService) Wait(name string) *ProjectsLocationsFeatureGroupsOperationsWaitCall { + c := &ProjectsLocationsFeatureGroupsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -53423,7 +56753,7 @@ func (r *ProjectsLocationsEndpointsOperationsService) Wait(name string) *Project // before timing out. If left blank, the wait will be at most the time // permitted by the underlying HTTP/RPC protocol. If RPC context deadline is // also specified, the shorter one will be used. -func (c *ProjectsLocationsEndpointsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsEndpointsOperationsWaitCall { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureGroupsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -53431,27 +56761,27 @@ func (c *ProjectsLocationsEndpointsOperationsWaitCall) Timeout(timeout string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsEndpointsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsEndpointsOperationsWaitCall { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsEndpointsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsEndpointsOperationsWaitCall { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsEndpointsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsEndpointsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -53469,13 +56799,13 @@ func (c *ProjectsLocationsEndpointsOperationsWaitCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.endpoints.operations.wait" call. +// Do executes the "aiplatform.projects.locations.featureGroups.operations.wait" call. // 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 *ProjectsLocationsEndpointsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53507,69 +56837,70 @@ func (c *ProjectsLocationsEndpointsOperationsWaitCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsFeatureGroupsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new FeatureGroup in a given project and location. +// Create: Creates a new FeatureOnlineStore in a given project and location. // -// - parent: The resource name of the Location to create FeatureGroups. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeatureGroupsService) Create(parent string, googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup) *ProjectsLocationsFeatureGroupsCreateCall { - c := &ProjectsLocationsFeatureGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to create FeatureOnlineStores. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeatureOnlineStoresService) Create(parent string, googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore) *ProjectsLocationsFeatureOnlineStoresCreateCall { + c := &ProjectsLocationsFeatureOnlineStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1featuregroup = googlecloudaiplatformv1featuregroup + c.googlecloudaiplatformv1featureonlinestore = googlecloudaiplatformv1featureonlinestore return c } -// FeatureGroupId sets the optional parameter "featureGroupId": Required. The -// ID to use for this FeatureGroup, which will become the final component of -// the FeatureGroup's resource name. This value may be up to 128 characters, -// and valid characters are `[a-z0-9_]`. The first character cannot be a -// number. The value must be unique within the project and location. -func (c *ProjectsLocationsFeatureGroupsCreateCall) FeatureGroupId(featureGroupId string) *ProjectsLocationsFeatureGroupsCreateCall { - c.urlParams_.Set("featureGroupId", featureGroupId) +// FeatureOnlineStoreId sets the optional parameter "featureOnlineStoreId": +// Required. The ID to use for this FeatureOnlineStore, which will become the +// final component of the FeatureOnlineStore's resource name. This value may be +// up to 60 characters, and valid characters are `[a-z0-9_]`. The first +// character cannot be a number. The value must be unique within the project +// and location. +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) FeatureOnlineStoreId(featureOnlineStoreId string) *ProjectsLocationsFeatureOnlineStoresCreateCall { + c.urlParams_.Set("featureOnlineStoreId", featureOnlineStoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featuregroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureonlinestore) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureOnlineStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -53582,13 +56913,13 @@ func (c *ProjectsLocationsFeatureGroupsCreateCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.create" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.create" call. // 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 *ProjectsLocationsFeatureGroupsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53620,7 +56951,7 @@ func (c *ProjectsLocationsFeatureGroupsCreateCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsFeatureGroupsDeleteCall struct { +type ProjectsLocationsFeatureOnlineStoresDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53628,20 +56959,22 @@ type ProjectsLocationsFeatureGroupsDeleteCall struct { header_ http.Header } -// Delete: Deletes a single FeatureGroup. +// Delete: Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not +// contain any FeatureViews. // -// - name: The name of the FeatureGroup to be deleted. Format: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeatureGroupsService) Delete(name string) *ProjectsLocationsFeatureGroupsDeleteCall { - c := &ProjectsLocationsFeatureGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the FeatureOnlineStore to be deleted. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}`. +func (r *ProjectsLocationsFeatureOnlineStoresService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresDeleteCall { + c := &ProjectsLocationsFeatureOnlineStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": If set to true, any Features -// under this FeatureGroup will also be deleted. (Otherwise, the request will -// only work if the FeatureGroup has no Features.) -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Force(force bool) *ProjectsLocationsFeatureGroupsDeleteCall { +// Force sets the optional parameter "force": If set to true, any FeatureViews +// and Features for this FeatureOnlineStore will also be deleted. (Otherwise, +// the request will only work if the FeatureOnlineStore has no FeatureViews.) +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Force(force bool) *ProjectsLocationsFeatureOnlineStoresDeleteCall { c.urlParams_.Set("force", fmt.Sprint(force)) return c } @@ -53649,27 +56982,27 @@ func (c *ProjectsLocationsFeatureGroupsDeleteCall) Force(force bool) *ProjectsLo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -53687,13 +57020,13 @@ func (c *ProjectsLocationsFeatureGroupsDeleteCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.delete" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.delete" call. // 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 *ProjectsLocationsFeatureGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53725,7 +57058,7 @@ func (c *ProjectsLocationsFeatureGroupsDeleteCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsFeatureGroupsGetCall struct { +type ProjectsLocationsFeatureOnlineStoresGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -53734,11 +57067,11 @@ type ProjectsLocationsFeatureGroupsGetCall struct { header_ http.Header } -// Get: Gets details of a single FeatureGroup. +// Get: Gets details of a single FeatureOnlineStore. // -// - name: The name of the FeatureGroup resource. -func (r *ProjectsLocationsFeatureGroupsService) Get(name string) *ProjectsLocationsFeatureGroupsGetCall { - c := &ProjectsLocationsFeatureGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the FeatureOnlineStore resource. +func (r *ProjectsLocationsFeatureOnlineStoresService) Get(name string) *ProjectsLocationsFeatureOnlineStoresGetCall { + c := &ProjectsLocationsFeatureOnlineStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -53746,7 +57079,7 @@ func (r *ProjectsLocationsFeatureGroupsService) Get(name string) *ProjectsLocati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -53754,27 +57087,27 @@ func (c *ProjectsLocationsFeatureGroupsGetCall) Fields(s ...googleapi.Field) *Pr // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -53795,13 +57128,13 @@ func (c *ProjectsLocationsFeatureGroupsGetCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.get" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FeatureGroup.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1FeatureOnlineStore.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureGroupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureGroup, error) { +func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureOnlineStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53820,7 +57153,7 @@ func (c *ProjectsLocationsFeatureGroupsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FeatureGroup{ + ret := &GoogleCloudAiplatformV1FeatureOnlineStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -53833,7 +57166,123 @@ func (c *ProjectsLocationsFeatureGroupsGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsFeatureGroupsListCall struct { +type ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall struct { + s *Service + resource string + 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. +// +// - 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 *ProjectsLocationsFeatureOnlineStoresService) GetIamPolicy(resource string) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { + c := &ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall{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 *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { + 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 +// details. +func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.featureOnlineStores.getIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsFeatureOnlineStoresListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -53842,26 +57291,26 @@ type ProjectsLocationsFeatureGroupsListCall struct { header_ http.Header } -// List: Lists FeatureGroups in a given project and location. +// List: Lists FeatureOnlineStores in a given project and location. // -// - parent: The resource name of the Location to list FeatureGroups. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeatureGroupsService) List(parent string) *ProjectsLocationsFeatureGroupsListCall { - c := &ProjectsLocationsFeatureGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to list FeatureOnlineStores. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeatureOnlineStoresService) List(parent string) *ProjectsLocationsFeatureOnlineStoresListCall { + c := &ProjectsLocationsFeatureOnlineStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Lists the FeatureGroups that -// match the filter expression. The following fields are supported: * +// Filter sets the optional parameter "filter": Lists the FeatureOnlineStores +// that match the filter expression. The following fields are supported: * // `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. // Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, // `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 format. * // `labels`: Supports key-value equality and key presence. Examples: * -// `create_time > "2020-01-01" OR update_time > "2020-01-01" FeatureGroups -// created or updated after 2020-01-01. * `labels.env = "prod" FeatureGroups -// with label "env" set to "prod". -func (c *ProjectsLocationsFeatureGroupsListCall) Filter(filter string) *ProjectsLocationsFeatureGroupsListCall { +// `create_time > "2020-01-01" OR update_time > "2020-01-01" +// FeatureOnlineStores created or updated after 2020-01-01. * `labels.env = +// "prod" FeatureOnlineStores with label "env" set to "prod". +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresListCall { c.urlParams_.Set("filter", filter) return c } @@ -53869,26 +57318,27 @@ func (c *ProjectsLocationsFeatureGroupsListCall) Filter(filter string) *Projects // 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: * `create_time` * `update_time` -func (c *ProjectsLocationsFeatureGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureGroupsListCall { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// FeatureGroups to return. The service may return fewer than this value. If -// unspecified, at most 100 FeatureGroups will be returned. The maximum value -// is 100; any value greater than 100 will be coerced to 100. -func (c *ProjectsLocationsFeatureGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsListCall { +// FeatureOnlineStores to return. The service may return fewer than this value. +// If unspecified, at most 100 FeatureOnlineStores will be returned. The +// maximum value is 100; any value greater than 100 will be coerced to 100. +func (c *ProjectsLocationsFeatureOnlineStoresListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeatureRegistryService.ListFeatureGroups call. Provide this -// to retrieve the subsequent page. When paginating, all other parameters -// provided to FeatureRegistryService.ListFeatureGroups must match the call +// from a previous FeatureOnlineStoreAdminService.ListFeatureOnlineStores call. +// Provide this to retrieve the subsequent page. When paginating, all other +// parameters provided to +// FeatureOnlineStoreAdminService.ListFeatureOnlineStores must match the call // that provided the page token. -func (c *ProjectsLocationsFeatureGroupsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsListCall { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -53896,7 +57346,7 @@ func (c *ProjectsLocationsFeatureGroupsListCall) PageToken(pageToken string) *Pr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsListCall { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -53904,27 +57354,27 @@ func (c *ProjectsLocationsFeatureGroupsListCall) Fields(s ...googleapi.Field) *P // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsListCall { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsListCall { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsListCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -53932,7 +57382,7 @@ func (c *ProjectsLocationsFeatureGroupsListCall) 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}/featureGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureOnlineStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -53945,13 +57395,15 @@ func (c *ProjectsLocationsFeatureGroupsListCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.list" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeatureGroupsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse.ServerResponse.Header +// +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureGroupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureGroupsResponse, error) { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53970,7 +57422,7 @@ func (c *ProjectsLocationsFeatureGroupsListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeatureGroupsResponse{ + ret := &GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -53986,7 +57438,7 @@ func (c *ProjectsLocationsFeatureGroupsListCall) 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 *ProjectsLocationsFeatureGroupsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureGroupsResponse) error) error { +func (c *ProjectsLocationsFeatureOnlineStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -54004,35 +57456,37 @@ func (c *ProjectsLocationsFeatureGroupsListCall) Pages(ctx context.Context, f fu } } -type ProjectsLocationsFeatureGroupsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresPatchCall struct { + s *Service + name string + googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single FeatureGroup. +// Patch: Updates the parameters of a single FeatureOnlineStore. // -// - name: Identifier. Name of the FeatureGroup. Format: -// `projects/{project}/locations/{location}/featureGroups/{featureGroup}`. -func (r *ProjectsLocationsFeatureGroupsService) Patch(name string, googlecloudaiplatformv1featuregroup *GoogleCloudAiplatformV1FeatureGroup) *ProjectsLocationsFeatureGroupsPatchCall { - c := &ProjectsLocationsFeatureGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Identifier. Name of the FeatureOnlineStore. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline +// Store}`. +func (r *ProjectsLocationsFeatureOnlineStoresService) Patch(name string, googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore) *ProjectsLocationsFeatureOnlineStoresPatchCall { + c := &ProjectsLocationsFeatureOnlineStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1featuregroup = googlecloudaiplatformv1featuregroup + c.googlecloudaiplatformv1featureonlinestore = googlecloudaiplatformv1featureonlinestore return c } // UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the FeatureGroup resource by the -// update. The fields specified in the update_mask are relative to the +// specify the fields to be overwritten in the FeatureOnlineStore 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 only the non-empty fields // present in the request will be overwritten. Set the update_mask to `*` to // override all fields. Updatable fields: * `labels` * `description` * -// `big_query` * `big_query.entity_id_columns` -func (c *ProjectsLocationsFeatureGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureGroupsPatchCall { +// `bigtable` * `bigtable.auto_scaling` * +// `bigtable.enable_multi_region_replica` +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureOnlineStoresPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -54040,30 +57494,30 @@ func (c *ProjectsLocationsFeatureGroupsPatchCall) UpdateMask(updateMask string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featuregroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureonlinestore) if err != nil { return nil, err } @@ -54082,13 +57536,13 @@ func (c *ProjectsLocationsFeatureGroupsPatchCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.patch" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.patch" call. // 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 *ProjectsLocationsFeatureGroupsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54120,62 +57574,174 @@ func (c *ProjectsLocationsFeatureGroupsPatchCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + 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 *ProjectsLocationsFeatureOnlineStoresService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { + c := &ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.featureOnlineStores.setIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates a batch of Features in a given FeatureGroup. +// 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. // -// - parent: The resource name of the EntityType/FeatureGroup to create the -// batch of Features under. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) BatchCreate(parent string, googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { - c := &ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchcreatefeaturesrequest = googlecloudaiplatformv1batchcreatefeaturesrequest +// - 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 *ProjectsLocationsFeatureOnlineStoresService) TestIamPermissions(resource string) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { + c := &ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// Permissions sets the optional parameter "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). +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcreatefeaturesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -54183,18 +57749,18 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.batchCreate" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.testIamPermissions" call. // 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 +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54213,7 +57779,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54226,72 +57792,79 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesBatchCreateCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Feature in a given FeatureGroup. +// Create: Creates a new FeatureView in a given FeatureOnlineStore. // -// - parent: The resource name of the EntityType or FeatureGroup to create a -// Feature. Format for entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) Create(parent string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { - c := &ProjectsLocationsFeatureGroupsFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the FeatureOnlineStore to create +// FeatureViews. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Create(parent string, googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature + c.googlecloudaiplatformv1featureview = googlecloudaiplatformv1featureview return c } -// FeatureId sets the optional parameter "featureId": Required. The ID to use -// for the Feature, which will become the final component of the Feature's -// resource name. This value may be up to 128 characters, and valid characters -// are `[a-z0-9_]`. The first character cannot be a number. The value must be -// unique within an EntityType/FeatureGroup. -func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { - c.urlParams_.Set("featureId", featureId) +// FeatureViewId sets the optional parameter "featureViewId": Required. The ID +// to use for the FeatureView, which will become the final component of the +// FeatureView's resource name. This value may be up to 60 characters, and +// valid characters are `[a-z0-9_]`. The first character cannot be a number. +// The value must be unique within a FeatureOnlineStore. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) FeatureViewId(featureViewId string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { + c.urlParams_.Set("featureViewId", featureViewId) + return c +} + +// RunSyncImmediately sets the optional parameter "runSyncImmediately": +// Immutable. If set to true, one on demand sync will be run immediately, +// regardless whether the FeatureView.sync_config is configured or not. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) RunSyncImmediately(runSyncImmediately bool) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { + c.urlParams_.Set("runSyncImmediately", fmt.Sprint(runSyncImmediately)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureview) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureViews") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -54304,13 +57877,13 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.create" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.create" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54342,7 +57915,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesCreateCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesDeleteCall struct { +type ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -54350,15 +57923,13 @@ type ProjectsLocationsFeatureGroupsFeaturesDeleteCall struct { header_ http.Header } -// Delete: Deletes a single Feature. +// Delete: Deletes a single FeatureView. // -// - name: The name of the Features to be deleted. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}/features/{feature}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat -// ures/{feature}`. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) Delete(name string) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { - c := &ProjectsLocationsFeatureGroupsFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the FeatureView to be deleted. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -54366,27 +57937,27 @@ func (r *ProjectsLocationsFeatureGroupsFeaturesService) Delete(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -54404,13 +57975,13 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.delete" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.delete" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54442,86 +58013,79 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesDeleteCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall struct { + s *Service + featureView string + googlecloudaiplatformv1fetchfeaturevaluesrequest *GoogleCloudAiplatformV1FetchFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single Feature. +// FetchFeatureValues: Fetch feature values under a FeatureView. // -// - name: The name of the Feature resource. Format for entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) Get(name string) *ProjectsLocationsFeatureGroupsFeaturesGetCall { - c := &ProjectsLocationsFeatureGroupsFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - featureView: FeatureView resource format +// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline +// Store}/featureViews/{featureView}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) FetchFeatureValues(featureView string, googlecloudaiplatformv1fetchfeaturevaluesrequest *GoogleCloudAiplatformV1FetchFeatureValuesRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.featureView = featureView + c.googlecloudaiplatformv1fetchfeaturevaluesrequest = googlecloudaiplatformv1fetchfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchfeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:fetchFeatureValues") 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, + "featureView": c.featureView, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.get" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.fetchFeatureValues" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Feature.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1FetchFeatureValuesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FetchFeatureValuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54540,7 +58104,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Feature{ + ret := &GoogleCloudAiplatformV1FetchFeatureValuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54553,95 +58117,30 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesListCall struct { +type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists Features in a given FeatureGroup. +// Get: Gets details of a single FeatureView. // -// - parent: The resource name of the Location to list Features. Format for -// entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) List(parent string) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c := &ProjectsLocationsFeatureGroupsFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Lists the Features that match -// the filter expression. The following filters are supported: * `value_type`: -// Supports = and != comparisons. * `create_time`: Supports =, !=, <, >, >=, -// and <= comparisons. Values must be in RFC 3339 format. * `update_time`: -// Supports =, !=, <, >, >=, and <= comparisons. Values must be in RFC 3339 -// format. * `labels`: Supports key-value equality as well as key presence. -// Examples: * `value_type = DOUBLE` --> Features whose type is DOUBLE. * -// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > -// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after -// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` -// --> Features having both (active: yes) and (env: prod) labels. * -// `labels.env: *` --> Any Feature which has a label with 'env' as the key. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Filter(filter string) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// LatestStatsCount sets the optional parameter "latestStatsCount": Only -// applicable for Vertex AI Feature Store (Legacy). If set, return the most -// recent ListFeaturesRequest.latest_stats_count of stats for each Feature in -// response. Valid value is [0, 10]. If number of stats exists < -// ListFeaturesRequest.latest_stats_count, return all existing stats. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) LatestStatsCount(latestStatsCount int64) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("latestStatsCount", fmt.Sprint(latestStatsCount)) - 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: * `feature_id` * `value_type` (Not -// supported for FeatureRegistry Feature) * `create_time` * `update_time` -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// Features to return. The service may return fewer than this value. If -// unspecified, at most 1000 Features will be returned. The maximum value is -// 1000; any value greater than 1000 will be coerced to 1000. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeaturestoreService.ListFeatures call or -// FeatureRegistryService.ListFeatures call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must -// match the call that provided the page token. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) ReadMask(readMask string) *ProjectsLocationsFeatureGroupsFeaturesListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the FeatureView resource. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesListCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -54649,27 +58148,27 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Fields(s ...googleapi.F // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesListCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesListCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -54677,7 +58176,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) 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/{+parent}/features") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -54685,18 +58184,18 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) doRequest(alt string) ( } 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 "aiplatform.projects.locations.featureGroups.features.list" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeaturesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1FeatureView.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturesResponse, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureView, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54715,7 +58214,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeaturesResponse{ + ret := &GoogleCloudAiplatformV1FeatureView{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54728,119 +58227,91 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Do(opts ...googleapi.Ca return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsFeatureGroupsFeaturesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsFeatureGroupsFeaturesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single Feature. +// 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: Immutable. Name of the Feature. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}/features/{feature}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat -// ures/{feature}` The last part feature is assigned by the client. The -// feature can be up to 64 characters long and can consist only of ASCII -// Latin letters A-Z and a-z, underscore(_), and ASCII digits 0-9 starting -// with a letter. The value will be unique given an entity type. -func (r *ProjectsLocationsFeatureGroupsFeaturesService) Patch(name string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { - c := &ProjectsLocationsFeatureGroupsFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature +// - 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) GetIamPolicy(resource string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Features 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 only the non-empty fields present in the -// request will be overwritten. Set the update_mask to `*` to override all -// fields. Updatable fields: * `description` * `labels` * `disable_monitoring` -// (Not supported for FeatureRegistryService Feature) * `point_of_contact` (Not -// supported for FeaturestoreService FeatureStore) -func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 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, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.patch" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.getIamPolicy" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54859,7 +58330,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54872,74 +58343,130 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesPatchCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists FeatureViews in a given FeatureOnlineStore. +// +// - parent: The resource name of the FeatureOnlineStore to list FeatureViews. +// Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) List(parent string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the FeatureViews that +// match the filter expression. The following filters are supported: * +// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. +// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, +// `>`, `>=`, and `<=` comparisons. Values must be in RFC 3339 format. * +// `labels`: Supports key-value equality as well as key presence. Examples: * +// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > +// \"2020-01-31T15:30:00.000000Z\" --> FeatureViews created or updated after +// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` +// --> FeatureViews having both (active: yes) and (env: prod) labels. * +// `labels.env: *` --> Any FeatureView which has a label with 'env' as the key. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + 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: * `feature_view_id` * `create_time` * +// `update_time` +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// FeatureViews to return. The service may return fewer than this value. If +// unspecified, at most 1000 FeatureViews will be returned. The maximum value +// is 1000; any value greater than 1000 will be coerced to 1000. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c } -// 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 *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Delete(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { - c := &ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeatureOnlineStoreAdminService.ListFeatureViews call. +// Provide this to retrieve the subsequent page. When paginating, all other +// parameters provided to FeatureOnlineStoreAdminService.ListFeatureViews must +// match the call that provided the page token. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureViews") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.delete" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.list" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListFeatureViewsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureViewsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54958,7 +58485,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListFeatureViewsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54971,68 +58498,99 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsDeleteCall) Do(opts ... return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureViewsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// 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. +type ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single FeatureView. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Get(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { - c := &ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Identifier. Name of the FeatureView. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Patch(name string, googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1featureview = googlecloudaiplatformv1featureview + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the FeatureView 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 only the non-empty fields +// present in the request will be overwritten. Set the update_mask to `*` to +// override all fields. Updatable fields: * `labels` * `service_agent_type` * +// `big_query_source` * `big_query_source.uri` * +// `big_query_source.entity_id_columns` * `feature_registry_source` * +// `feature_registry_source.feature_groups` * `sync_config` * +// `sync_config.cron` * `optimized_config.automatic_resources` +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureview) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -55043,13 +58601,13 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.get" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.patch" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55081,104 +58639,81 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall struct { + s *Service + featureView string + googlecloudaiplatformv1searchnearestentitiesrequest *GoogleCloudAiplatformV1SearchNearestEntitiesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListWait: Lists operations that match the specified filter in the request. -// If the server doesn't support this method, it returns `UNIMPLEMENTED`. +// SearchNearestEntities: Search the nearest entities under a FeatureView. +// Search only works for indexable feature view; if a feature view isn't +// indexable, returns Invalid argument response. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) ListWait(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { - c := &ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { - c.urlParams_.Set("pageToken", pageToken) +// - featureView: FeatureView resource format +// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline +// Store}/featureViews/{featureView}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) SearchNearestEntities(featureView string, googlecloudaiplatformv1searchnearestentitiesrequest *GoogleCloudAiplatformV1SearchNearestEntitiesRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.featureView = featureView + c.googlecloudaiplatformv1searchnearestentitiesrequest = googlecloudaiplatformv1searchnearestentitiesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchnearestentitiesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:searchNearestEntities") 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, + "featureView": c.featureView, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.features.operations.listWait" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.searchNearestEntities" call. // 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 +// *GoogleCloudAiplatformV1SearchNearestEntitiesResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchNearestEntitiesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55197,7 +58732,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Do(opts . if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1SearchNearestEntitiesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55210,90 +58745,62 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Do(opts . return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeatureGroupsFeaturesOperationsService) Wait(name string) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { - c := &ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -55301,18 +58808,18 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) doRequest(alt } 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 "aiplatform.projects.locations.featureGroups.features.operations.wait" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.setIamPolicy" call. // 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 *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55331,7 +58838,7 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55344,74 +58851,79 @@ func (c *ProjectsLocationsFeatureGroupsFeaturesOperationsWaitCall) Do(opts ...go return ret, nil } -type ProjectsLocationsFeatureGroupsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall struct { + s *Service + featureView string + googlecloudaiplatformv1syncfeatureviewrequest *GoogleCloudAiplatformV1SyncFeatureViewRequest + 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`. +// Sync: Triggers on-demand sync for the FeatureView. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeatureGroupsOperationsService) Delete(name string) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { - c := &ProjectsLocationsFeatureGroupsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - featureView: Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Sync(featureView string, googlecloudaiplatformv1syncfeatureviewrequest *GoogleCloudAiplatformV1SyncFeatureViewRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.featureView = featureView + c.googlecloudaiplatformv1syncfeatureviewrequest = googlecloudaiplatformv1syncfeatureviewrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1syncfeatureviewrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:sync") 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, + "featureView": c.featureView, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.operations.delete" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.sync" call. // 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 *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1SyncFeatureViewResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SyncFeatureViewResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55430,7 +58942,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1SyncFeatureViewResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55443,85 +58955,87 @@ func (c *ProjectsLocationsFeatureGroupsOperationsDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsFeatureGroupsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall struct { + s *Service + resource 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. +// 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 name of the operation resource. -func (r *ProjectsLocationsFeatureGroupsOperationsService) Get(name string) *ProjectsLocationsFeatureGroupsOperationsGetCall { - c := &ProjectsLocationsFeatureGroupsOperationsGetCall{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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) TestIamPermissions(resource string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// Permissions sets the optional parameter "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). +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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 "aiplatform.projects.locations.featureGroups.operations.get" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.testIamPermissions" call. // 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 +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55540,7 +59054,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55553,7 +59067,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsFeatureGroupsOperationsListWaitCall struct { +type ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -55562,40 +59076,21 @@ type ProjectsLocationsFeatureGroupsOperationsListWaitCall struct { header_ http.Header } -// ListWait: Lists operations that match the specified filter in the request. -// If the server doesn't support this method, it returns `UNIMPLEMENTED`. +// Get: Gets details of a single FeatureViewSync. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsFeatureGroupsOperationsService) ListWait(name string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { - c := &ProjectsLocationsFeatureGroupsOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { - c.urlParams_.Set("pageToken", pageToken) +// - name: The name of the FeatureViewSync resource. Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -55603,27 +59098,27 @@ func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsListWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -55631,7 +59126,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) doRequest(alt str var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -55644,13 +59139,13 @@ func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.operations.listWait" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.featureViewSyncs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1FeatureViewSync.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureViewSync, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55669,7 +59164,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1FeatureViewSync{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55682,109 +59177,124 @@ func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Do(opts ...google return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsFeatureGroupsOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +type ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -type ProjectsLocationsFeatureGroupsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// List: Lists FeatureViewSyncs in a given FeatureView. +// +// - parent: The resource name of the FeatureView to list FeatureViewSyncs. +// Format: +// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin +// e_store}/featureViews/{feature_view}`. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsService) List(parent string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. -// -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeatureGroupsOperationsService) Wait(name string) *ProjectsLocationsFeatureGroupsOperationsWaitCall { - c := &ProjectsLocationsFeatureGroupsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// Filter sets the optional parameter "filter": Lists the FeatureViewSyncs that +// match the filter expression. The following filters are supported: * +// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. +// Values must be in RFC 3339 format. Examples: * `create_time > +// \"2020-01-31T15:30:00.000000Z\" --> FeatureViewSyncs created after +// 2020-01-31T15:30:00.000000Z. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + c.urlParams_.Set("filter", filter) return c } -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureGroupsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// 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: * `create_time` +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// FeatureViewSyncs to return. The service may return fewer than this value. If +// unspecified, at most 1000 FeatureViewSyncs will be returned. The maximum +// value is 1000; any value greater than 1000 will be coerced to 1000. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeatureOnlineStoreAdminService.ListFeatureViewSyncs call. +// Provide this to retrieve the subsequent page. When paginating, all other +// parameters provided to FeatureOnlineStoreAdminService.ListFeatureViewSyncs +// must match the call that provided the page token. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureGroupsOperationsWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureGroupsOperationsWaitCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureViewSyncs") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureGroups.operations.wait" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.featureViewSyncs.list" call. // 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 +// *GoogleCloudAiplatformV1ListFeatureViewSyncsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureViewSyncsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55803,7 +59313,7 @@ func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListFeatureViewSyncsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55816,89 +59326,95 @@ func (c *ProjectsLocationsFeatureGroupsOperationsWaitCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsFeatureOnlineStoresCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore - 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureViewSyncsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Create: Creates a new FeatureOnlineStore in a given project and location. -// -// - parent: The resource name of the Location to create FeatureOnlineStores. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeatureOnlineStoresService) Create(parent string, googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore) *ProjectsLocationsFeatureOnlineStoresCreateCall { - c := &ProjectsLocationsFeatureOnlineStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1featureonlinestore = googlecloudaiplatformv1featureonlinestore - return c +type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FeatureOnlineStoreId sets the optional parameter "featureOnlineStoreId": -// Required. The ID to use for this FeatureOnlineStore, which will become the -// final component of the FeatureOnlineStore's resource name. This value may be -// up to 60 characters, and valid characters are `[a-z0-9_]`. The first -// character cannot be a number. The value must be unique within the project -// and location. -func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) FeatureOnlineStoreId(featureOnlineStoreId string) *ProjectsLocationsFeatureOnlineStoresCreateCall { - c.urlParams_.Set("featureOnlineStoreId", featureOnlineStoreId) +// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresCreateCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureonlinestore) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureOnlineStores") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.create" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.delete" call. // 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 *ProjectsLocationsFeatureOnlineStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55917,7 +59433,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Do(opts ...googleapi.Ca 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, @@ -55930,65 +59446,68 @@ func (c *ProjectsLocationsFeatureOnlineStoresCreateCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsFeatureOnlineStoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single FeatureOnlineStore. The FeatureOnlineStore must not -// contain any FeatureViews. +// 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 FeatureOnlineStore to be deleted. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}`. -func (r *ProjectsLocationsFeatureOnlineStoresService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresDeleteCall { - c := &ProjectsLocationsFeatureOnlineStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": If set to true, any FeatureViews -// and Features for this FeatureOnlineStore will also be deleted. (Otherwise, -// the request will only work if the FeatureOnlineStore has no FeatureViews.) -func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Force(force bool) *ProjectsLocationsFeatureOnlineStoresDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresDeleteCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -55999,13 +59518,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.delete" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.get" call. // 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 *ProjectsLocationsFeatureOnlineStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56037,7 +59556,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresDeleteCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsFeatureOnlineStoresGetCall struct { +type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -56046,19 +59565,40 @@ type ProjectsLocationsFeatureOnlineStoresGetCall struct { header_ http.Header } -// Get: Gets details of a single FeatureOnlineStore. +// ListWait: 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 FeatureOnlineStore resource. -func (r *ProjectsLocationsFeatureOnlineStoresService) Get(name string) *ProjectsLocationsFeatureOnlineStoresGetCall { - c := &ProjectsLocationsFeatureOnlineStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) ListWait(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -56066,27 +59606,27 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Fields(s ...googleapi.Fiel // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureOnlineStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresGetCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -56094,7 +59634,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetCall) doRequest(alt string) (*ht var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -56107,13 +59647,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.get" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.listWait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FeatureOnlineStore.ServerResponse.Header or (if a +// *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 *ProjectsLocationsFeatureOnlineStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureOnlineStore, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56132,7 +59672,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FeatureOnlineStore{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56145,72 +59685,90 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall struct { +// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall struct { s *Service - resource string + name string 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. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - 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 *ProjectsLocationsFeatureOnlineStoresService) GetIamPolicy(resource string) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { - c := &ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Wait(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { + c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name 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 *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -56218,171 +59776,117 @@ func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) doRequest(alt str } 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 "aiplatform.projects.locations.featureOnlineStores.getIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsFeatureOnlineStoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 := &GoogleIamV1Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsFeatureOnlineStoresListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists FeatureOnlineStores in a given project and location. -// -// - parent: The resource name of the Location to list FeatureOnlineStores. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeatureOnlineStoresService) List(parent string) *ProjectsLocationsFeatureOnlineStoresListCall { - c := &ProjectsLocationsFeatureOnlineStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Lists the FeatureOnlineStores -// that match the filter expression. The following fields are supported: * -// `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. -// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, -// `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 format. * -// `labels`: Supports key-value equality and key presence. Examples: * -// `create_time > "2020-01-01" OR update_time > "2020-01-01" -// FeatureOnlineStores created or updated after 2020-01-01. * `labels.env = -// "prod" FeatureOnlineStores with label "env" set to "prod". -func (c *ProjectsLocationsFeatureOnlineStoresListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresListCall { - 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: * `create_time` * `update_time` -func (c *ProjectsLocationsFeatureOnlineStoresListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresListCall { - c.urlParams_.Set("orderBy", orderBy) - return c + +// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.wait" call. +// 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) 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 } -// PageSize sets the optional parameter "pageSize": The maximum number of -// FeatureOnlineStores to return. The service may return fewer than this value. -// If unspecified, at most 100 FeatureOnlineStores will be returned. The -// maximum value is 100; any value greater than 100 will be coerced to 100. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeatureOnlineStoreAdminService.ListFeatureOnlineStores call. -// Provide this to retrieve the subsequent page. When paginating, all other -// parameters provided to -// FeatureOnlineStoreAdminService.ListFeatureOnlineStores must match the call -// that provided the page token. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresListCall { - c.urlParams_.Set("pageToken", pageToken) +// 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 *ProjectsLocationsFeatureOnlineStoresOperationsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { + c := &ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresListCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresListCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureOnlineStores") + 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 "aiplatform.projects.locations.featureOnlineStores.list" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse.ServerResponse.Header -// -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse, error) { +// *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 *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56401,7 +59905,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56414,97 +59918,68 @@ func (c *ProjectsLocationsFeatureOnlineStoresListCall) Do(opts ...googleapi.Call return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsFeatureOnlineStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureOnlineStoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsFeatureOnlineStoresPatchCall struct { - s *Service - name string - googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single FeatureOnlineStore. +// 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: Identifier. Name of the FeatureOnlineStore. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline -// Store}`. -func (r *ProjectsLocationsFeatureOnlineStoresService) Patch(name string, googlecloudaiplatformv1featureonlinestore *GoogleCloudAiplatformV1FeatureOnlineStore) *ProjectsLocationsFeatureOnlineStoresPatchCall { - c := &ProjectsLocationsFeatureOnlineStoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { + c := &ProjectsLocationsFeatureOnlineStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1featureonlinestore = googlecloudaiplatformv1featureonlinestore - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the FeatureOnlineStore 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 only the non-empty fields -// present in the request will be overwritten. Set the update_mask to `*` to -// override all fields. Updatable fields: * `labels` * `description` * -// `bigtable` * `bigtable.auto_scaling` * -// `bigtable.enable_multi_region_replica` -func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureOnlineStoresPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresPatchCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureonlinestore) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -56515,13 +59990,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.patch" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.get" call. // 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 *ProjectsLocationsFeatureOnlineStoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56553,81 +60028,104 @@ func (c *ProjectsLocationsFeatureOnlineStoresPatchCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall struct { + s *Service + name 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. +// ListWait: Lists operations that match the specified filter in the request. +// If the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - 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 *ProjectsLocationsFeatureOnlineStoresService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { - c := &ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) ListWait(name string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { + c := &ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") 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 "aiplatform.projects.locations.featureOnlineStores.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.listWait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, 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 *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56646,7 +60144,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56659,68 +60157,90 @@ func (c *ProjectsLocationsFeatureOnlineStoresSetIamPolicyCall) Do(opts ...google return ret, nil } -type ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall struct { +// 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 *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsFeatureOnlineStoresOperationsWaitCall struct { s *Service - resource string + name string 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. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - 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 *ProjectsLocationsFeatureOnlineStoresService) TestIamPermissions(resource string) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { - c := &ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) Wait(name string) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { + c := &ProjectsLocationsFeatureOnlineStoresOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Permissions sets the optional parameter "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). -func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -56728,18 +60248,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) doRequest(a } 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 "aiplatform.projects.locations.featureOnlineStores.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56758,7 +60278,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56771,79 +60291,64 @@ func (c *ProjectsLocationsFeatureOnlineStoresTestIamPermissionsCall) Do(opts ... return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall struct { + s *Service + featurestore string + googlecloudaiplatformv1batchreadfeaturevaluesrequest *GoogleCloudAiplatformV1BatchReadFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new FeatureView in a given FeatureOnlineStore. +// BatchReadFeatureValues: Batch reads Feature values from a Featurestore. This +// API enables batch reading Feature values, where each read instance in the +// batch may read Feature values of entities from one or more EntityTypes. +// Point-in-time correctness is guaranteed for Feature values of each read +// instance as of each instance's read timestamp. // -// - parent: The resource name of the FeatureOnlineStore to create -// FeatureViews. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Create(parent string, googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1featureview = googlecloudaiplatformv1featureview - return c -} - -// FeatureViewId sets the optional parameter "featureViewId": Required. The ID -// to use for the FeatureView, which will become the final component of the -// FeatureView's resource name. This value may be up to 60 characters, and -// valid characters are `[a-z0-9_]`. The first character cannot be a number. -// The value must be unique within a FeatureOnlineStore. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) FeatureViewId(featureViewId string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { - c.urlParams_.Set("featureViewId", featureViewId) - return c -} - -// RunSyncImmediately sets the optional parameter "runSyncImmediately": -// Immutable. If set to true, one on demand sync will be run immediately, -// regardless whether the FeatureView.sync_config is configured or not. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) RunSyncImmediately(runSyncImmediately bool) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { - c.urlParams_.Set("runSyncImmediately", fmt.Sprint(runSyncImmediately)) +// - featurestore: The resource name of the Featurestore from which to query +// Feature values. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}`. +func (r *ProjectsLocationsFeaturestoresService) BatchReadFeatureValues(featurestore string, googlecloudaiplatformv1batchreadfeaturevaluesrequest *GoogleCloudAiplatformV1BatchReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.featurestore = featurestore + c.googlecloudaiplatformv1batchreadfeaturevaluesrequest = googlecloudaiplatformv1batchreadfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { +func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall { +func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureview) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchreadfeaturevaluesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureViews") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featurestore}:batchReadFeatureValues") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -56851,18 +60356,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) doRequest(a } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "featurestore": c.featurestore, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.create" call. +// Do executes the "aiplatform.projects.locations.featurestores.batchReadFeatureValues" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56894,73 +60399,88 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsCreateCall) Do(opts ... return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single FeatureView. +// Create: Creates a new Featurestore in a given project and location. // -// - name: The name of the FeatureView to be deleted. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create Featurestores. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeaturestoresService) Create(parent string, googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore) *ProjectsLocationsFeaturestoresCreateCall { + c := &ProjectsLocationsFeaturestoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1featurestore = googlecloudaiplatformv1featurestore + return c +} + +// FeaturestoreId sets the optional parameter "featurestoreId": Required. The +// ID to use for this Featurestore, which will become the final component of +// the Featurestore's resource name. This value may be up to 60 characters, and +// valid characters are `[a-z0-9_]`. The first character cannot be a number. +// The value must be unique within the project and location. +func (c *ProjectsLocationsFeaturestoresCreateCall) FeaturestoreId(featurestoreId string) *ProjectsLocationsFeaturestoresCreateCall { + c.urlParams_.Set("featurestoreId", featurestoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { +func (c *ProjectsLocationsFeaturestoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall { +func (c *ProjectsLocationsFeaturestoresCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featurestore) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featurestores") 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 "aiplatform.projects.locations.featureOnlineStores.featureViews.delete" call. +// Do executes the "aiplatform.projects.locations.featurestores.create" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56992,79 +60512,81 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsDeleteCall) Do(opts ... return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall struct { - s *Service - featureView string - googlecloudaiplatformv1fetchfeaturevaluesrequest *GoogleCloudAiplatformV1FetchFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FetchFeatureValues: Fetch feature values under a FeatureView. +// Delete: Deletes a single Featurestore. The Featurestore must not contain any +// EntityTypes or `force` must be set to true for the request to succeed. // -// - featureView: FeatureView resource format -// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline -// Store}/featureViews/{featureView}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) FetchFeatureValues(featureView string, googlecloudaiplatformv1fetchfeaturevaluesrequest *GoogleCloudAiplatformV1FetchFeatureValuesRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.featureView = featureView - c.googlecloudaiplatformv1fetchfeaturevaluesrequest = googlecloudaiplatformv1fetchfeaturevaluesrequest +// - name: The name of the Featurestore to be deleted. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}`. +func (r *ProjectsLocationsFeaturestoresService) Delete(name string) *ProjectsLocationsFeaturestoresDeleteCall { + c := &ProjectsLocationsFeaturestoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If set to true, any EntityTypes +// and Features for this Featurestore will also be deleted. (Otherwise, the +// request will only work if the Featurestore has no EntityTypes.) +func (c *ProjectsLocationsFeaturestoresDeleteCall) Force(force bool) *ProjectsLocationsFeaturestoresDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchfeaturevaluesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:fetchFeatureValues") + 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{ - "featureView": c.featureView, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.fetchFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FetchFeatureValuesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FetchFeatureValuesResponse, error) { +func (c *ProjectsLocationsFeaturestoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57083,7 +60605,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FetchFeatureValuesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57096,7 +60618,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFetchFeatureValuesCall) return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall struct { +type ProjectsLocationsFeaturestoresGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -57105,13 +60627,11 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall struct { header_ http.Header } -// Get: Gets details of a single FeatureView. +// Get: Gets details of a single Featurestore. // -// - name: The name of the FeatureView resource. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Featurestore resource. +func (r *ProjectsLocationsFeaturestoresService) Get(name string) *ProjectsLocationsFeaturestoresGetCall { + c := &ProjectsLocationsFeaturestoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -57119,7 +60639,7 @@ func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { +func (c *ProjectsLocationsFeaturestoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -57127,27 +60647,27 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Fields(s ...go // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { +func (c *ProjectsLocationsFeaturestoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall { +func (c *ProjectsLocationsFeaturestoresGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -57168,13 +60688,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FeatureView.ServerResponse.Header or (if a response +// *GoogleCloudAiplatformV1Featurestore.ServerResponse.Header or (if a response // was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureView, error) { +func (c *ProjectsLocationsFeaturestoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Featurestore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57193,7 +60713,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FeatureView{ + ret := &GoogleCloudAiplatformV1Featurestore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57206,7 +60726,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall struct { +type ProjectsLocationsFeaturestoresGetIamPolicyCall struct { s *Service resource string urlParams_ gensupport.URLParams @@ -57220,8 +60740,8 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall struct { // - 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) GetIamPolicy(resource string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeaturestoresService) GetIamPolicy(resource string) *ProjectsLocationsFeaturestoresGetIamPolicyCall { + c := &ProjectsLocationsFeaturestoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource return c } @@ -57238,7 +60758,7 @@ func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) GetIamPolicy(r // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeaturestoresGetIamPolicyCall { c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -57246,27 +60766,27 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Optio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -57284,13 +60804,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.getIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57322,7 +60842,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsGetIamPolicyCall) Do(op return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall struct { +type ProjectsLocationsFeaturestoresListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -57331,66 +60851,70 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall struct { header_ http.Header } -// List: Lists FeatureViews in a given FeatureOnlineStore. +// List: Lists Featurestores in a given project and location. // -// - parent: The resource name of the FeatureOnlineStore to list FeatureViews. -// Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) List(parent string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to list Featurestores. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeaturestoresService) List(parent string) *ProjectsLocationsFeaturestoresListCall { + c := &ProjectsLocationsFeaturestoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Lists the FeatureViews that -// match the filter expression. The following filters are supported: * -// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. +// Filter sets the optional parameter "filter": Lists the featurestores that +// match the filter expression. The following fields are supported: * +// `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. // Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, -// `>`, `>=`, and `<=` comparisons. Values must be in RFC 3339 format. * -// `labels`: Supports key-value equality as well as key presence. Examples: * -// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > -// \"2020-01-31T15:30:00.000000Z\" --> FeatureViews created or updated after -// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` -// --> FeatureViews having both (active: yes) and (env: prod) labels. * -// `labels.env: *` --> Any FeatureView which has a label with 'env' as the key. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +// `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 format. * +// `online_serving_config.fixed_node_count`: Supports `=`, `!=`, `<`, `>`, +// `<=`, and `>=` comparisons. * `labels`: Supports key-value equality and key +// presence. Examples: * `create_time > "2020-01-01" OR update_time > +// "2020-01-01" Featurestores created or updated after 2020-01-01. * +// `labels.env = "prod" Featurestores with label "env" set to "prod". +func (c *ProjectsLocationsFeaturestoresListCall) Filter(filter string) *ProjectsLocationsFeaturestoresListCall { 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: * `feature_view_id` * `create_time` * -// `update_time` -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +// for descending. Supported Fields: * `create_time` * `update_time` * +// `online_serving_config.fixed_node_count` +func (c *ProjectsLocationsFeaturestoresListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// FeatureViews to return. The service may return fewer than this value. If -// unspecified, at most 1000 FeatureViews will be returned. The maximum value -// is 1000; any value greater than 1000 will be coerced to 1000. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +// Featurestores to return. The service may return fewer than this value. If +// unspecified, at most 100 Featurestores will be returned. The maximum value +// is 100; any value greater than 100 will be coerced to 100. +func (c *ProjectsLocationsFeaturestoresListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeatureOnlineStoreAdminService.ListFeatureViews call. -// Provide this to retrieve the subsequent page. When paginating, all other -// parameters provided to FeatureOnlineStoreAdminService.ListFeatureViews must -// match the call that provided the page token. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +// from a previous FeaturestoreService.ListFeaturestores call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters provided +// to FeaturestoreService.ListFeaturestores must match the call that provided +// the page token. +func (c *ProjectsLocationsFeaturestoresListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsFeaturestoresListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +func (c *ProjectsLocationsFeaturestoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -57398,27 +60922,27 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Fields(s ...g // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +func (c *ProjectsLocationsFeaturestoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall { +func (c *ProjectsLocationsFeaturestoresListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -57426,7 +60950,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) 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}/featureViews") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featurestores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -57439,13 +60963,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.list" call. +// Do executes the "aiplatform.projects.locations.featurestores.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeatureViewsResponse.ServerResponse.Header or +// *GoogleCloudAiplatformV1ListFeaturestoresResponse.ServerResponse.Header or // (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureViewsResponse, error) { +func (c *ProjectsLocationsFeaturestoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturestoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57464,7 +60988,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeatureViewsResponse{ + ret := &GoogleCloudAiplatformV1ListFeaturestoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57480,7 +61004,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureViewsResponse) error) error { +func (c *ProjectsLocationsFeaturestoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturestoresResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -57498,39 +61022,36 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsListCall) Pages(ctx con } } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresPatchCall struct { + s *Service + name string + googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single FeatureView. +// Patch: Updates the parameters of a single Featurestore. // -// - name: Identifier. Name of the FeatureView. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Patch(name string, googlecloudaiplatformv1featureview *GoogleCloudAiplatformV1FeatureView) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Name of the Featurestore. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}`. +func (r *ProjectsLocationsFeaturestoresService) Patch(name string, googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore) *ProjectsLocationsFeaturestoresPatchCall { + c := &ProjectsLocationsFeaturestoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1featureview = googlecloudaiplatformv1featureview + c.googlecloudaiplatformv1featurestore = googlecloudaiplatformv1featurestore return c } // UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the FeatureView resource by the +// specify the fields to be overwritten in the Featurestore 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 only the non-empty fields // present in the request will be overwritten. Set the update_mask to `*` to -// override all fields. Updatable fields: * `labels` * `service_agent_type` * -// `big_query_source` * `big_query_source.uri` * -// `big_query_source.entity_id_columns` * `feature_registry_source` * -// `feature_registry_source.feature_groups` * `sync_config` * -// `sync_config.cron` * `optimized_config.automatic_resources` -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { +// override all fields. Updatable fields: * `labels` * +// `online_serving_config.fixed_node_count` * `online_serving_config.scaling` * +// `online_storage_ttl_days` +func (c *ProjectsLocationsFeaturestoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -57538,30 +61059,30 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) UpdateMask(u // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { +func (c *ProjectsLocationsFeaturestoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall { +func (c *ProjectsLocationsFeaturestoresPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featureview) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featurestore) if err != nil { return nil, err } @@ -57580,13 +61101,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.patch" call. +// Do executes the "aiplatform.projects.locations.featurestores.patch" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57618,81 +61139,142 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsPatchCall) Do(opts ...g return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall struct { - s *Service - featureView string - googlecloudaiplatformv1searchnearestentitiesrequest *GoogleCloudAiplatformV1SearchNearestEntitiesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresSearchFeaturesCall struct { + s *Service + location string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SearchNearestEntities: Search the nearest entities under a FeatureView. -// Search only works for indexable feature view; if a feature view isn't -// indexable, returns Invalid argument response. +// SearchFeatures: Searches Features matching a query in a given project. // -// - featureView: FeatureView resource format -// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnline -// Store}/featureViews/{featureView}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) SearchNearestEntities(featureView string, googlecloudaiplatformv1searchnearestentitiesrequest *GoogleCloudAiplatformV1SearchNearestEntitiesRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.featureView = featureView - c.googlecloudaiplatformv1searchnearestentitiesrequest = googlecloudaiplatformv1searchnearestentitiesrequest +// - location: The resource name of the Location to search Features. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsFeaturestoresService) SearchFeatures(location string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { + c := &ProjectsLocationsFeaturestoresSearchFeaturesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.location = location + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// Features to return. The service may return fewer than this value. If +// unspecified, at most 100 Features will be returned. The maximum value is +// 100; any value greater than 100 will be coerced to 100. +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresSearchFeaturesCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeaturestoreService.SearchFeatures call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters provided +// to FeaturestoreService.SearchFeatures, except `page_size`, must match the +// call that provided the page token. +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Query sets the optional parameter "query": Query string that is a +// conjunction of field-restricted queries and/or field-restricted filters. +// Field-restricted queries and filters can be combined using `AND` to form a +// conjunction. A field query is in the form FIELD:QUERY. This implicitly +// checks if QUERY exists as a substring within Feature's FIELD. The QUERY and +// the FIELD are converted to a sequence of words (i.e. tokens) for comparison. +// This is done by: * Removing leading/trailing whitespace and tokenizing the +// search value. Characters that are not one of alphanumeric `[a-zA-Z0-9]`, +// underscore `_`, or asterisk `*` are treated as delimiters for tokens. `*` is +// treated as a wildcard that matches characters within a token. * Ignoring +// case. * Prepending an asterisk to the first and appending an asterisk to the +// last token in QUERY. A QUERY must be either a singular token or a phrase. A +// phrase is one or multiple words enclosed in double quotation marks ("). With +// phrases, the order of the words is important. Words in the phrase must be +// matching in order and consecutively. Supported FIELDs for field-restricted +// queries: * `feature_id` * `description` * `entity_type_id` Examples: * +// `feature_id: foo` --> Matches a Feature with ID containing the substring +// `foo` (eg. `foo`, `foofeature`, `barfoo`). * `feature_id: foo*feature` --> +// Matches a Feature with ID containing the substring `foo*feature` (eg. +// `foobarfeature`). * `feature_id: foo AND description: bar` --> Matches a +// Feature with ID containing the substring `foo` and description containing +// the substring `bar`. Besides field queries, the following exact-match +// filters are supported. The exact-match filters do not support wildcards. +// Unlike field-restricted queries, exact-match filters are case-sensitive. * +// `feature_id`: Supports = comparisons. * `description`: Supports = +// comparisons. Multi-token filters should be enclosed in quotes. * +// `entity_type_id`: Supports = comparisons. * `value_type`: Supports = and != +// comparisons. * `labels`: Supports key-value equality as well as key +// presence. * `featurestore_id`: Supports = comparisons. Examples: * +// `description = "foo bar" --> Any Feature with description exactly equal to +// `foo bar` * `value_type = DOUBLE` --> Features whose type is DOUBLE. * +// `labels.active = yes AND labels.env = prod` --> Features having both +// (active: yes) and (env: prod) labels. * `labels.env: *` --> Any Feature +// which has a label with `env` as the key. +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Query(query string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { + c.urlParams_.Set("query", query) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresSearchFeaturesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall { +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresSearchFeaturesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchnearestentitiesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:searchNearestEntities") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+location}/featurestores:searchFeatures") 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{ - "featureView": c.featureView, + "location": c.location, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.searchNearestEntities" call. +// Do executes the "aiplatform.projects.locations.featurestores.searchFeatures" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SearchNearestEntitiesResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudAiplatformV1SearchFeaturesResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchNearestEntitiesResponse, error) { +func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchFeaturesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57711,7 +61293,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCa if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SearchNearestEntitiesResponse{ + ret := &GoogleCloudAiplatformV1SearchFeaturesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57724,7 +61306,28 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSearchNearestEntitiesCa return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall struct { +// 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 *ProjectsLocationsFeaturestoresSearchFeaturesCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchFeaturesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsFeaturestoresSetIamPolicyCall struct { s *Service resource string googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest @@ -57740,8 +61343,8 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall struct { // - 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsFeaturestoresService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeaturestoresSetIamPolicyCall { + c := &ProjectsLocationsFeaturestoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c @@ -57750,27 +61353,27 @@ func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) SetIamPolicy(r // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) @@ -57792,13 +61395,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57830,60 +61433,68 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSetIamPolicyCall) Do(op return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall struct { - s *Service - featureView string - googlecloudaiplatformv1syncfeatureviewrequest *GoogleCloudAiplatformV1SyncFeatureViewRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresTestIamPermissionsCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Sync: Triggers on-demand sync for the FeatureView. +// 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. // -// - featureView: Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) Sync(featureView string, googlecloudaiplatformv1syncfeatureviewrequest *GoogleCloudAiplatformV1SyncFeatureViewRequest) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.featureView = featureView - c.googlecloudaiplatformv1syncfeatureviewrequest = googlecloudaiplatformv1syncfeatureviewrequest +// - 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 *ProjectsLocationsFeaturestoresService) TestIamPermissions(resource string) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { + c := &ProjectsLocationsFeaturestoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// Permissions sets the optional parameter "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). +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall { +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1syncfeatureviewrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featureView}:sync") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -57891,18 +61502,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "featureView": c.featureView, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.sync" call. +// Do executes the "aiplatform.projects.locations.featurestores.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SyncFeatureViewResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SyncFeatureViewResponse, error) { +func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57921,7 +61532,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SyncFeatureViewResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57934,68 +61545,70 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsSyncCall) Do(opts ...go return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType + 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. +// Create: Creates a new EntityType in a given Featurestore. // -// - 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsService) TestIamPermissions(resource string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the Featurestore to create EntityTypes. +// Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) Create(parent string, googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { + c := &ProjectsLocationsFeaturestoresEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1entitytype = googlecloudaiplatformv1entitytype return c } -// Permissions sets the optional parameter "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). -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// EntityTypeId sets the optional parameter "entityTypeId": Required. The ID to +// use for the EntityType, which will become the final component of the +// EntityType's resource name. This value may be up to 60 characters, and valid +// characters are `[a-z0-9_]`. The first character cannot be a number. The +// value must be unique within a featurestore. +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) EntityTypeId(entityTypeId string) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { + c.urlParams_.Set("entityTypeId", entityTypeId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1entitytype) + if err != nil { + return nil, err + } 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/{+parent}/entityTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -58003,18 +61616,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) } 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 "aiplatform.projects.locations.featureOnlineStores.featureViews.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58033,7 +61646,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58046,68 +61659,65 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsTestIamPermissionsCall) return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single FeatureViewSync. +// Delete: Deletes a single EntityType. The EntityType must not have any +// Features or `force` must be set to true for the request to succeed. // -// - name: The name of the FeatureViewSync resource. Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}/featureViewSyncs/{feature_view_sync}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the EntityType to be deleted. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { + c := &ProjectsLocationsFeaturestoresEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Force sets the optional parameter "force": If set to true, any Features for +// this EntityType will also be deleted. (Otherwise, the request will only work +// if the EntityType has no Features.) +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Force(force bool) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -58118,13 +61728,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.featureViewSyncs.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FeatureViewSync.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FeatureViewSync, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58143,7 +61753,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FeatureViewSync{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58156,124 +61766,87 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsGetCall return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1deletefeaturevaluesrequest *GoogleCloudAiplatformV1DeleteFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists FeatureViewSyncs in a given FeatureView. +// DeleteFeatureValues: Delete Feature values from Featurestore. The progress +// of the deletion is tracked by the returned operation. The deleted feature +// values are guaranteed to be invisible to subsequent read operations after +// the operation is marked as successfully done. If a delete feature values +// operation fails, the feature values returned from reads and exports may be +// inconsistent. If consistency is required, the caller must retry the same +// delete request again and wait till the new operation returned is marked as +// successfully done. // -// - parent: The resource name of the FeatureView to list FeatureViewSyncs. -// Format: -// `projects/{project}/locations/{location}/featureOnlineStores/{feature_onlin -// e_store}/featureViews/{feature_view}`. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsService) List(parent string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Lists the FeatureViewSyncs that -// match the filter expression. The following filters are supported: * -// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. -// Values must be in RFC 3339 format. Examples: * `create_time > -// \"2020-01-31T15:30:00.000000Z\" --> FeatureViewSyncs created after -// 2020-01-31T15:30:00.000000Z. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - 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: * `create_time` -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) OrderBy(orderBy string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// FeatureViewSyncs to return. The service may return fewer than this value. If -// unspecified, at most 1000 FeatureViewSyncs will be returned. The maximum -// value is 1000; any value greater than 1000 will be coerced to 1000. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeatureOnlineStoreAdminService.ListFeatureViewSyncs call. -// Provide this to retrieve the subsequent page. When paginating, all other -// parameters provided to FeatureOnlineStoreAdminService.ListFeatureViewSyncs -// must match the call that provided the page token. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - entityType: The resource name of the EntityType grouping the Features for +// which values are being deleted from. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entityType}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) DeleteFeatureValues(entityType string, googlecloudaiplatformv1deletefeaturevaluesrequest *GoogleCloudAiplatformV1DeleteFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1deletefeaturevaluesrequest = googlecloudaiplatformv1deletefeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deletefeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featureViewSyncs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:deleteFeatureValues") 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, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.featureViewSyncs.list" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.deleteFeatureValues" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeatureViewSyncsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeatureViewSyncsResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58292,7 +61865,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeatureViewSyncsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58305,95 +61878,81 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCal return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsFeatureViewSyncsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeatureViewSyncsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1exportfeaturevaluesrequest *GoogleCloudAiplatformV1ExportFeatureValuesRequest + 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`. +// ExportFeatureValues: Exports Feature values from all the entities of a +// target EntityType. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - entityType: The resource name of the EntityType from which to export +// Feature values. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) ExportFeatureValues(entityType string, googlecloudaiplatformv1exportfeaturevaluesrequest *GoogleCloudAiplatformV1ExportFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1exportfeaturevaluesrequest = googlecloudaiplatformv1exportfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportfeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:exportFeatureValues") 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, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.delete" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.exportFeatureValues" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58412,7 +61971,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) D 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, @@ -58425,7 +61984,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsDeleteCall) D return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall struct { +type ProjectsLocationsFeaturestoresEntityTypesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -58434,13 +61993,13 @@ type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall 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 details of a single EntityType. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the EntityType resource. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesGetCall { + c := &ProjectsLocationsFeaturestoresEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -58448,7 +62007,7 @@ func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Get( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -58456,27 +62015,27 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Fiel // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -58497,13 +62056,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) doRe return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.get" call. // 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 +// *GoogleCloudAiplatformV1EntityType.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EntityType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58522,7 +62081,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Do(o if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1EntityType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58535,104 +62094,91 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsGetCall) Do(o return ret, nil } -type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListWait: Lists operations that match the specified filter in the request. -// If the server doesn't support this method, it returns `UNIMPLEMENTED`. +// 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's parent resource. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) ListWait(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - 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 *ProjectsLocationsFeaturestoresEntityTypesService) GetIamPolicy(resource string) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { + c := &ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { - c.urlParams_.Set("pageToken", pageToken) +// 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 *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 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 "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.listWait" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.getIamPolicy" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58651,7 +62197,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58664,90 +62210,74 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1importfeaturevaluesrequest *GoogleCloudAiplatformV1ImportFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// ImportFeatureValues: Imports Feature values into the Featurestore from a +// source storage. The progress of the import is tracked by the returned +// operation. The imported features are guaranteed to be visible to subsequent +// read operations after the operation is marked as successfully done. If an +// import operation fails, the Feature values returned from reads and exports +// may be inconsistent. If consistency is required, the caller must retry the +// same import request again and wait till the new operation returned is marked +// as successfully done. There are also scenarios where the caller can cause +// inconsistency. - Source data for import contains multiple distinct Feature +// values for the same entity ID and timestamp. - Source is modified during an +// import. This includes adding, updating, or removing source data and/or +// metadata. Examples of updating metadata include but are not limited to +// changing storage location, storage class, or retention policy. - Online +// serving cluster is under-provisioned. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsService) Wait(name string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { - c := &ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - entityType: The resource name of the EntityType grouping the Features for +// which values are being imported. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entityType}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) ImportFeatureValues(entityType string, googlecloudaiplatformv1importfeaturevaluesrequest *GoogleCloudAiplatformV1ImportFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1importfeaturevaluesrequest = googlecloudaiplatformv1importfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importfeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:importFeatureValues") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -58755,18 +62285,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) doR } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.featureViews.operations.wait" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.importFeatureValues" call. // 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 *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58798,74 +62328,135 @@ func (c *ProjectsLocationsFeatureOnlineStoresFeatureViewsOperationsWaitCall) Do( return ret, nil } -type ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesListCall struct { + s *Service + parent 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`. +// List: Lists EntityTypes in a given Featurestore. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) Delete(name string) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { - c := &ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Featurestore to list EntityTypes. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) List(parent string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c := &ProjectsLocationsFeaturestoresEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the EntityTypes that +// match the filter expression. The following filters are supported: * +// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. +// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, +// `>`, `>=`, and `<=` comparisons. Values must be in RFC 3339 format. * +// `labels`: Supports key-value equality as well as key presence. Examples: * +// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > +// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after +// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` +// --> EntityTypes having both (active: yes) and (env: prod) labels. * +// `labels.env: *` --> Any EntityType which has a label with 'env' as the key. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + 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: * `entity_type_id` * `create_time` * +// `update_time` +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// EntityTypes to return. The service may return fewer than this value. If +// unspecified, at most 1000 EntityTypes will be returned. The maximum value is +// 1000; any value greater than 1000 will be coerced to 1000. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous FeaturestoreService.ListEntityTypes call. Provide this to +// retrieve the subsequent page. When paginating, all other parameters provided +// to FeaturestoreService.ListEntityTypes must match the call that provided the +// page token. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entityTypes") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.delete" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.list" call. // 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 *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListEntityTypesResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListEntityTypesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58884,7 +62475,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListEntityTypesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58897,68 +62488,106 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsFeatureOnlineStoresOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListEntityTypesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// 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. +type ProjectsLocationsFeaturestoresEntityTypesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single EntityType. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) Get(name string) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { - c := &ProjectsLocationsFeatureOnlineStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Name of the EntityType. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` The last part entity_type is assigned by the client. +// The entity_type can be up to 64 characters long and can consist only of +// ASCII Latin letters A-Z and a-z and underscore(_), and ASCII digits 0-9 +// starting with a letter. The value will be unique given a featurestore. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) Patch(name string, googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { + c := &ProjectsLocationsFeaturestoresEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1entitytype = googlecloudaiplatformv1entitytype + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the EntityType 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 only the non-empty fields +// present in the request will be overwritten. Set the update_mask to `*` to +// override all fields. Updatable fields: * `description` * `labels` * +// `monitoring_config.snapshot_analysis.disabled` * +// `monitoring_config.snapshot_analysis.monitoring_interval_days` * +// `monitoring_config.snapshot_analysis.staleness_days` * +// `monitoring_config.import_features_analysis.state` * +// `monitoring_config.import_features_analysis.anomaly_detection_baseline` * +// `monitoring_config.numerical_threshold_config.value` * +// `monitoring_config.categorical_threshold_config.value` * +// `offline_storage_ttl_days` +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1entitytype) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -58969,13 +62598,13 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.patch" call. // 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 +// *GoogleCloudAiplatformV1EntityType.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EntityType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58991,120 +62620,99 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsGetCall) Do(opts ...googl 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 -} - -type ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ListWait: 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 *ProjectsLocationsFeatureOnlineStoresOperationsService) ListWait(name string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { - c := &ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Filter(filter string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { - c.urlParams_.Set("filter", filter) - return c + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &GoogleCloudAiplatformV1EntityType{ + 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 } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) PageSize(pageSize int64) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c +type ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1readfeaturevaluesrequest *GoogleCloudAiplatformV1ReadFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) PageToken(pageToken string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { - c.urlParams_.Set("pageToken", pageToken) +// ReadFeatureValues: Reads Feature values of a specific entity of an +// EntityType. For reading feature values of multiple entities of an +// EntityType, please use StreamingReadFeatureValues. +// +// - entityType: The resource name of the EntityType for the entity being read. +// Value format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entityType}`. For example, for a machine learning model predicting +// user clicks on a website, an EntityType ID could be `user`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) ReadFeatureValues(entityType string, googlecloudaiplatformv1readfeaturevaluesrequest *GoogleCloudAiplatformV1ReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1readfeaturevaluesrequest = googlecloudaiplatformv1readfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1readfeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:readFeatureValues") 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, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featureOnlineStores.operations.listWait" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.readFeatureValues" call. // 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 +// *GoogleCloudAiplatformV1ReadFeatureValuesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadFeatureValuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59123,7 +62731,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ReadFeatureValuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59136,90 +62744,62 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Do(opts ... return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsListWaitCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsFeatureOnlineStoresOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeatureOnlineStoresOperationsService) Wait(name string) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { - c := &ProjectsLocationsFeatureOnlineStoresOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - 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 *ProjectsLocationsFeaturestoresEntityTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { + c := &ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -59227,18 +62807,18 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) doRequest(alt s } 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 "aiplatform.projects.locations.featureOnlineStores.operations.wait" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.setIamPolicy" call. // 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 *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59257,7 +62837,7 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59270,64 +62850,63 @@ func (c *ProjectsLocationsFeatureOnlineStoresOperationsWaitCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall struct { - s *Service - featurestore string - googlecloudaiplatformv1batchreadfeaturevaluesrequest *GoogleCloudAiplatformV1BatchReadFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1streamingreadfeaturevaluesrequest *GoogleCloudAiplatformV1StreamingReadFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchReadFeatureValues: Batch reads Feature values from a Featurestore. This -// API enables batch reading Feature values, where each read instance in the -// batch may read Feature values of entities from one or more EntityTypes. -// Point-in-time correctness is guaranteed for Feature values of each read -// instance as of each instance's read timestamp. +// StreamingReadFeatureValues: Reads Feature values for multiple entities. +// Depending on their size, data for different entities may be broken up across +// multiple responses. // -// - featurestore: The resource name of the Featurestore from which to query -// Feature values. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}`. -func (r *ProjectsLocationsFeaturestoresService) BatchReadFeatureValues(featurestore string, googlecloudaiplatformv1batchreadfeaturevaluesrequest *GoogleCloudAiplatformV1BatchReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.featurestore = featurestore - c.googlecloudaiplatformv1batchreadfeaturevaluesrequest = googlecloudaiplatformv1batchreadfeaturevaluesrequest +// - entityType: The resource name of the entities' type. Value format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entityType}`. For example, for a machine learning model predicting +// user clicks on a website, an EntityType ID could be `user`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) StreamingReadFeatureValues(entityType string, googlecloudaiplatformv1streamingreadfeaturevaluesrequest *GoogleCloudAiplatformV1StreamingReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1streamingreadfeaturevaluesrequest = googlecloudaiplatformv1streamingreadfeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchreadfeaturevaluesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingreadfeaturevaluesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+featurestore}:batchReadFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:streamingReadFeatureValues") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -59335,18 +62914,18 @@ func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "featurestore": c.featurestore, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.batchReadFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.streamingReadFeatureValues" call. // 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 +// *GoogleCloudAiplatformV1ReadFeatureValuesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadFeatureValuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59365,7 +62944,7 @@ func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ReadFeatureValuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59378,69 +62957,68 @@ func (c *ProjectsLocationsFeaturestoresBatchReadFeatureValuesCall) Do(opts ...go return ret, nil } -type ProjectsLocationsFeaturestoresCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Featurestore in a given project and location. +// 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. // -// - parent: The resource name of the Location to create Featurestores. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeaturestoresService) Create(parent string, googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore) *ProjectsLocationsFeaturestoresCreateCall { - c := &ProjectsLocationsFeaturestoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1featurestore = googlecloudaiplatformv1featurestore +// - 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 *ProjectsLocationsFeaturestoresEntityTypesService) TestIamPermissions(resource string) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { + c := &ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// FeaturestoreId sets the optional parameter "featurestoreId": Required. The -// ID to use for this Featurestore, which will become the final component of -// the Featurestore's resource name. This value may be up to 60 characters, and -// valid characters are `[a-z0-9_]`. The first character cannot be a number. -// The value must be unique within the project and location. -func (c *ProjectsLocationsFeaturestoresCreateCall) FeaturestoreId(featurestoreId string) *ProjectsLocationsFeaturestoresCreateCall { - c.urlParams_.Set("featurestoreId", featurestoreId) +// Permissions sets the optional parameter "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). +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresCreateCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresCreateCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featurestore) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featurestores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -59448,18 +63026,18 @@ func (c *ProjectsLocationsFeaturestoresCreateCall) doRequest(alt string) (*http. } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.create" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.testIamPermissions" call. // 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 +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59478,7 +63056,7 @@ func (c *ProjectsLocationsFeaturestoresCreateCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59491,81 +63069,85 @@ func (c *ProjectsLocationsFeaturestoresCreateCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsFeaturestoresDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall struct { + s *Service + entityType string + googlecloudaiplatformv1writefeaturevaluesrequest *GoogleCloudAiplatformV1WriteFeatureValuesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single Featurestore. The Featurestore must not contain any -// EntityTypes or `force` must be set to true for the request to succeed. +// WriteFeatureValues: Writes Feature values of one or more entities of an +// EntityType. The Feature values are merged into existing entities if any. The +// Feature values to be written must have timestamp within the online storage +// retention. // -// - name: The name of the Featurestore to be deleted. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}`. -func (r *ProjectsLocationsFeaturestoresService) Delete(name string) *ProjectsLocationsFeaturestoresDeleteCall { - c := &ProjectsLocationsFeaturestoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Force sets the optional parameter "force": If set to true, any EntityTypes -// and Features for this Featurestore will also be deleted. (Otherwise, the -// request will only work if the Featurestore has no EntityTypes.) -func (c *ProjectsLocationsFeaturestoresDeleteCall) Force(force bool) *ProjectsLocationsFeaturestoresDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) +// - entityType: The resource name of the EntityType for the entities being +// written. Value format: +// `projects/{project}/locations/{location}/featurestores/ +// {featurestore}/entityTypes/{entityType}`. For example, for a machine +// learning model predicting user clicks on a website, an EntityType ID could +// be `user`. +func (r *ProjectsLocationsFeaturestoresEntityTypesService) WriteFeatureValues(entityType string, googlecloudaiplatformv1writefeaturevaluesrequest *GoogleCloudAiplatformV1WriteFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { + c := &ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.entityType = entityType + c.googlecloudaiplatformv1writefeaturevaluesrequest = googlecloudaiplatformv1writefeaturevaluesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1writefeaturevaluesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:writeFeatureValues") 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, + "entityType": c.entityType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.delete" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.writeFeatureValues" call. // 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 +// *GoogleCloudAiplatformV1WriteFeatureValuesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1WriteFeatureValuesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59584,7 +63166,7 @@ func (c *ProjectsLocationsFeaturestoresDeleteCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1WriteFeatureValuesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59597,83 +63179,81 @@ func (c *ProjectsLocationsFeaturestoresDeleteCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsFeaturestoresGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single Featurestore. +// BatchCreate: Creates a batch of Features in a given EntityType. // -// - name: The name of the Featurestore resource. -func (r *ProjectsLocationsFeaturestoresService) Get(name string) *ProjectsLocationsFeaturestoresGetCall { - c := &ProjectsLocationsFeaturestoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the EntityType/FeatureGroup to create the +// batch of Features under. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) BatchCreate(parent string, googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchcreatefeaturesrequest = googlecloudaiplatformv1batchcreatefeaturesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcreatefeaturesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features:batchCreate") 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 "aiplatform.projects.locations.featurestores.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.batchCreate" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Featurestore.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Featurestore, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59692,7 +63272,7 @@ func (c *ProjectsLocationsFeaturestoresGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Featurestore{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59705,72 +63285,72 @@ func (c *ProjectsLocationsFeaturestoresGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsFeaturestoresGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature + 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: Creates a new Feature in a given EntityType. // -// - 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 *ProjectsLocationsFeaturestoresService) GetIamPolicy(resource string) *ProjectsLocationsFeaturestoresGetIamPolicyCall { - c := &ProjectsLocationsFeaturestoresGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - parent: The resource name of the EntityType or FeatureGroup to create a +// Feature. Format for entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Create(parent string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature 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 *ProjectsLocationsFeaturestoresGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeaturestoresGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// FeatureId sets the optional parameter "featureId": Required. The ID to use +// for the Feature, which will become the final component of the Feature's +// resource name. This value may be up to 128 characters, and valid characters +// are `[a-z0-9_]`. The first character cannot be a number. The value must be +// unique within an EntityType/FeatureGroup. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { + c.urlParams_.Set("featureId", featureId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) + if err != nil { + return nil, err + } 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}/features") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -59778,18 +63358,18 @@ func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) doRequest(alt string) ( } 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 "aiplatform.projects.locations.featurestores.getIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59808,7 +63388,7 @@ func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59821,134 +63401,75 @@ func (c *ProjectsLocationsFeaturestoresGetIamPolicyCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsFeaturestoresListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists Featurestores in a given project and location. +// Delete: Deletes a single Feature. // -// - parent: The resource name of the Location to list Featurestores. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeaturestoresService) List(parent string) *ProjectsLocationsFeaturestoresListCall { - c := &ProjectsLocationsFeaturestoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Lists the featurestores that -// match the filter expression. The following fields are supported: * -// `create_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` comparisons. -// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, -// `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 format. * -// `online_serving_config.fixed_node_count`: Supports `=`, `!=`, `<`, `>`, -// `<=`, and `>=` comparisons. * `labels`: Supports key-value equality and key -// presence. Examples: * `create_time > "2020-01-01" OR update_time > -// "2020-01-01" Featurestores created or updated after 2020-01-01. * -// `labels.env = "prod" Featurestores with label "env" set to "prod". -func (c *ProjectsLocationsFeaturestoresListCall) Filter(filter string) *ProjectsLocationsFeaturestoresListCall { - 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: * `create_time` * `update_time` * -// `online_serving_config.fixed_node_count` -func (c *ProjectsLocationsFeaturestoresListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// Featurestores to return. The service may return fewer than this value. If -// unspecified, at most 100 Featurestores will be returned. The maximum value -// is 100; any value greater than 100 will be coerced to 100. -func (c *ProjectsLocationsFeaturestoresListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeaturestoreService.ListFeaturestores call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters provided -// to FeaturestoreService.ListFeaturestores must match the call that provided -// the page token. -func (c *ProjectsLocationsFeaturestoresListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsFeaturestoresListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the Features to be deleted. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}/features/{feature}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat +// ures/{feature}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresListCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/featurestores") + 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 "aiplatform.projects.locations.featurestores.list" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeaturestoresResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturestoresResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -59967,7 +63488,7 @@ func (c *ProjectsLocationsFeaturestoresListCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeaturestoresResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -59980,96 +63501,69 @@ func (c *ProjectsLocationsFeaturestoresListCall) Do(opts ...googleapi.CallOption return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsFeaturestoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturestoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsFeaturestoresPatchCall struct { - s *Service - name string - googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single Featurestore. +// Get: Gets details of a single Feature. // -// - name: Output only. Name of the Featurestore. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}`. -func (r *ProjectsLocationsFeaturestoresService) Patch(name string, googlecloudaiplatformv1featurestore *GoogleCloudAiplatformV1Featurestore) *ProjectsLocationsFeaturestoresPatchCall { - c := &ProjectsLocationsFeaturestoresPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Feature resource. Format for entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1featurestore = googlecloudaiplatformv1featurestore - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Featurestore 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 only the non-empty fields -// present in the request will be overwritten. Set the update_mask to `*` to -// override all fields. Updatable fields: * `labels` * -// `online_serving_config.fixed_node_count` * `online_serving_config.scaling` * -// `online_storage_ttl_days` -func (c *ProjectsLocationsFeaturestoresPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresPatchCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresPatchCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1featurestore) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -60080,13 +63574,13 @@ func (c *ProjectsLocationsFeaturestoresPatchCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.patch" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Feature.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60105,7 +63599,7 @@ func (c *ProjectsLocationsFeaturestoresPatchCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1Feature{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -60118,87 +63612,95 @@ func (c *ProjectsLocationsFeaturestoresPatchCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsFeaturestoresSearchFeaturesCall struct { +type ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall struct { s *Service - location string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// SearchFeatures: Searches Features matching a query in a given project. +// List: Lists Features in a given EntityType. // -// - location: The resource name of the Location to search Features. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsFeaturestoresService) SearchFeatures(location string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { - c := &ProjectsLocationsFeaturestoresSearchFeaturesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.location = location +// - parent: The resource name of the Location to list Features. Format for +// entity_type as parent: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}` Format for feature_group as parent: +// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) List(parent string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the Features that match +// the filter expression. The following filters are supported: * `value_type`: +// Supports = and != comparisons. * `create_time`: Supports =, !=, <, >, >=, +// and <= comparisons. Values must be in RFC 3339 format. * `update_time`: +// Supports =, !=, <, >, >=, and <= comparisons. Values must be in RFC 3339 +// format. * `labels`: Supports key-value equality as well as key presence. +// Examples: * `value_type = DOUBLE` --> Features whose type is DOUBLE. * +// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > +// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after +// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` +// --> Features having both (active: yes) and (env: prod) labels. * +// `labels.env: *` --> Any Feature which has a label with 'env' as the key. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// LatestStatsCount sets the optional parameter "latestStatsCount": Only +// applicable for Vertex AI Feature Store (Legacy). If set, return the most +// recent ListFeaturesRequest.latest_stats_count of stats for each Feature in +// response. Valid value is [0, 10]. If number of stats exists < +// ListFeaturesRequest.latest_stats_count, return all existing stats. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) LatestStatsCount(latestStatsCount int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { + c.urlParams_.Set("latestStatsCount", fmt.Sprint(latestStatsCount)) + 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: * `feature_id` * `value_type` (Not +// supported for FeatureRegistry Feature) * `create_time` * `update_time` +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { + c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number of // Features to return. The service may return fewer than this value. If -// unspecified, at most 100 Features will be returned. The maximum value is -// 100; any value greater than 100 will be coerced to 100. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresSearchFeaturesCall { +// unspecified, at most 1000 Features will be returned. The maximum value is +// 1000; any value greater than 1000 will be coerced to 1000. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeaturestoreService.SearchFeatures call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters provided -// to FeaturestoreService.SearchFeatures, except `page_size`, must match the -// call that provided the page token. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { +// from a previous FeaturestoreService.ListFeatures call or +// FeatureRegistryService.ListFeatures call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must +// match the call that provided the page token. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// Query sets the optional parameter "query": Query string that is a -// conjunction of field-restricted queries and/or field-restricted filters. -// Field-restricted queries and filters can be combined using `AND` to form a -// conjunction. A field query is in the form FIELD:QUERY. This implicitly -// checks if QUERY exists as a substring within Feature's FIELD. The QUERY and -// the FIELD are converted to a sequence of words (i.e. tokens) for comparison. -// This is done by: * Removing leading/trailing whitespace and tokenizing the -// search value. Characters that are not one of alphanumeric `[a-zA-Z0-9]`, -// underscore `_`, or asterisk `*` are treated as delimiters for tokens. `*` is -// treated as a wildcard that matches characters within a token. * Ignoring -// case. * Prepending an asterisk to the first and appending an asterisk to the -// last token in QUERY. A QUERY must be either a singular token or a phrase. A -// phrase is one or multiple words enclosed in double quotation marks ("). With -// phrases, the order of the words is important. Words in the phrase must be -// matching in order and consecutively. Supported FIELDs for field-restricted -// queries: * `feature_id` * `description` * `entity_type_id` Examples: * -// `feature_id: foo` --> Matches a Feature with ID containing the substring -// `foo` (eg. `foo`, `foofeature`, `barfoo`). * `feature_id: foo*feature` --> -// Matches a Feature with ID containing the substring `foo*feature` (eg. -// `foobarfeature`). * `feature_id: foo AND description: bar` --> Matches a -// Feature with ID containing the substring `foo` and description containing -// the substring `bar`. Besides field queries, the following exact-match -// filters are supported. The exact-match filters do not support wildcards. -// Unlike field-restricted queries, exact-match filters are case-sensitive. * -// `feature_id`: Supports = comparisons. * `description`: Supports = -// comparisons. Multi-token filters should be enclosed in quotes. * -// `entity_type_id`: Supports = comparisons. * `value_type`: Supports = and != -// comparisons. * `labels`: Supports key-value equality as well as key -// presence. * `featurestore_id`: Supports = comparisons. Examples: * -// `description = "foo bar" --> Any Feature with description exactly equal to -// `foo bar` * `value_type = DOUBLE` --> Features whose type is DOUBLE. * -// `labels.active = yes AND labels.env = prod` --> Features having both -// (active: yes) and (env: prod) labels. * `labels.env: *` --> Any Feature -// which has a label with `env` as the key. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Query(query string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { - c.urlParams_.Set("query", query) +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresSearchFeaturesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -60206,27 +63708,27 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresSearchFeaturesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresSearchFeaturesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -60234,7 +63736,7 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) 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/{+location}/featurestores:searchFeatures") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -60242,18 +63744,18 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) doRequest(alt string) } 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 "aiplatform.projects.locations.featurestores.searchFeatures" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SearchFeaturesResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListFeaturesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchFeaturesResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60272,7 +63774,7 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SearchFeaturesResponse{ + ret := &GoogleCloudAiplatformV1ListFeaturesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -60288,7 +63790,7 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Do(opts ...googleapi. // 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 *ProjectsLocationsFeaturestoresSearchFeaturesCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchFeaturesResponse) error) error { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -60306,81 +63808,98 @@ func (c *ProjectsLocationsFeaturestoresSearchFeaturesCall) Pages(ctx context.Con } } -type ProjectsLocationsFeaturestoresSetIamPolicyCall struct { +type ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall struct { s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + name string + googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature 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 the parameters of a single Feature. // -// - 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 *ProjectsLocationsFeaturestoresService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeaturestoresSetIamPolicyCall { - c := &ProjectsLocationsFeaturestoresSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: Immutable. Name of the Feature. Format: +// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit +// yTypes/{entity_type}/features/{feature}` +// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat +// ures/{feature}` The last part feature is assigned by the client. The +// feature can be up to 64 characters long and can consist only of ASCII +// Latin letters A-Z and a-z, underscore(_), and ASCII digits 0-9 starting +// with a letter. The value will be unique given an entity type. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Patch(name string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the Features 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 only the non-empty fields present in the +// request will be overwritten. Set the update_mask to `*` to override all +// fields. Updatable fields: * `description` * `labels` * `disable_monitoring` +// (Not supported for FeatureRegistryService Feature) * `point_of_contact` (Not +// supported for FeaturestoreService FeatureStore) +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) if err != nil { return nil, err } 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 "aiplatform.projects.locations.featurestores.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudAiplatformV1Feature.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60399,7 +63918,7 @@ func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudAiplatformV1Feature{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -60412,68 +63931,60 @@ func (c *ProjectsLocationsFeaturestoresSetIamPolicyCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsFeaturestoresTestIamPermissionsCall struct { +type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall struct { s *Service - resource string + name string 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. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - 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 *ProjectsLocationsFeaturestoresService) TestIamPermissions(resource string) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { - c := &ProjectsLocationsFeaturestoresTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// Permissions sets the optional parameter "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). -func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -60481,18 +63992,18 @@ func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) doRequest(alt str } 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 "aiplatform.projects.locations.featurestores.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +// *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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60511,7 +64022,7 @@ func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -60524,89 +64035,74 @@ func (c *ProjectsLocationsFeaturestoresTestIamPermissionsCall) Do(opts ...google return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new EntityType in a given Featurestore. +// 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`. // -// - parent: The resource name of the Featurestore to create EntityTypes. -// Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) Create(parent string, googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { - c := &ProjectsLocationsFeaturestoresEntityTypesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1entitytype = googlecloudaiplatformv1entitytype - return c -} - -// EntityTypeId sets the optional parameter "entityTypeId": Required. The ID to -// use for the EntityType, which will become the final component of the -// EntityType's resource name. This value may be up to 60 characters, and valid -// characters are `[a-z0-9_]`. The first character cannot be a number. The -// value must be unique within a featurestore. -func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) EntityTypeId(entityTypeId string) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { - c.urlParams_.Set("entityTypeId", entityTypeId) +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesCreateCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1entitytype) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/entityTypes") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.create" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.delete" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60625,7 +64121,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Do(opts ...googlea 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, @@ -60638,65 +64134,68 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesCreateCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single EntityType. The EntityType must not have any -// Features or `force` must be set to true for the request to succeed. +// 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 EntityType to be deleted. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { - c := &ProjectsLocationsFeaturestoresEntityTypesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": If set to true, any Features for -// this EntityType will also be deleted. (Otherwise, the request will only work -// if the EntityType has no Features.) -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Force(force bool) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesDeleteCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -60707,13 +64206,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.delete" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.get" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60745,87 +64244,104 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1deletefeaturevaluesrequest *GoogleCloudAiplatformV1DeleteFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DeleteFeatureValues: Delete Feature values from Featurestore. The progress -// of the deletion is tracked by the returned operation. The deleted feature -// values are guaranteed to be invisible to subsequent read operations after -// the operation is marked as successfully done. If a delete feature values -// operation fails, the feature values returned from reads and exports may be -// inconsistent. If consistency is required, the caller must retry the same -// delete request again and wait till the new operation returned is marked as -// successfully done. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - entityType: The resource name of the EntityType grouping the Features for -// which values are being deleted from. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entityType}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) DeleteFeatureValues(entityType string, googlecloudaiplatformv1deletefeaturevaluesrequest *GoogleCloudAiplatformV1DeleteFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1deletefeaturevaluesrequest = googlecloudaiplatformv1deletefeaturevaluesrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) List(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deletefeaturevaluesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:deleteFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 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{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.deleteFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.list" call. // 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 +// *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 *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60844,7 +64360,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Do(op 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, @@ -60857,62 +64373,90 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesDeleteFeatureValuesCall) Do(op return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1exportfeaturevaluesrequest *GoogleCloudAiplatformV1ExportFeatureValuesRequest - 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// ExportFeatureValues: Exports Feature values from all the entities of a -// target EntityType. +type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - entityType: The resource name of the EntityType from which to export -// Feature values. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) ExportFeatureValues(entityType string, googlecloudaiplatformv1exportfeaturevaluesrequest *GoogleCloudAiplatformV1ExportFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1exportfeaturevaluesrequest = googlecloudaiplatformv1exportfeaturevaluesrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { + c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportfeaturevaluesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:exportFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -60920,18 +64464,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) doReq } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.exportFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.wait" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -60963,22 +64507,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesExportFeatureValuesCall) Do(op return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets details of a single EntityType. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - name: The name of the EntityType resource. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesGetCall { - c := &ProjectsLocationsFeaturestoresEntityTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { + c := &ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -60986,45 +64535,34 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesGetCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -61035,13 +64573,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.get" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1EntityType.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EntityType, error) { +// *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 *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61060,7 +64598,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1EntityType{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61073,91 +64611,74 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall struct { +type ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall struct { s *Service - resource string + name string 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. +// 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`. // -// - 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 *ProjectsLocationsFeaturestoresEntityTypesService) GetIamPolicy(resource string) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { - c := &ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall{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 *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { + c := &ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + 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{ - "resource": c.resource, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.getIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61176,7 +64697,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61189,93 +64710,85 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesGetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1importfeaturevaluesrequest *GoogleCloudAiplatformV1ImportFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ImportFeatureValues: Imports Feature values into the Featurestore from a -// source storage. The progress of the import is tracked by the returned -// operation. The imported features are guaranteed to be visible to subsequent -// read operations after the operation is marked as successfully done. If an -// import operation fails, the Feature values returned from reads and exports -// may be inconsistent. If consistency is required, the caller must retry the -// same import request again and wait till the new operation returned is marked -// as successfully done. There are also scenarios where the caller can cause -// inconsistency. - Source data for import contains multiple distinct Feature -// values for the same entity ID and timestamp. - Source is modified during an -// import. This includes adding, updating, or removing source data and/or -// metadata. Examples of updating metadata include but are not limited to -// changing storage location, storage class, or retention policy. - Online -// serving cluster is under-provisioned. +// 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. // -// - entityType: The resource name of the EntityType grouping the Features for -// which values are being imported. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entityType}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) ImportFeatureValues(entityType string, googlecloudaiplatformv1importfeaturevaluesrequest *GoogleCloudAiplatformV1ImportFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1importfeaturevaluesrequest = googlecloudaiplatformv1importfeaturevaluesrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { + c := &ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ -} - -func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importfeaturevaluesrequest) - if err != nil { - return nil, err +} + +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:importFeatureValues") + 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{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.importFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.get" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61307,80 +64820,49 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesImportFeatureValuesCall) Do(op return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesListCall struct { +type ProjectsLocationsFeaturestoresEntityTypesOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists EntityTypes in a given Featurestore. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the Featurestore to list EntityTypes. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) List(parent string) *ProjectsLocationsFeaturestoresEntityTypesListCall { - c := &ProjectsLocationsFeaturestoresEntityTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) List(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { + c := &ProjectsLocationsFeaturestoresEntityTypesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": Lists the EntityTypes that -// match the filter expression. The following filters are supported: * -// `create_time`: Supports `=`, `!=`, `<`, `>`, `>=`, and `<=` comparisons. -// Values must be in RFC 3339 format. * `update_time`: Supports `=`, `!=`, `<`, -// `>`, `>=`, and `<=` comparisons. Values must be in RFC 3339 format. * -// `labels`: Supports key-value equality as well as key presence. Examples: * -// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > -// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after -// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` -// --> EntityTypes having both (active: yes) and (env: prod) labels. * -// `labels.env: *` --> Any EntityType which has a label with 'env' as the key. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { 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: * `entity_type_id` * `create_time` * -// `update_time` -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresEntityTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// EntityTypes to return. The service may return fewer than this value. If -// unspecified, at most 1000 EntityTypes will be returned. The maximum value is -// 1000; any value greater than 1000 will be coerced to 1000. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeaturestoreService.ListEntityTypes call. Provide this to -// retrieve the subsequent page. When paginating, all other parameters provided -// to FeaturestoreService.ListEntityTypes must match the call that provided the -// page token. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresEntityTypesListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -61388,27 +64870,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Fields(s ...googleap // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesListCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -61416,7 +64898,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) 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/{+parent}/entityTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -61424,18 +64906,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) doRequest(alt string } 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 "aiplatform.projects.locations.featurestores.entityTypes.list" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListEntityTypesResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresEntityTypesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListEntityTypesResponse, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61454,7 +64936,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListEntityTypesResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61470,7 +64952,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Do(opts ...googleapi // 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 *ProjectsLocationsFeaturestoresEntityTypesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListEntityTypesResponse) error) error { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -61488,85 +64970,71 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesListCall) Pages(ctx context.Co } } -type ProjectsLocationsFeaturestoresEntityTypesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single EntityType. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - name: Immutable. Name of the EntityType. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` The last part entity_type is assigned by the client. -// The entity_type can be up to 64 characters long and can consist only of -// ASCII Latin letters A-Z and a-z and underscore(_), and ASCII digits 0-9 -// starting with a letter. The value will be unique given a featurestore. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) Patch(name string, googlecloudaiplatformv1entitytype *GoogleCloudAiplatformV1EntityType) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { - c := &ProjectsLocationsFeaturestoresEntityTypesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { + c := &ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1entitytype = googlecloudaiplatformv1entitytype return c } -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the EntityType 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 only the non-empty fields -// present in the request will be overwritten. Set the update_mask to `*` to -// override all fields. Updatable fields: * `description` * `labels` * -// `monitoring_config.snapshot_analysis.disabled` * -// `monitoring_config.snapshot_analysis.monitoring_interval_days` * -// `monitoring_config.snapshot_analysis.staleness_days` * -// `monitoring_config.import_features_analysis.state` * -// `monitoring_config.import_features_analysis.anomaly_detection_baseline` * -// `monitoring_config.numerical_threshold_config.value` * -// `monitoring_config.categorical_threshold_config.value` * -// `offline_storage_ttl_days` -func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesPatchCall { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1entitytype) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -61577,13 +65045,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.patch" call. +// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1EntityType.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1EntityType, error) { +func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61602,7 +65070,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1EntityType{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61615,64 +65083,60 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesPatchCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1readfeaturevaluesrequest *GoogleCloudAiplatformV1ReadFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ReadFeatureValues: Reads Feature values of a specific entity of an -// EntityType. For reading feature values of multiple entities of an -// EntityType, please use StreamingReadFeatureValues. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - entityType: The resource name of the EntityType for the entity being read. -// Value format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entityType}`. For example, for a machine learning model predicting -// user clicks on a website, an EntityType ID could be `user`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) ReadFeatureValues(entityType string, googlecloudaiplatformv1readfeaturevaluesrequest *GoogleCloudAiplatformV1ReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1readfeaturevaluesrequest = googlecloudaiplatformv1readfeaturevaluesrequest +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsFeaturestoresOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresOperationsCancelCall { + c := &ProjectsLocationsFeaturestoresOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1readfeaturevaluesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:readFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -61680,18 +65144,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) doReque } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.readFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ReadFeatureValuesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadFeatureValuesResponse, error) { +// *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 *ProjectsLocationsFeaturestoresOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61710,7 +65174,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ReadFeatureValuesResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61723,81 +65187,74 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesReadFeatureValuesCall) Do(opts return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresOperationsDeleteCall struct { + s *Service + name string + 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. +// 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`. // -// - 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 *ProjectsLocationsFeaturestoresEntityTypesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { - c := &ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsFeaturestoresOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresOperationsDeleteCall { + c := &ProjectsLocationsFeaturestoresOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall { +func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err - } 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("DELETE", 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 "aiplatform.projects.locations.featurestores.entityTypes.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.featurestores.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61816,7 +65273,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61829,82 +65286,85 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesSetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1streamingreadfeaturevaluesrequest *GoogleCloudAiplatformV1StreamingReadFeatureValuesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StreamingReadFeatureValues: Reads Feature values for multiple entities. -// Depending on their size, data for different entities may be broken up across -// multiple responses. +// 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. // -// - entityType: The resource name of the entities' type. Value format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entityType}`. For example, for a machine learning model predicting -// user clicks on a website, an EntityType ID could be `user`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) StreamingReadFeatureValues(entityType string, googlecloudaiplatformv1streamingreadfeaturevaluesrequest *GoogleCloudAiplatformV1StreamingReadFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1streamingreadfeaturevaluesrequest = googlecloudaiplatformv1streamingreadfeaturevaluesrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsFeaturestoresOperationsService) Get(name string) *ProjectsLocationsFeaturestoresOperationsGetCall { + c := &ProjectsLocationsFeaturestoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingreadfeaturevaluesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:streamingReadFeatureValues") + 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{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.streamingReadFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ReadFeatureValuesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadFeatureValuesResponse, error) { +func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -61923,7 +65383,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ReadFeatureValuesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -61936,87 +65396,104 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesStreamingReadFeatureValuesCall return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsFeaturestoresOperationsListCall 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. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - 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 *ProjectsLocationsFeaturestoresEntityTypesService) TestIamPermissions(resource string) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { - c := &ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsFeaturestoresOperationsService) List(name string) *ProjectsLocationsFeaturestoresOperationsListCall { + c := &ProjectsLocationsFeaturestoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Permissions sets the optional parameter "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). -func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsFeaturestoresOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsFeaturestoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsFeaturestoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFeaturestoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall { +func (c *ProjectsLocationsFeaturestoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsFeaturestoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 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 "aiplatform.projects.locations.featurestores.entityTypes.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.featurestores.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// *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 *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsFeaturestoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62035,7 +65512,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62048,66 +65525,90 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesTestIamPermissionsCall) Do(opt return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall struct { - s *Service - entityType string - googlecloudaiplatformv1writefeaturevaluesrequest *GoogleCloudAiplatformV1WriteFeatureValuesRequest - 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 *ProjectsLocationsFeaturestoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsFeaturestoresOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// WriteFeatureValues: Writes Feature values of one or more entities of an -// EntityType. The Feature values are merged into existing entities if any. The -// Feature values to be written must have timestamp within the online storage -// retention. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - entityType: The resource name of the EntityType for the entities being -// written. Value format: -// `projects/{project}/locations/{location}/featurestores/ -// {featurestore}/entityTypes/{entityType}`. For example, for a machine -// learning model predicting user clicks on a website, an EntityType ID could -// be `user`. -func (r *ProjectsLocationsFeaturestoresEntityTypesService) WriteFeatureValues(entityType string, googlecloudaiplatformv1writefeaturevaluesrequest *GoogleCloudAiplatformV1WriteFeatureValuesRequest) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { - c := &ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.entityType = entityType - c.googlecloudaiplatformv1writefeaturevaluesrequest = googlecloudaiplatformv1writefeaturevaluesrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsFeaturestoresOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresOperationsWaitCall { + c := &ProjectsLocationsFeaturestoresOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall { +func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Header() http.Header { +func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1writefeaturevaluesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+entityType}:writeFeatureValues") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -62115,18 +65616,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) doRequ } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "entityType": c.entityType, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.writeFeatureValues" call. +// Do executes the "aiplatform.projects.locations.featurestores.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1WriteFeatureValuesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1WriteFeatureValuesResponse, error) { +func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62145,7 +65646,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1WriteFeatureValuesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62158,62 +65659,68 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesWriteFeatureValuesCall) Do(opt return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsHyperparameterTuningJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelhyperparametertuningjobrequest *GoogleCloudAiplatformV1CancelHyperparameterTuningJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchCreate: Creates a batch of Features in a given EntityType. +// Cancel: Cancels a HyperparameterTuningJob. Starts asynchronous cancellation +// on the HyperparameterTuningJob. The server makes a best effort to cancel the +// job, but success is not guaranteed. Clients can use +// JobService.GetHyperparameterTuningJob or other methods to check whether the +// cancellation succeeded or whether the job completed despite cancellation. On +// successful cancellation, the HyperparameterTuningJob is not deleted; instead +// it becomes a job with a HyperparameterTuningJob.error value with a +// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and +// HyperparameterTuningJob.state is set to `CANCELLED`. // -// - parent: The resource name of the EntityType/FeatureGroup to create the -// batch of Features under. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) BatchCreate(parent string, googlecloudaiplatformv1batchcreatefeaturesrequest *GoogleCloudAiplatformV1BatchCreateFeaturesRequest) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchcreatefeaturesrequest = googlecloudaiplatformv1batchcreatefeaturesrequest +// - name: The name of the HyperparameterTuningJob to cancel. Format: +// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar +// ameter_tuning_job}`. +func (r *ProjectsLocationsHyperparameterTuningJobsService) Cancel(name string, googlecloudaiplatformv1cancelhyperparametertuningjobrequest *GoogleCloudAiplatformV1CancelHyperparameterTuningJobRequest) *ProjectsLocationsHyperparameterTuningJobsCancelCall { + c := &ProjectsLocationsHyperparameterTuningJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1cancelhyperparametertuningjobrequest = googlecloudaiplatformv1cancelhyperparametertuningjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { +func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall { +func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcreatefeaturesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelhyperparametertuningjobrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features:batchCreate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -62221,18 +65728,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) doReq } 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 "aiplatform.projects.locations.featurestores.entityTypes.features.batchCreate" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.cancel" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsHyperparameterTuningJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62251,7 +65758,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Do(op 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, @@ -62264,72 +65771,60 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesBatchCreateCall) Do(op return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsHyperparameterTuningJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1hyperparametertuningjob *GoogleCloudAiplatformV1HyperparameterTuningJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new Feature in a given EntityType. +// Create: Creates a HyperparameterTuningJob // -// - parent: The resource name of the EntityType or FeatureGroup to create a -// Feature. Format for entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Create(parent string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to create the +// HyperparameterTuningJob in. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsHyperparameterTuningJobsService) Create(parent string, googlecloudaiplatformv1hyperparametertuningjob *GoogleCloudAiplatformV1HyperparameterTuningJob) *ProjectsLocationsHyperparameterTuningJobsCreateCall { + c := &ProjectsLocationsHyperparameterTuningJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature - return c -} - -// FeatureId sets the optional parameter "featureId": Required. The ID to use -// for the Feature, which will become the final component of the Feature's -// resource name. This value may be up to 128 characters, and valid characters -// are `[a-z0-9_]`. The first character cannot be a number. The value must be -// unique within an EntityType/FeatureGroup. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) FeatureId(featureId string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { - c.urlParams_.Set("featureId", featureId) + c.googlecloudaiplatformv1hyperparametertuningjob = googlecloudaiplatformv1hyperparametertuningjob return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { +func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall { +func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1hyperparametertuningjob) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hyperparameterTuningJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -62342,13 +65837,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.create" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.create" call. // 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 +// *GoogleCloudAiplatformV1HyperparameterTuningJob.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1HyperparameterTuningJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62367,7 +65862,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1HyperparameterTuningJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62380,7 +65875,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesCreateCall) Do(opts .. return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall struct { +type ProjectsLocationsHyperparameterTuningJobsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62388,15 +65883,14 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall struct { header_ http.Header } -// Delete: Deletes a single Feature. +// Delete: Deletes a HyperparameterTuningJob. // -// - name: The name of the Features to be deleted. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}/features/{feature}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat -// ures/{feature}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the HyperparameterTuningJob resource to be deleted. +// Format: +// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar +// ameter_tuning_job}`. +func (r *ProjectsLocationsHyperparameterTuningJobsService) Delete(name string) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { + c := &ProjectsLocationsHyperparameterTuningJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -62404,27 +65898,27 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Delete(name s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { +func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall { +func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -62442,13 +65936,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.delete" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.delete" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62480,7 +65974,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesDeleteCall) Do(opts .. return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall struct { +type ProjectsLocationsHyperparameterTuningJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62489,14 +65983,13 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall struct { header_ http.Header } -// Get: Gets details of a single Feature. +// Get: Gets a HyperparameterTuningJob // -// - name: The name of the Feature resource. Format for entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the HyperparameterTuningJob resource. Format: +// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar +// ameter_tuning_job}`. +func (r *ProjectsLocationsHyperparameterTuningJobsService) Get(name string) *ProjectsLocationsHyperparameterTuningJobsGetCall { + c := &ProjectsLocationsHyperparameterTuningJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -62504,7 +65997,7 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Get(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -62512,27 +66005,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Fields(s ...g // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -62553,13 +66046,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.get" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Feature.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1HyperparameterTuningJob.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1HyperparameterTuningJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62578,7 +66071,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Feature{ + ret := &GoogleCloudAiplatformV1HyperparameterTuningJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62591,7 +66084,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesGetCall) Do(opts ...go return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall struct { +type ProjectsLocationsHyperparameterTuningJobsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -62600,78 +66093,52 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall struct { header_ http.Header } -// List: Lists Features in a given EntityType. +// List: Lists HyperparameterTuningJobs in a Location. // -// - parent: The resource name of the Location to list Features. Format for -// entity_type as parent: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}` Format for feature_group as parent: -// `projects/{project}/locations/{location}/featureGroups/{feature_group}`. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) List(parent string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to list the +// HyperparameterTuningJobs from. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsHyperparameterTuningJobsService) List(parent string) *ProjectsLocationsHyperparameterTuningJobsListCall { + c := &ProjectsLocationsHyperparameterTuningJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Lists the Features that match -// the filter expression. The following filters are supported: * `value_type`: -// Supports = and != comparisons. * `create_time`: Supports =, !=, <, >, >=, -// and <= comparisons. Values must be in RFC 3339 format. * `update_time`: -// Supports =, !=, <, >, >=, and <= comparisons. Values must be in RFC 3339 -// format. * `labels`: Supports key-value equality as well as key presence. -// Examples: * `value_type = DOUBLE` --> Features whose type is DOUBLE. * -// `create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > -// \"2020-01-31T15:30:00.000000Z\" --> EntityTypes created or updated after -// 2020-01-31T15:30:00.000000Z. * `labels.active = yes AND labels.env = prod` -// --> Features having both (active: yes) and (env: prod) labels. * -// `labels.env: *` --> Any Feature which has a label with 'env' as the key. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +// Filter sets the optional parameter "filter": The standard list filter. +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports +// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 +// format. * `labels` supports general map functions that is: +// `labels.key=value` - key:value equality `labels.key:* - key existence Some +// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND +// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR +// display_name="my_job" * `NOT display_name="my_job" * +// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * +// `labels.keyB:*` +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Filter(filter string) *ProjectsLocationsHyperparameterTuningJobsListCall { c.urlParams_.Set("filter", filter) return c } -// LatestStatsCount sets the optional parameter "latestStatsCount": Only -// applicable for Vertex AI Feature Store (Legacy). If set, return the most -// recent ListFeaturesRequest.latest_stats_count of stats for each Feature in -// response. Valid value is [0, 10]. If number of stats exists < -// ListFeaturesRequest.latest_stats_count, return all existing stats. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) LatestStatsCount(latestStatsCount int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { - c.urlParams_.Set("latestStatsCount", fmt.Sprint(latestStatsCount)) - 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: * `feature_id` * `value_type` (Not -// supported for FeatureRegistry Feature) * `create_time` * `update_time` -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) OrderBy(orderBy string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// Features to return. The service may return fewer than this value. If -// unspecified, at most 1000 Features will be returned. The maximum value is -// 1000; any value greater than 1000 will be coerced to 1000. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) PageSize(pageSize int64) *ProjectsLocationsHyperparameterTuningJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous FeaturestoreService.ListFeatures call or -// FeatureRegistryService.ListFeatures call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// FeaturestoreService.ListFeatures or FeatureRegistryService.ListFeatures must -// match the call that provided the page token. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via +// ListHyperparameterTuningJobsResponse.next_page_token of the previous +// JobService.ListHyperparameterTuningJobs call. +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) PageToken(pageToken string) *ProjectsLocationsHyperparameterTuningJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } // ReadMask sets the optional parameter "readMask": Mask specifying which // fields to read. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) ReadMask(readMask string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) ReadMask(readMask string) *ProjectsLocationsHyperparameterTuningJobsListCall { c.urlParams_.Set("readMask", readMask) return c } @@ -62679,7 +66146,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) ReadMask(rea // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -62687,27 +66154,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Fields(s ... // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -62715,7 +66182,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) doRequest(al var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/features") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hyperparameterTuningJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -62728,13 +66195,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.list" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListFeaturesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListFeaturesResponse, error) { +// *GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse.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 *ProjectsLocationsHyperparameterTuningJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -62753,7 +66220,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListFeaturesResponse{ + ret := &GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -62769,7 +66236,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Do(opts ...g // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListFeaturesResponse) error) error { +func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -62787,130 +66254,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesListCall) Pages(ctx co } } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates the parameters of a single Feature. -// -// - name: Immutable. Name of the Feature. Format: -// `projects/{project}/locations/{location}/featurestores/{featurestore}/entit -// yTypes/{entity_type}/features/{feature}` -// `projects/{project}/locations/{location}/featureGroups/{feature_group}/feat -// ures/{feature}` The last part feature is assigned by the client. The -// feature can be up to 64 characters long and can consist only of ASCII -// Latin letters A-Z and a-z, underscore(_), and ASCII digits 0-9 starting -// with a letter. The value will be unique given an entity type. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesService) Patch(name string, googlecloudaiplatformv1feature *GoogleCloudAiplatformV1Feature) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1feature = googlecloudaiplatformv1feature - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Features 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 only the non-empty fields present in the -// request will be overwritten. Set the update_mask to `*` to override all -// fields. Updatable fields: * `description` * `labels` * `disable_monitoring` -// (Not supported for FeatureRegistryService Feature) * `point_of_contact` (Not -// supported for FeaturestoreService FeatureStore) -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1feature) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Feature.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Feature, 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 := &GoogleCloudAiplatformV1Feature{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall struct { +type ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -62929,8 +66273,8 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall struc // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Cancel(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { + c := &ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -62938,27 +66282,27 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Can // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -62976,13 +66320,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.cancel" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63014,7 +66358,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsCancelCall) return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall struct { +type ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63028,8 +66372,8 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall struc // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Delete(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { + c := &ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63037,27 +66381,27 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Del // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -63075,13 +66419,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.delete" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.delete" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63113,7 +66457,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsDeleteCall) return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall struct { +type ProjectsLocationsHyperparameterTuningJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63127,8 +66471,8 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Get(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { + c := &ProjectsLocationsHyperparameterTuningJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63136,7 +66480,7 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Get // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63144,27 +66488,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Fie // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -63185,13 +66529,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.get" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.get" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63223,7 +66567,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsGetCall) Do( return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall struct { +type ProjectsLocationsHyperparameterTuningJobsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63236,28 +66580,28 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall struct // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) List(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) List(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { + c := &ProjectsLocationsHyperparameterTuningJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Filter(filter string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -63265,7 +66609,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Pa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -63273,27 +66617,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Fi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -63314,13 +66658,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) do return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.list" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.list" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63355,7 +66699,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Do // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -63373,7 +66717,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsListCall) Pa } } -type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall struct { +type ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63392,8 +66736,8 @@ type ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall struct // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { - c := &ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Wait(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { + c := &ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63402,7 +66746,7 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsService) Wai // before timing out. If left blank, the wait will be at most the time // permitted by the underlying HTTP/RPC protocol. If RPC context deadline is // also specified, the shorter one will be used. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -63410,27 +66754,27 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Ti // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -63448,13 +66792,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) do return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.features.operations.wait" call. +// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.wait" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63486,60 +66830,59 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesFeaturesOperationsWaitCall) Do return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// Create: Creates an IndexEndpoint. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { - c := &ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create the IndexEndpoint in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsIndexEndpointsService) Create(parent string, googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint) *ProjectsLocationsIndexEndpointsCreateCall { + c := &ProjectsLocationsIndexEndpointsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1indexendpoint = googlecloudaiplatformv1indexendpoint return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { +func (c *ProjectsLocationsIndexEndpointsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall { +func (c *ProjectsLocationsIndexEndpointsCreateCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsIndexEndpointsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1indexendpoint) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexEndpoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -63547,18 +66890,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) doReques } 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 "aiplatform.projects.locations.featurestores.entityTypes.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.create" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsIndexEndpointsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63577,7 +66920,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Do(opts 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, @@ -63590,7 +66933,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsCancelCall) Do(opts return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall struct { +type ProjectsLocationsIndexEndpointsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -63598,14 +66941,12 @@ type ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall struct { 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`. +// Delete: Deletes an IndexEndpoint. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { - c := &ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the IndexEndpoint resource to be deleted. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) Delete(name string) *ProjectsLocationsIndexEndpointsDeleteCall { + c := &ProjectsLocationsIndexEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -63613,27 +66954,27 @@ func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Delete(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -63651,123 +66992,13 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.delete" call. -// 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 *ProjectsLocationsFeaturestoresEntityTypesOperationsDeleteCall) 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 -} - -type ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall 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 *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Get(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { - c := &ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.get" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.delete" call. // 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 *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63799,104 +67030,80 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsDeployIndexCall struct { + s *Service + indexEndpoint string + googlecloudaiplatformv1deployindexrequest *GoogleCloudAiplatformV1DeployIndexRequest + 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`. +// DeployIndex: Deploys an Index into this IndexEndpoint, creating a +// DeployedIndex within it. Only non-empty Indexes can be deployed. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) List(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { - c := &ProjectsLocationsFeaturestoresEntityTypesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - indexEndpoint: The name of the IndexEndpoint resource into which to deploy +// an Index. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) DeployIndex(indexEndpoint string, googlecloudaiplatformv1deployindexrequest *GoogleCloudAiplatformV1DeployIndexRequest) *ProjectsLocationsIndexEndpointsDeployIndexCall { + c := &ProjectsLocationsIndexEndpointsDeployIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.indexEndpoint = indexEndpoint + c.googlecloudaiplatformv1deployindexrequest = googlecloudaiplatformv1deployindexrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { +func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsDeployIndexCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall { +func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsDeployIndexCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deployindexrequest) + if err != nil { + return nil, err + } 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/{+indexEndpoint}:deployIndex") 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, + "indexEndpoint": c.indexEndpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.list" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.deployIndex" call. // 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 +// *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 *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -63915,7 +67122,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Do(opts .. 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, @@ -63923,95 +67130,65 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Do(opts .. } target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) + return nil, err } + return ret, nil } -type ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsFindNeighborsCall struct { + s *Service + indexEndpoint string + googlecloudaiplatformv1findneighborsrequest *GoogleCloudAiplatformV1FindNeighborsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// FindNeighbors: Finds the nearest neighbors of each vector within the +// request. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeaturestoresEntityTypesOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { - c := &ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - indexEndpoint: The name of the index endpoint. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) FindNeighbors(indexEndpoint string, googlecloudaiplatformv1findneighborsrequest *GoogleCloudAiplatformV1FindNeighborsRequest) *ProjectsLocationsIndexEndpointsFindNeighborsCall { + c := &ProjectsLocationsIndexEndpointsFindNeighborsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.indexEndpoint = indexEndpoint + c.googlecloudaiplatformv1findneighborsrequest = googlecloudaiplatformv1findneighborsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { +func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsFindNeighborsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall { +func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsFindNeighborsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1findneighborsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:findNeighbors") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -64019,18 +67196,18 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) doRequest( } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "indexEndpoint": c.indexEndpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.entityTypes.operations.wait" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.findNeighbors" call. // 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 +// *GoogleCloudAiplatformV1FindNeighborsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FindNeighborsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64049,7 +67226,7 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1FindNeighborsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64062,27 +67239,21 @@ func (c *ProjectsLocationsFeaturestoresEntityTypesOperationsWaitCall) Do(opts .. return ret, nil } -type ProjectsLocationsFeaturestoresOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// Get: Gets an IndexEndpoint. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsFeaturestoresOperationsService) Cancel(name string) *ProjectsLocationsFeaturestoresOperationsCancelCall { - c := &ProjectsLocationsFeaturestoresOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the IndexEndpoint resource. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) Get(name string) *ProjectsLocationsIndexEndpointsGetCall { + c := &ProjectsLocationsIndexEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -64090,34 +67261,45 @@ func (r *ProjectsLocationsFeaturestoresOperationsService) Cancel(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsCancelCall { +func (c *ProjectsLocationsIndexEndpointsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsIndexEndpointsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsCancelCall { +func (c *ProjectsLocationsIndexEndpointsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + 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 } @@ -64128,13 +67310,13 @@ func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.get" call. // 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 *ProjectsLocationsFeaturestoresOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1IndexEndpoint.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsIndexEndpointsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1IndexEndpoint, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64153,7 +67335,7 @@ func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1IndexEndpoint{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64166,74 +67348,122 @@ func (c *ProjectsLocationsFeaturestoresOperationsCancelCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsFeaturestoresOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsListCall struct { + s *Service + parent 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`. +// List: Lists IndexEndpoints in a Location. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsFeaturestoresOperationsService) Delete(name string) *ProjectsLocationsFeaturestoresOperationsDeleteCall { - c := &ProjectsLocationsFeaturestoresOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location from which to list the +// IndexEndpoints. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsIndexEndpointsService) List(parent string) *ProjectsLocationsIndexEndpointsListCall { + c := &ProjectsLocationsIndexEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `index_endpoint` supports = and !=. `index_endpoint` represents +// the IndexEndpoint ID, ie. the last segment of the IndexEndpoint's +// resourcename. * `display_name` supports =, != and regex() (uses re2 +// (https://github.com/google/re2/wiki/Syntax) syntax) * `labels` supports +// general map functions that is: `labels.key=value` - key:value equality +// `labels.key:* or labels:key - key existence A key including a space must be +// quoted. `labels."a key". Some examples: * `index_endpoint="1" * +// `display_name="myDisplayName" * `regex(display_name, "^A") -> The display +// name starts with an A. * `labels.myKey="myValue" +func (c *ProjectsLocationsIndexEndpointsListCall) Filter(filter string) *ProjectsLocationsIndexEndpointsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsIndexEndpointsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexEndpointsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListIndexEndpointsResponse.next_page_token of +// the previous IndexEndpointService.ListIndexEndpoints call. +func (c *ProjectsLocationsIndexEndpointsListCall) PageToken(pageToken string) *ProjectsLocationsIndexEndpointsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsIndexEndpointsListCall) ReadMask(readMask string) *ProjectsLocationsIndexEndpointsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsIndexEndpointsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsListCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexEndpoints") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.operations.delete" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.list" call. // 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 *ProjectsLocationsFeaturestoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListIndexEndpointsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsIndexEndpointsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListIndexEndpointsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64252,7 +67482,7 @@ func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListIndexEndpointsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64265,85 +67495,101 @@ func (c *ProjectsLocationsFeaturestoresOperationsDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsFeaturestoresOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsIndexEndpointsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListIndexEndpointsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// 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. +type ProjectsLocationsIndexEndpointsMutateDeployedIndexCall struct { + s *Service + indexEndpoint string + googlecloudaiplatformv1deployedindex *GoogleCloudAiplatformV1DeployedIndex + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MutateDeployedIndex: Update an existing DeployedIndex under an +// IndexEndpoint. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsFeaturestoresOperationsService) Get(name string) *ProjectsLocationsFeaturestoresOperationsGetCall { - c := &ProjectsLocationsFeaturestoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - indexEndpoint: The name of the IndexEndpoint resource into which to deploy +// an Index. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) MutateDeployedIndex(indexEndpoint string, googlecloudaiplatformv1deployedindex *GoogleCloudAiplatformV1DeployedIndex) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { + c := &ProjectsLocationsIndexEndpointsMutateDeployedIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.indexEndpoint = indexEndpoint + c.googlecloudaiplatformv1deployedindex = googlecloudaiplatformv1deployedindex return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsGetCall { +func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsGetCall { +func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deployedindex) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:mutateDeployedIndex") 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, + "indexEndpoint": c.indexEndpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.operations.get" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.mutateDeployedIndex" call. // 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 *ProjectsLocationsFeaturestoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64375,87 +67621,67 @@ func (c *ProjectsLocationsFeaturestoresOperationsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsFeaturestoresOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint + 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`. +// Patch: Updates an IndexEndpoint. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsFeaturestoresOperationsService) List(name string) *ProjectsLocationsFeaturestoresOperationsListCall { - c := &ProjectsLocationsFeaturestoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The resource name of the IndexEndpoint. +func (r *ProjectsLocationsIndexEndpointsService) Patch(name string, googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint) *ProjectsLocationsIndexEndpointsPatchCall { + c := &ProjectsLocationsIndexEndpointsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1indexendpoint = googlecloudaiplatformv1indexendpoint return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) Filter(filter string) *ProjectsLocationsFeaturestoresOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsFeaturestoresOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsFeaturestoresOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. See google.protobuf.FieldMask. +func (c *ProjectsLocationsIndexEndpointsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsIndexEndpointsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsListCall { +func (c *ProjectsLocationsIndexEndpointsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFeaturestoresOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsListCall { +func (c *ProjectsLocationsIndexEndpointsPatchCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsIndexEndpointsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1indexendpoint) + if err != nil { + return nil, err + } 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/{+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 } @@ -64466,13 +67692,13 @@ func (c *ProjectsLocationsFeaturestoresOperationsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.operations.list" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1IndexEndpoint.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsIndexEndpointsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1IndexEndpoint, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64491,7 +67717,7 @@ func (c *ProjectsLocationsFeaturestoresOperationsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1IndexEndpoint{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64504,90 +67730,60 @@ func (c *ProjectsLocationsFeaturestoresOperationsListCall) Do(opts ...googleapi. return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsFeaturestoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsFeaturestoresOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsReadIndexDatapointsCall struct { + s *Service + indexEndpoint string + googlecloudaiplatformv1readindexdatapointsrequest *GoogleCloudAiplatformV1ReadIndexDatapointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// ReadIndexDatapoints: Reads the datapoints/vectors of the given IDs. A +// maximum of 1000 datapoints can be retrieved in a batch. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsFeaturestoresOperationsService) Wait(name string) *ProjectsLocationsFeaturestoresOperationsWaitCall { - c := &ProjectsLocationsFeaturestoresOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsFeaturestoresOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - indexEndpoint: The name of the index endpoint. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) ReadIndexDatapoints(indexEndpoint string, googlecloudaiplatformv1readindexdatapointsrequest *GoogleCloudAiplatformV1ReadIndexDatapointsRequest) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { + c := &ProjectsLocationsIndexEndpointsReadIndexDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.indexEndpoint = indexEndpoint + c.googlecloudaiplatformv1readindexdatapointsrequest = googlecloudaiplatformv1readindexdatapointsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsFeaturestoresOperationsWaitCall { +func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsFeaturestoresOperationsWaitCall { +func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1readindexdatapointsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:readIndexDatapoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -64595,18 +67791,18 @@ func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "indexEndpoint": c.indexEndpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.featurestores.operations.wait" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.readIndexDatapoints" call. // 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 +// *GoogleCloudAiplatformV1ReadIndexDatapointsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadIndexDatapointsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64625,7 +67821,7 @@ func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ReadIndexDatapointsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64638,68 +67834,61 @@ func (c *ProjectsLocationsFeaturestoresOperationsWaitCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelhyperparametertuningjobrequest *GoogleCloudAiplatformV1CancelHyperparameterTuningJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsUndeployIndexCall struct { + s *Service + indexEndpoint string + googlecloudaiplatformv1undeployindexrequest *GoogleCloudAiplatformV1UndeployIndexRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a HyperparameterTuningJob. Starts asynchronous cancellation -// on the HyperparameterTuningJob. The server makes a best effort to cancel the -// job, but success is not guaranteed. Clients can use -// JobService.GetHyperparameterTuningJob or other methods to check whether the -// cancellation succeeded or whether the job completed despite cancellation. On -// successful cancellation, the HyperparameterTuningJob is not deleted; instead -// it becomes a job with a HyperparameterTuningJob.error value with a -// google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`, and -// HyperparameterTuningJob.state is set to `CANCELLED`. +// UndeployIndex: Undeploys an Index from an IndexEndpoint, removing a +// DeployedIndex from it, and freeing all resources it's using. // -// - name: The name of the HyperparameterTuningJob to cancel. Format: -// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar -// ameter_tuning_job}`. -func (r *ProjectsLocationsHyperparameterTuningJobsService) Cancel(name string, googlecloudaiplatformv1cancelhyperparametertuningjobrequest *GoogleCloudAiplatformV1CancelHyperparameterTuningJobRequest) *ProjectsLocationsHyperparameterTuningJobsCancelCall { - c := &ProjectsLocationsHyperparameterTuningJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1cancelhyperparametertuningjobrequest = googlecloudaiplatformv1cancelhyperparametertuningjobrequest +// - indexEndpoint: The name of the IndexEndpoint resource from which to +// undeploy an Index. Format: +// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. +func (r *ProjectsLocationsIndexEndpointsService) UndeployIndex(indexEndpoint string, googlecloudaiplatformv1undeployindexrequest *GoogleCloudAiplatformV1UndeployIndexRequest) *ProjectsLocationsIndexEndpointsUndeployIndexCall { + c := &ProjectsLocationsIndexEndpointsUndeployIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.indexEndpoint = indexEndpoint + c.googlecloudaiplatformv1undeployindexrequest = googlecloudaiplatformv1undeployindexrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsCancelCall { +func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsUndeployIndexCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsCancelCall { +func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsUndeployIndexCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelhyperparametertuningjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1undeployindexrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:undeployIndex") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -64707,18 +67896,18 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) doRequest(alt stri } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "indexEndpoint": c.indexEndpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.cancel" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.undeployIndex" call. // 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 *ProjectsLocationsHyperparameterTuningJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsIndexEndpointsUndeployIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64737,7 +67926,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Do(opts ...googlea 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, @@ -64750,60 +67939,60 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCancelCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1hyperparametertuningjob *GoogleCloudAiplatformV1HyperparameterTuningJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexEndpointsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a HyperparameterTuningJob +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - parent: The resource name of the Location to create the -// HyperparameterTuningJob in. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsHyperparameterTuningJobsService) Create(parent string, googlecloudaiplatformv1hyperparametertuningjob *GoogleCloudAiplatformV1HyperparameterTuningJob) *ProjectsLocationsHyperparameterTuningJobsCreateCall { - c := &ProjectsLocationsHyperparameterTuningJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1hyperparametertuningjob = googlecloudaiplatformv1hyperparametertuningjob +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsIndexEndpointsOperationsService) Cancel(name string) *ProjectsLocationsIndexEndpointsOperationsCancelCall { + c := &ProjectsLocationsIndexEndpointsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsCreateCall { +func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsCreateCall { +func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1hyperparametertuningjob) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/hyperparameterTuningJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -64811,18 +68000,18 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) doRequest(alt stri } 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 "aiplatform.projects.locations.hyperparameterTuningJobs.create" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1HyperparameterTuningJob.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1HyperparameterTuningJob, error) { +// *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 *ProjectsLocationsIndexEndpointsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64841,7 +68030,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1HyperparameterTuningJob{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -64854,7 +68043,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsCreateCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsDeleteCall struct { +type ProjectsLocationsIndexEndpointsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -64862,14 +68051,14 @@ type ProjectsLocationsHyperparameterTuningJobsDeleteCall struct { header_ http.Header } -// Delete: Deletes a HyperparameterTuningJob. +// 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 HyperparameterTuningJob resource to be deleted. -// Format: -// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar -// ameter_tuning_job}`. -func (r *ProjectsLocationsHyperparameterTuningJobsService) Delete(name string) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { - c := &ProjectsLocationsHyperparameterTuningJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsIndexEndpointsOperationsService) Delete(name string) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { + c := &ProjectsLocationsIndexEndpointsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -64877,27 +68066,27 @@ func (r *ProjectsLocationsHyperparameterTuningJobsService) Delete(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsDeleteCall { +func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -64915,13 +68104,13 @@ func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.delete" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.delete" call. // 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 *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -64940,7 +68129,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Do(opts ...googlea 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, @@ -64953,7 +68142,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsGetCall struct { +type ProjectsLocationsIndexEndpointsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -64962,13 +68151,13 @@ type ProjectsLocationsHyperparameterTuningJobsGetCall struct { header_ http.Header } -// Get: Gets a HyperparameterTuningJob +// 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 HyperparameterTuningJob resource. Format: -// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperpar -// ameter_tuning_job}`. -func (r *ProjectsLocationsHyperparameterTuningJobsService) Get(name string) *ProjectsLocationsHyperparameterTuningJobsGetCall { - c := &ProjectsLocationsHyperparameterTuningJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsIndexEndpointsOperationsService) Get(name string) *ProjectsLocationsIndexEndpointsOperationsGetCall { + c := &ProjectsLocationsIndexEndpointsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -64976,7 +68165,7 @@ func (r *ProjectsLocationsHyperparameterTuningJobsService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsGetCall { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -64984,27 +68173,27 @@ func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsGetCall { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsGetCall { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -65025,13 +68214,13 @@ func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.get" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1HyperparameterTuningJob.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsHyperparameterTuningJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1HyperparameterTuningJob, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65050,7 +68239,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1HyperparameterTuningJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -65063,69 +68252,49 @@ func (c *ProjectsLocationsHyperparameterTuningJobsGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsListCall struct { +type ProjectsLocationsIndexEndpointsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists HyperparameterTuningJobs in a Location. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the Location to list the -// HyperparameterTuningJobs from. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsHyperparameterTuningJobsService) List(parent string) *ProjectsLocationsHyperparameterTuningJobsListCall { - c := &ProjectsLocationsHyperparameterTuningJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsIndexEndpointsOperationsService) List(name string) *ProjectsLocationsIndexEndpointsOperationsListCall { + c := &ProjectsLocationsIndexEndpointsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports -// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 -// format. * `labels` supports general map functions that is: -// `labels.key=value` - key:value equality `labels.key:* - key existence Some -// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND -// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR -// display_name="my_job" * `NOT display_name="my_job" * -// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * -// `labels.keyB:*` -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Filter(filter string) *ProjectsLocationsHyperparameterTuningJobsListCall { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Filter(filter string) *ProjectsLocationsIndexEndpointsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) PageSize(pageSize int64) *ProjectsLocationsHyperparameterTuningJobsListCall { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexEndpointsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via -// ListHyperparameterTuningJobsResponse.next_page_token of the previous -// JobService.ListHyperparameterTuningJobs call. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) PageToken(pageToken string) *ProjectsLocationsHyperparameterTuningJobsListCall { +// token. +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsIndexEndpointsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) ReadMask(readMask string) *ProjectsLocationsHyperparameterTuningJobsListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsListCall { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -65133,27 +68302,27 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Fields(s ...googleap // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsListCall { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsListCall { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -65161,7 +68330,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) 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/{+parent}/hyperparameterTuningJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -65169,18 +68338,18 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) doRequest(alt string } 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 "aiplatform.projects.locations.hyperparameterTuningJobs.list" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse.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 *ProjectsLocationsHyperparameterTuningJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse, 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 *ProjectsLocationsIndexEndpointsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65199,7 +68368,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -65215,7 +68384,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Do(opts ...googleapi // 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 *ProjectsLocationsHyperparameterTuningJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListHyperparameterTuningJobsResponse) error) error { +func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -65233,111 +68402,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsListCall) Pages(ctx context.Co } } -type ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. -// -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Cancel(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { - c := &ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.cancel" call. -// 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 *ProjectsLocationsHyperparameterTuningJobsOperationsCancelCall) 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 -} - -type ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall struct { +type ProjectsLocationsIndexEndpointsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -65345,159 +68410,63 @@ type ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall struct { 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 *ProjectsLocationsHyperparameterTuningJobsOperationsService) Delete(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { - c := &ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.delete" call. -// 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 *ProjectsLocationsHyperparameterTuningJobsOperationsDeleteCall) 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 -} - -type ProjectsLocationsHyperparameterTuningJobsOperationsGetCall 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. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Get(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { - c := &ProjectsLocationsHyperparameterTuningJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsIndexEndpointsOperationsService) Wait(name string) *ProjectsLocationsIndexEndpointsOperationsWaitCall { + c := &ProjectsLocationsIndexEndpointsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsIndexEndpointsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { - c.ifNoneMatch_ = entityTag + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsWaitCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall { +func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -65508,13 +68477,13 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.wait" call. // 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 *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65546,104 +68515,78 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsHyperparameterTuningJobsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index + 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`. +// Create: Creates an Index. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) List(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { - c := &ProjectsLocationsHyperparameterTuningJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Filter(filter string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - parent: The resource name of the Location to create the Index in. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsIndexesService) Create(parent string, googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index) *ProjectsLocationsIndexesCreateCall { + c := &ProjectsLocationsIndexesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1index = googlecloudaiplatformv1index return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { +func (c *ProjectsLocationsIndexesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsListCall { +func (c *ProjectsLocationsIndexesCreateCall) Context(ctx context.Context) *ProjectsLocationsIndexesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsIndexesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsIndexesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1index) + if err != nil { + return nil, err + } 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}/indexes") 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 "aiplatform.projects.locations.hyperparameterTuningJobs.operations.list" call. +// Do executes the "aiplatform.projects.locations.indexes.create" call. // 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 +// *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 *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsIndexesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65662,7 +68605,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Do(opts .. 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, @@ -65675,28 +68618,7 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Do(opts .. return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall struct { +type ProjectsLocationsIndexesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -65704,63 +68626,48 @@ type ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall struct { header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// Delete: Deletes an Index. An Index can only be deleted when all its +// DeployedIndexes had been undeployed. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsHyperparameterTuningJobsOperationsService) Wait(name string) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { - c := &ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Index resource to be deleted. Format: +// `projects/{project}/locations/{location}/indexes/{index}`. +func (r *ProjectsLocationsIndexesService) Delete(name string) *ProjectsLocationsIndexesDeleteCall { + c := &ProjectsLocationsIndexesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { +func (c *ProjectsLocationsIndexesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall { +func (c *ProjectsLocationsIndexesDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsIndexesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + 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 } @@ -65771,13 +68678,13 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.hyperparameterTuningJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.indexes.delete" call. // 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 *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65809,78 +68716,84 @@ func (c *ProjectsLocationsHyperparameterTuningJobsOperationsWaitCall) Do(opts .. return ret, nil } -type ProjectsLocationsIndexEndpointsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Creates an IndexEndpoint. +// Get: Gets an Index. // -// - parent: The resource name of the Location to create the IndexEndpoint in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsIndexEndpointsService) Create(parent string, googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint) *ProjectsLocationsIndexEndpointsCreateCall { - c := &ProjectsLocationsIndexEndpointsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1indexendpoint = googlecloudaiplatformv1indexendpoint +// - name: The name of the Index resource. Format: +// `projects/{project}/locations/{location}/indexes/{index}`. +func (r *ProjectsLocationsIndexesService) Get(name string) *ProjectsLocationsIndexesGetCall { + c := &ProjectsLocationsIndexesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsCreateCall { +func (c *ProjectsLocationsIndexesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsIndexesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsCreateCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsCreateCall { +func (c *ProjectsLocationsIndexesGetCall) Context(ctx context.Context) *ProjectsLocationsIndexesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsCreateCall) Header() http.Header { +func (c *ProjectsLocationsIndexesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1indexendpoint) - if err != nil { - return nil, err +func (c *ProjectsLocationsIndexesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexEndpoints") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.create" call. +// Do executes the "aiplatform.projects.locations.indexes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Index.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexEndpointsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Index, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65899,7 +68812,7 @@ func (c *ProjectsLocationsIndexEndpointsCreateCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1Index{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -65912,72 +68825,112 @@ func (c *ProjectsLocationsIndexEndpointsCreateCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsIndexEndpointsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes an IndexEndpoint. +// List: Lists Indexes in a Location. // -// - name: The name of the IndexEndpoint resource to be deleted. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) Delete(name string) *ProjectsLocationsIndexEndpointsDeleteCall { - c := &ProjectsLocationsIndexEndpointsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location from which to list the Indexes. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsIndexesService) List(parent string) *ProjectsLocationsIndexesListCall { + c := &ProjectsLocationsIndexesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsIndexesListCall) Filter(filter string) *ProjectsLocationsIndexesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsIndexesListCall) PageSize(pageSize int64) *ProjectsLocationsIndexesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListIndexesResponse.next_page_token of the +// previous IndexService.ListIndexes call. +func (c *ProjectsLocationsIndexesListCall) PageToken(pageToken string) *ProjectsLocationsIndexesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsIndexesListCall) ReadMask(readMask string) *ProjectsLocationsIndexesListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsDeleteCall { +func (c *ProjectsLocationsIndexesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsIndexesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsDeleteCall { +func (c *ProjectsLocationsIndexesListCall) Context(ctx context.Context) *ProjectsLocationsIndexesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsIndexesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.delete" call. +// Do executes the "aiplatform.projects.locations.indexes.list" call. // 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 +// *GoogleCloudAiplatformV1ListIndexesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexEndpointsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListIndexesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -65996,7 +68949,7 @@ func (c *ProjectsLocationsIndexEndpointsDeleteCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListIndexesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66009,80 +68962,106 @@ func (c *ProjectsLocationsIndexEndpointsDeleteCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsIndexEndpointsDeployIndexCall struct { - s *Service - indexEndpoint string - googlecloudaiplatformv1deployindexrequest *GoogleCloudAiplatformV1DeployIndexRequest - 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 *ProjectsLocationsIndexesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListIndexesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// DeployIndex: Deploys an Index into this IndexEndpoint, creating a -// DeployedIndex within it. Only non-empty Indexes can be deployed. +type ProjectsLocationsIndexesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an Index. // -// - indexEndpoint: The name of the IndexEndpoint resource into which to deploy -// an Index. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) DeployIndex(indexEndpoint string, googlecloudaiplatformv1deployindexrequest *GoogleCloudAiplatformV1DeployIndexRequest) *ProjectsLocationsIndexEndpointsDeployIndexCall { - c := &ProjectsLocationsIndexEndpointsDeployIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.indexEndpoint = indexEndpoint - c.googlecloudaiplatformv1deployindexrequest = googlecloudaiplatformv1deployindexrequest +// - name: Output only. The resource name of the Index. +func (r *ProjectsLocationsIndexesService) Patch(name string, googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index) *ProjectsLocationsIndexesPatchCall { + c := &ProjectsLocationsIndexesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1index = googlecloudaiplatformv1index + return c +} + +// UpdateMask sets the optional parameter "updateMask": The update mask applies +// to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. +func (c *ProjectsLocationsIndexesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsIndexesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsDeployIndexCall { +func (c *ProjectsLocationsIndexesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsDeployIndexCall { +func (c *ProjectsLocationsIndexesPatchCall) Context(ctx context.Context) *ProjectsLocationsIndexesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Header() http.Header { +func (c *ProjectsLocationsIndexesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deployindexrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1index) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:deployIndex") + 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{ - "indexEndpoint": c.indexEndpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.deployIndex" call. +// Do executes the "aiplatform.projects.locations.indexes.patch" call. // 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 *ProjectsLocationsIndexEndpointsDeployIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66114,60 +69093,59 @@ func (c *ProjectsLocationsIndexEndpointsDeployIndexCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsIndexEndpointsFindNeighborsCall struct { - s *Service - indexEndpoint string - googlecloudaiplatformv1findneighborsrequest *GoogleCloudAiplatformV1FindNeighborsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesRemoveDatapointsCall struct { + s *Service + index string + googlecloudaiplatformv1removedatapointsrequest *GoogleCloudAiplatformV1RemoveDatapointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// FindNeighbors: Finds the nearest neighbors of each vector within the -// request. +// RemoveDatapoints: Remove Datapoints from an Index. // -// - indexEndpoint: The name of the index endpoint. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) FindNeighbors(indexEndpoint string, googlecloudaiplatformv1findneighborsrequest *GoogleCloudAiplatformV1FindNeighborsRequest) *ProjectsLocationsIndexEndpointsFindNeighborsCall { - c := &ProjectsLocationsIndexEndpointsFindNeighborsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.indexEndpoint = indexEndpoint - c.googlecloudaiplatformv1findneighborsrequest = googlecloudaiplatformv1findneighborsrequest +// - index: The name of the Index resource to be updated. Format: +// `projects/{project}/locations/{location}/indexes/{index}`. +func (r *ProjectsLocationsIndexesService) RemoveDatapoints(index string, googlecloudaiplatformv1removedatapointsrequest *GoogleCloudAiplatformV1RemoveDatapointsRequest) *ProjectsLocationsIndexesRemoveDatapointsCall { + c := &ProjectsLocationsIndexesRemoveDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.index = index + c.googlecloudaiplatformv1removedatapointsrequest = googlecloudaiplatformv1removedatapointsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsFindNeighborsCall { +func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesRemoveDatapointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsFindNeighborsCall { +func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexesRemoveDatapointsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Header() http.Header { +func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexesRemoveDatapointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1findneighborsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1removedatapointsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:findNeighbors") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+index}:removeDatapoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -66175,18 +69153,18 @@ func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "indexEndpoint": c.indexEndpoint, + "index": c.index, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.findNeighbors" call. +// Do executes the "aiplatform.projects.locations.indexes.removeDatapoints" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1FindNeighborsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1RemoveDatapointsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1FindNeighborsResponse, error) { +func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RemoveDatapointsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66205,7 +69183,7 @@ func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1FindNeighborsResponse{ + ret := &GoogleCloudAiplatformV1RemoveDatapointsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66218,84 +69196,78 @@ func (c *ProjectsLocationsIndexEndpointsFindNeighborsCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsIndexEndpointsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesUpsertDatapointsCall struct { + s *Service + index string + googlecloudaiplatformv1upsertdatapointsrequest *GoogleCloudAiplatformV1UpsertDatapointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets an IndexEndpoint. +// UpsertDatapoints: Add/update Datapoints into an Index. // -// - name: The name of the IndexEndpoint resource. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) Get(name string) *ProjectsLocationsIndexEndpointsGetCall { - c := &ProjectsLocationsIndexEndpointsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - index: The name of the Index resource to be updated. Format: +// `projects/{project}/locations/{location}/indexes/{index}`. +func (r *ProjectsLocationsIndexesService) UpsertDatapoints(index string, googlecloudaiplatformv1upsertdatapointsrequest *GoogleCloudAiplatformV1UpsertDatapointsRequest) *ProjectsLocationsIndexesUpsertDatapointsCall { + c := &ProjectsLocationsIndexesUpsertDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.index = index + c.googlecloudaiplatformv1upsertdatapointsrequest = googlecloudaiplatformv1upsertdatapointsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsGetCall { +func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesUpsertDatapointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsIndexEndpointsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsGetCall { +func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexesUpsertDatapointsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsGetCall) Header() http.Header { +func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) +func (c *ProjectsLocationsIndexesUpsertDatapointsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1upsertdatapointsrequest) + if err != nil { + return nil, err } - 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/{+index}:upsertDatapoints") 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, + "index": c.index, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.get" call. +// Do executes the "aiplatform.projects.locations.indexes.upsertDatapoints" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1IndexEndpoint.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1UpsertDatapointsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexEndpointsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1IndexEndpoint, error) { +func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1UpsertDatapointsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66314,7 +69286,7 @@ func (c *ProjectsLocationsIndexEndpointsGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1IndexEndpoint{ + ret := &GoogleCloudAiplatformV1UpsertDatapointsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66327,122 +69299,79 @@ func (c *ProjectsLocationsIndexEndpointsGetCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsIndexEndpointsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists IndexEndpoints in a Location. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - parent: The resource name of the Location from which to list the -// IndexEndpoints. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsIndexEndpointsService) List(parent string) *ProjectsLocationsIndexEndpointsListCall { - c := &ProjectsLocationsIndexEndpointsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `index_endpoint` supports = and !=. `index_endpoint` represents -// the IndexEndpoint ID, ie. the last segment of the IndexEndpoint's -// resourcename. * `display_name` supports =, != and regex() (uses re2 -// (https://github.com/google/re2/wiki/Syntax) syntax) * `labels` supports -// general map functions that is: `labels.key=value` - key:value equality -// `labels.key:* or labels:key - key existence A key including a space must be -// quoted. `labels."a key". Some examples: * `index_endpoint="1" * -// `display_name="myDisplayName" * `regex(display_name, "^A") -> The display -// name starts with an A. * `labels.myKey="myValue" -func (c *ProjectsLocationsIndexEndpointsListCall) Filter(filter string) *ProjectsLocationsIndexEndpointsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsIndexEndpointsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexEndpointsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListIndexEndpointsResponse.next_page_token of -// the previous IndexEndpointService.ListIndexEndpoints call. -func (c *ProjectsLocationsIndexEndpointsListCall) PageToken(pageToken string) *ProjectsLocationsIndexEndpointsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsIndexEndpointsListCall) ReadMask(readMask string) *ProjectsLocationsIndexEndpointsListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsIndexesOperationsService) Cancel(name string) *ProjectsLocationsIndexesOperationsCancelCall { + c := &ProjectsLocationsIndexesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsListCall { +func (c *ProjectsLocationsIndexesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsIndexEndpointsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsListCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsListCall { +func (c *ProjectsLocationsIndexesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsListCall) Header() http.Header { +func (c *ProjectsLocationsIndexesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsIndexesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexEndpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") 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 "aiplatform.projects.locations.indexEndpoints.list" call. +// Do executes the "aiplatform.projects.locations.indexes.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListIndexEndpointsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexEndpointsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListIndexEndpointsResponse, error) { +// *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 *ProjectsLocationsIndexesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66461,7 +69390,7 @@ func (c *ProjectsLocationsIndexEndpointsListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListIndexEndpointsResponse{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66474,101 +69403,74 @@ func (c *ProjectsLocationsIndexEndpointsListCall) Do(opts ...googleapi.CallOptio return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsIndexEndpointsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListIndexEndpointsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsIndexEndpointsMutateDeployedIndexCall struct { - s *Service - indexEndpoint string - googlecloudaiplatformv1deployedindex *GoogleCloudAiplatformV1DeployedIndex - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// MutateDeployedIndex: Update an existing DeployedIndex under an -// IndexEndpoint. +// 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`. // -// - indexEndpoint: The name of the IndexEndpoint resource into which to deploy -// an Index. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) MutateDeployedIndex(indexEndpoint string, googlecloudaiplatformv1deployedindex *GoogleCloudAiplatformV1DeployedIndex) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { - c := &ProjectsLocationsIndexEndpointsMutateDeployedIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.indexEndpoint = indexEndpoint - c.googlecloudaiplatformv1deployedindex = googlecloudaiplatformv1deployedindex +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsIndexesOperationsService) Delete(name string) *ProjectsLocationsIndexesOperationsDeleteCall { + c := &ProjectsLocationsIndexesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { +func (c *ProjectsLocationsIndexesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall { +func (c *ProjectsLocationsIndexesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Header() http.Header { +func (c *ProjectsLocationsIndexesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsIndexesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1deployedindex) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:mutateDeployedIndex") + 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{ - "indexEndpoint": c.indexEndpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.mutateDeployedIndex" call. +// Do executes the "aiplatform.projects.locations.indexes.operations.delete" call. // 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 *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsIndexesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66587,7 +69489,7 @@ func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Do(opts ...goog 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, @@ -66600,67 +69502,68 @@ func (c *ProjectsLocationsIndexEndpointsMutateDeployedIndexCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsIndexEndpointsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates an IndexEndpoint. +// 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: Output only. The resource name of the IndexEndpoint. -func (r *ProjectsLocationsIndexEndpointsService) Patch(name string, googlecloudaiplatformv1indexendpoint *GoogleCloudAiplatformV1IndexEndpoint) *ProjectsLocationsIndexEndpointsPatchCall { - c := &ProjectsLocationsIndexEndpointsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsIndexesOperationsService) Get(name string) *ProjectsLocationsIndexesOperationsGetCall { + c := &ProjectsLocationsIndexesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1indexendpoint = googlecloudaiplatformv1indexendpoint - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. See google.protobuf.FieldMask. -func (c *ProjectsLocationsIndexEndpointsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsIndexEndpointsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsPatchCall { +func (c *ProjectsLocationsIndexesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsIndexesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsPatchCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsPatchCall { +func (c *ProjectsLocationsIndexesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsPatchCall) Header() http.Header { +func (c *ProjectsLocationsIndexesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1indexendpoint) - if err != nil { - return nil, err +func (c *ProjectsLocationsIndexesOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -66671,13 +69574,13 @@ func (c *ProjectsLocationsIndexEndpointsPatchCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.patch" call. +// Do executes the "aiplatform.projects.locations.indexes.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1IndexEndpoint.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsIndexEndpointsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1IndexEndpoint, error) { +func (c *ProjectsLocationsIndexesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66696,7 +69599,7 @@ func (c *ProjectsLocationsIndexEndpointsPatchCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1IndexEndpoint{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66709,79 +69612,104 @@ func (c *ProjectsLocationsIndexEndpointsPatchCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsIndexEndpointsReadIndexDatapointsCall struct { - s *Service - indexEndpoint string - googlecloudaiplatformv1readindexdatapointsrequest *GoogleCloudAiplatformV1ReadIndexDatapointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsIndexesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ReadIndexDatapoints: Reads the datapoints/vectors of the given IDs. A -// maximum of 1000 datapoints can be retrieved in a batch. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - indexEndpoint: The name of the index endpoint. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) ReadIndexDatapoints(indexEndpoint string, googlecloudaiplatformv1readindexdatapointsrequest *GoogleCloudAiplatformV1ReadIndexDatapointsRequest) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { - c := &ProjectsLocationsIndexEndpointsReadIndexDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.indexEndpoint = indexEndpoint - c.googlecloudaiplatformv1readindexdatapointsrequest = googlecloudaiplatformv1readindexdatapointsrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsIndexesOperationsService) List(name string) *ProjectsLocationsIndexesOperationsListCall { + c := &ProjectsLocationsIndexesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsIndexesOperationsListCall) Filter(filter string) *ProjectsLocationsIndexesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsIndexesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsIndexesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsIndexesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { +func (c *ProjectsLocationsIndexesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsIndexesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall { +func (c *ProjectsLocationsIndexesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Header() http.Header { +func (c *ProjectsLocationsIndexesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1readindexdatapointsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsIndexesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:readIndexDatapoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 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{ - "indexEndpoint": c.indexEndpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.readIndexDatapoints" call. +// Do executes the "aiplatform.projects.locations.indexes.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ReadIndexDatapointsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ReadIndexDatapointsResponse, error) { +func (c *ProjectsLocationsIndexesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66800,7 +69728,7 @@ func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ReadIndexDatapointsResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -66813,61 +69741,90 @@ func (c *ProjectsLocationsIndexEndpointsReadIndexDatapointsCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsIndexEndpointsUndeployIndexCall struct { - s *Service - indexEndpoint string - googlecloudaiplatformv1undeployindexrequest *GoogleCloudAiplatformV1UndeployIndexRequest - 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 *ProjectsLocationsIndexesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// UndeployIndex: Undeploys an Index from an IndexEndpoint, removing a -// DeployedIndex from it, and freeing all resources it's using. +type ProjectsLocationsIndexesOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - indexEndpoint: The name of the IndexEndpoint resource from which to -// undeploy an Index. Format: -// `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`. -func (r *ProjectsLocationsIndexEndpointsService) UndeployIndex(indexEndpoint string, googlecloudaiplatformv1undeployindexrequest *GoogleCloudAiplatformV1UndeployIndexRequest) *ProjectsLocationsIndexEndpointsUndeployIndexCall { - c := &ProjectsLocationsIndexEndpointsUndeployIndexCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.indexEndpoint = indexEndpoint - c.googlecloudaiplatformv1undeployindexrequest = googlecloudaiplatformv1undeployindexrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsIndexesOperationsService) Wait(name string) *ProjectsLocationsIndexesOperationsWaitCall { + c := &ProjectsLocationsIndexesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsIndexesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsIndexesOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsUndeployIndexCall { +func (c *ProjectsLocationsIndexesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsUndeployIndexCall { +func (c *ProjectsLocationsIndexesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Header() http.Header { +func (c *ProjectsLocationsIndexesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsIndexesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1undeployindexrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+indexEndpoint}:undeployIndex") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -66875,18 +69832,18 @@ func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "indexEndpoint": c.indexEndpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.undeployIndex" call. +// Do executes the "aiplatform.projects.locations.indexes.operations.wait" call. // 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 *ProjectsLocationsIndexEndpointsUndeployIndexCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsIndexesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -66918,60 +69875,72 @@ func (c *ProjectsLocationsIndexEndpointsUndeployIndexCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsIndexEndpointsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1metadatastore *GoogleCloudAiplatformV1MetadataStore + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// Create: Initializes a MetadataStore, including allocation of resources. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsIndexEndpointsOperationsService) Cancel(name string) *ProjectsLocationsIndexEndpointsOperationsCancelCall { - c := &ProjectsLocationsIndexEndpointsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location where the MetadataStore should +// be created. Format: `projects/{project}/locations/{location}/`. +func (r *ProjectsLocationsMetadataStoresService) Create(parent string, googlecloudaiplatformv1metadatastore *GoogleCloudAiplatformV1MetadataStore) *ProjectsLocationsMetadataStoresCreateCall { + c := &ProjectsLocationsMetadataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1metadatastore = googlecloudaiplatformv1metadatastore + return c +} + +// MetadataStoreId sets the optional parameter "metadataStoreId": The +// {metadatastore} portion of the resource name with the format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If +// not provided, the MetadataStore's ID will be a UUID generated by the +// service. Must be 4-128 characters in length. Valid characters are `/a-z-/`. +// Must be unique across all MetadataStores in the parent Location. (Otherwise +// the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the +// caller can't view the preexisting MetadataStore.) +func (c *ProjectsLocationsMetadataStoresCreateCall) MetadataStoreId(metadataStoreId string) *ProjectsLocationsMetadataStoresCreateCall { + c.urlParams_.Set("metadataStoreId", metadataStoreId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsMetadataStoresCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1metadatastore) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -66979,18 +69948,18 @@ func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) doRequest(alt stri } 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 "aiplatform.projects.locations.indexEndpoints.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.metadataStores.create" call. // 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 *ProjectsLocationsIndexEndpointsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsMetadataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67009,7 +69978,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Do(opts ...googlea 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, @@ -67022,7 +69991,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsCancelCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsIndexEndpointsOperationsDeleteCall struct { +type ProjectsLocationsMetadataStoresDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -67030,42 +69999,48 @@ type ProjectsLocationsIndexEndpointsOperationsDeleteCall struct { 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`. +// Delete: Deletes a single MetadataStore and all its child resources +// (Artifacts, Executions, and Contexts). // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsIndexEndpointsOperationsService) Delete(name string) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { - c := &ProjectsLocationsIndexEndpointsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the MetadataStore to delete. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresService) Delete(name string) *ProjectsLocationsMetadataStoresDeleteCall { + c := &ProjectsLocationsMetadataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Force sets the optional parameter "force": Deprecated: Field is no longer +// supported. +func (c *ProjectsLocationsMetadataStoresDeleteCall) Force(force bool) *ProjectsLocationsMetadataStoresDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -67083,13 +70058,13 @@ func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.delete" call. // 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 *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsMetadataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67108,7 +70083,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Do(opts ...googlea 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, @@ -67121,7 +70096,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsIndexEndpointsOperationsGetCall struct { +type ProjectsLocationsMetadataStoresGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -67130,13 +70105,12 @@ type ProjectsLocationsIndexEndpointsOperationsGetCall 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: Retrieves a specific MetadataStore. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsIndexEndpointsOperationsService) Get(name string) *ProjectsLocationsIndexEndpointsOperationsGetCall { - c := &ProjectsLocationsIndexEndpointsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the MetadataStore to retrieve. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresService) Get(name string) *ProjectsLocationsMetadataStoresGetCall { + c := &ProjectsLocationsMetadataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -67144,7 +70118,7 @@ func (r *ProjectsLocationsIndexEndpointsOperationsService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67152,27 +70126,27 @@ func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -67193,13 +70167,13 @@ func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.get" call. // 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 +// *GoogleCloudAiplatformV1MetadataStore.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataStore, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67218,7 +70192,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1MetadataStore{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67231,41 +70205,39 @@ func (c *ProjectsLocationsIndexEndpointsOperationsGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsIndexEndpointsOperationsListCall struct { +type ProjectsLocationsMetadataStoresListCall 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 MetadataStores for a Location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsIndexEndpointsOperationsService) List(name string) *ProjectsLocationsIndexEndpointsOperationsListCall { - c := &ProjectsLocationsIndexEndpointsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Filter(filter string) *ProjectsLocationsIndexEndpointsOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The Location whose MetadataStores should be listed. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsMetadataStoresService) List(parent string) *ProjectsLocationsMetadataStoresListCall { + c := &ProjectsLocationsMetadataStoresListCall{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 *ProjectsLocationsIndexEndpointsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexEndpointsOperationsListCall { +// PageSize sets the optional parameter "pageSize": The maximum number of +// Metadata Stores to return. The service may return fewer. Must be in range +// 1-1000, inclusive. Defaults to 100. +func (c *ProjectsLocationsMetadataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsIndexEndpointsOperationsListCall { +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous MetadataService.ListMetadataStores call. Provide this to +// retrieve the subsequent page. When paginating, all other provided parameters +// must match the call that provided the page token. (Otherwise the request +// will fail with INVALID_ARGUMENT error.) +func (c *ProjectsLocationsMetadataStoresListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -67273,7 +70245,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) PageToken(pageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67281,27 +70253,27 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Fields(s ...googleap // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexEndpointsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -67309,7 +70281,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) 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/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataStores") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -67317,18 +70289,18 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) 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 "aiplatform.projects.locations.indexEndpoints.operations.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.list" call. // 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 +// *GoogleCloudAiplatformV1ListMetadataStoresResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsMetadataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListMetadataStoresResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67347,7 +70319,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ListMetadataStoresResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67363,7 +70335,7 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Do(opts ...googleapi // 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 *ProjectsLocationsIndexEndpointsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListMetadataStoresResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -67381,172 +70353,73 @@ func (c *ProjectsLocationsIndexEndpointsOperationsListCall) Pages(ctx context.Co } } -type ProjectsLocationsIndexEndpointsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresArtifactsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// Create: Creates an Artifact associated with a MetadataStore. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsIndexEndpointsOperationsService) Wait(name string) *ProjectsLocationsIndexEndpointsOperationsWaitCall { - c := &ProjectsLocationsIndexEndpointsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsIndexEndpointsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexEndpointsOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsIndexEndpointsOperationsWaitCall { - c.ctx_ = ctx +// - parent: The resource name of the MetadataStore where the Artifact should +// be created. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresArtifactsService) Create(parent string, googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact) *ProjectsLocationsMetadataStoresArtifactsCreateCall { + c := &ProjectsLocationsMetadataStoresArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1artifact = googlecloudaiplatformv1artifact return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsIndexEndpointsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.indexEndpoints.operations.wait" call. -// 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 *ProjectsLocationsIndexEndpointsOperationsWaitCall) 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 -} - -type ProjectsLocationsIndexesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates an Index. -// -// - parent: The resource name of the Location to create the Index in. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsIndexesService) Create(parent string, googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index) *ProjectsLocationsIndexesCreateCall { - c := &ProjectsLocationsIndexesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1index = googlecloudaiplatformv1index +// ArtifactId sets the optional parameter "artifactId": The {artifact} portion +// of the resource name with the format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artif +// acts/{artifact}` If not provided, the Artifact's ID will be a UUID generated +// by the service. Must be 4-128 characters in length. Valid characters are +// `/a-z-/`. Must be unique across all Artifacts in the parent MetadataStore. +// (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED +// if the caller can't view the preexisting Artifact.) +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) ArtifactId(artifactId string) *ProjectsLocationsMetadataStoresArtifactsCreateCall { + c.urlParams_.Set("artifactId", artifactId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesCreateCall { +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesCreateCall) Context(ctx context.Context) *ProjectsLocationsIndexesCreateCall { +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesCreateCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1index) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1artifact) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -67559,13 +70432,13 @@ func (c *ProjectsLocationsIndexesCreateCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.create" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Artifact.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67584,7 +70457,7 @@ func (c *ProjectsLocationsIndexesCreateCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1Artifact{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67597,7 +70470,7 @@ func (c *ProjectsLocationsIndexesCreateCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsIndexesDeleteCall struct { +type ProjectsLocationsMetadataStoresArtifactsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -67605,41 +70478,49 @@ type ProjectsLocationsIndexesDeleteCall struct { header_ http.Header } -// Delete: Deletes an Index. An Index can only be deleted when all its -// DeployedIndexes had been undeployed. +// Delete: Deletes an Artifact. // -// - name: The name of the Index resource to be deleted. Format: -// `projects/{project}/locations/{location}/indexes/{index}`. -func (r *ProjectsLocationsIndexesService) Delete(name string) *ProjectsLocationsIndexesDeleteCall { - c := &ProjectsLocationsIndexesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Artifact to delete. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art +// ifacts/{artifact}`. +func (r *ProjectsLocationsMetadataStoresArtifactsService) Delete(name string) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { + c := &ProjectsLocationsMetadataStoresArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Etag sets the optional parameter "etag": The etag of the Artifact to delete. +// If this is provided, it must match the server's etag. Otherwise, the request +// will fail with a FAILED_PRECONDITION. +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { + c.urlParams_.Set("etag", etag) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexesDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -67657,13 +70538,13 @@ func (c *ProjectsLocationsIndexesDeleteCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.delete" call. // 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 *ProjectsLocationsIndexesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67695,7 +70576,7 @@ func (c *ProjectsLocationsIndexesDeleteCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsIndexesGetCall struct { +type ProjectsLocationsMetadataStoresArtifactsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -67704,12 +70585,13 @@ type ProjectsLocationsIndexesGetCall struct { header_ http.Header } -// Get: Gets an Index. +// Get: Retrieves a specific Artifact. // -// - name: The name of the Index resource. Format: -// `projects/{project}/locations/{location}/indexes/{index}`. -func (r *ProjectsLocationsIndexesService) Get(name string) *ProjectsLocationsIndexesGetCall { - c := &ProjectsLocationsIndexesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Artifact to retrieve. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art +// ifacts/{artifact}`. +func (r *ProjectsLocationsMetadataStoresArtifactsService) Get(name string) *ProjectsLocationsMetadataStoresArtifactsGetCall { + c := &ProjectsLocationsMetadataStoresArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -67717,7 +70599,7 @@ func (r *ProjectsLocationsIndexesService) Get(name string) *ProjectsLocationsInd // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesGetCall { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67725,27 +70607,27 @@ func (c *ProjectsLocationsIndexesGetCall) Fields(s ...googleapi.Field) *Projects // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsIndexesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesGetCall { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesGetCall) Context(ctx context.Context) *ProjectsLocationsIndexesGetCall { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -67766,13 +70648,13 @@ func (c *ProjectsLocationsIndexesGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Index.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Artifact.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Index, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67791,7 +70673,7 @@ func (c *ProjectsLocationsIndexesGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Index{ + ret := &GoogleCloudAiplatformV1Artifact{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67804,7 +70686,7 @@ func (c *ProjectsLocationsIndexesGetCall) Do(opts ...googleapi.CallOption) (*Goo return ret, nil } -type ProjectsLocationsIndexesListCall struct { +type ProjectsLocationsMetadataStoresArtifactsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -67813,48 +70695,74 @@ type ProjectsLocationsIndexesListCall struct { header_ http.Header } -// List: Lists Indexes in a Location. +// List: Lists Artifacts in the MetadataStore. // -// - parent: The resource name of the Location from which to list the Indexes. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsIndexesService) List(parent string) *ProjectsLocationsIndexesListCall { - c := &ProjectsLocationsIndexesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The MetadataStore whose Artifacts should be listed. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresArtifactsService) List(parent string) *ProjectsLocationsMetadataStoresArtifactsListCall { + c := &ProjectsLocationsMetadataStoresArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsIndexesListCall) Filter(filter string) *ProjectsLocationsIndexesListCall { +// Filter sets the optional parameter "filter": Filter specifying the boolean +// condition for the Artifacts to satisfy in order to be part of the result +// set. The syntax to define filter query is based on +// https://google.aip.dev/160. The supported set of filters include the +// following: * **Attribute filtering**: For example: `display_name = "test". +// Supported fields include: `name`, `display_name`, `uri`, `state`, +// `schema_title`, `create_time`, and `update_time`. Time fields, such as +// `create_time` and `update_time`, require values specified in RFC-3339 +// format. For example: `create_time = "2020-11-19T11:30:00-04:00" * +// **Metadata field**: To filter on metadata fields use traversal operation as +// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0` +// In case the field name contains special characters (such as colon), one can +// embed it inside double quote. For example: `metadata."field:1".number_value +// = 10.0` * **Context based filtering**: To filter Artifacts based on the +// contexts to which they belong, use the function operator with the full +// resource name `in_context()`. For example: +// `in_context("projects//locations//metadataStores//contexts/")` Each of the +// above supported filter types can be combined together using logical +// operators (`AND` & `OR`). Maximum nested expression depth allowed is 5. For +// example: `display_name = "test" AND metadata.field1.bool_value = true`. +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsIndexesListCall) PageSize(pageSize int64) *ProjectsLocationsIndexesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// OrderBy sets the optional parameter "orderBy": How the list of messages is +// ordered. Specify the values to order by and an ordering operation. The +// default sorting order is ascending. To specify descending order for a field, +// users append a " desc" suffix; for example: "foo desc, bar". Subfields are +// specified with a `.` character, such as foo.bar. see +// https://google.aip.dev/132#ordering for more details. +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresArtifactsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListIndexesResponse.next_page_token of the -// previous IndexService.ListIndexes call. -func (c *ProjectsLocationsIndexesListCall) PageToken(pageToken string) *ProjectsLocationsIndexesListCall { - c.urlParams_.Set("pageToken", pageToken) +// PageSize sets the optional parameter "pageSize": The maximum number of +// Artifacts to return. The service may return fewer. Must be in range 1-1000, +// inclusive. Defaults to 100. +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresArtifactsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsIndexesListCall) ReadMask(readMask string) *ProjectsLocationsIndexesListCall { - c.urlParams_.Set("readMask", readMask) +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous MetadataService.ListArtifacts call. Provide this to retrieve +// the subsequent page. When paginating, all other provided parameters must +// match the call that provided the page token. (Otherwise the request will +// fail with INVALID_ARGUMENT error.) +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresArtifactsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesListCall { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -67862,27 +70770,27 @@ func (c *ProjectsLocationsIndexesListCall) Fields(s ...googleapi.Field) *Project // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsIndexesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesListCall { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesListCall) Context(ctx context.Context) *ProjectsLocationsIndexesListCall { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -67890,7 +70798,7 @@ func (c *ProjectsLocationsIndexesListCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/indexes") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -67903,13 +70811,13 @@ func (c *ProjectsLocationsIndexesListCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListIndexesResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1ListArtifactsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListIndexesResponse, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListArtifactsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -67928,7 +70836,7 @@ func (c *ProjectsLocationsIndexesListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListIndexesResponse{ + ret := &GoogleCloudAiplatformV1ListArtifactsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -67944,7 +70852,7 @@ func (c *ProjectsLocationsIndexesListCall) Do(opts ...googleapi.CallOption) (*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 *ProjectsLocationsIndexesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListIndexesResponse) error) error { +func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListArtifactsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -67962,29 +70870,35 @@ func (c *ProjectsLocationsIndexesListCall) Pages(ctx context.Context, f func(*Go } } -type ProjectsLocationsIndexesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresArtifactsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a stored Artifact. +// +// - name: Output only. The resource name of the Artifact. +func (r *ProjectsLocationsMetadataStoresArtifactsService) Patch(name string, googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact) *ProjectsLocationsMetadataStoresArtifactsPatchCall { + c := &ProjectsLocationsMetadataStoresArtifactsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1artifact = googlecloudaiplatformv1artifact + return c } -// Patch: Updates an Index. -// -// - name: Output only. The resource name of the Index. -func (r *ProjectsLocationsIndexesService) Patch(name string, googlecloudaiplatformv1index *GoogleCloudAiplatformV1Index) *ProjectsLocationsIndexesPatchCall { - c := &ProjectsLocationsIndexesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1index = googlecloudaiplatformv1index +// AllowMissing sets the optional parameter "allowMissing": If set to true, and +// the Artifact is not found, a new Artifact is created. +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresArtifactsPatchCall { + c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } -// UpdateMask sets the optional parameter "updateMask": The update mask applies -// to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. -func (c *ProjectsLocationsIndexesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsIndexesPatchCall { +// UpdateMask sets the optional parameter "updateMask": A FieldMask indicating +// which fields should be updated. +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresArtifactsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -67992,30 +70906,30 @@ func (c *ProjectsLocationsIndexesPatchCall) UpdateMask(updateMask string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesPatchCall { +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesPatchCall) Context(ctx context.Context) *ProjectsLocationsIndexesPatchCall { +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesPatchCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1index) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1artifact) if err != nil { return nil, err } @@ -68034,13 +70948,13 @@ func (c *ProjectsLocationsIndexesPatchCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.patch" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Artifact.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68059,7 +70973,7 @@ func (c *ProjectsLocationsIndexesPatchCall) Do(opts ...googleapi.CallOption) (*G if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1Artifact{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68072,59 +70986,59 @@ func (c *ProjectsLocationsIndexesPatchCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsIndexesRemoveDatapointsCall struct { - s *Service - index string - googlecloudaiplatformv1removedatapointsrequest *GoogleCloudAiplatformV1RemoveDatapointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresArtifactsPurgeCall struct { + s *Service + parent string + googlecloudaiplatformv1purgeartifactsrequest *GoogleCloudAiplatformV1PurgeArtifactsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveDatapoints: Remove Datapoints from an Index. +// Purge: Purges Artifacts. // -// - index: The name of the Index resource to be updated. Format: -// `projects/{project}/locations/{location}/indexes/{index}`. -func (r *ProjectsLocationsIndexesService) RemoveDatapoints(index string, googlecloudaiplatformv1removedatapointsrequest *GoogleCloudAiplatformV1RemoveDatapointsRequest) *ProjectsLocationsIndexesRemoveDatapointsCall { - c := &ProjectsLocationsIndexesRemoveDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.index = index - c.googlecloudaiplatformv1removedatapointsrequest = googlecloudaiplatformv1removedatapointsrequest +// - parent: The metadata store to purge Artifacts from. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresArtifactsService) Purge(parent string, googlecloudaiplatformv1purgeartifactsrequest *GoogleCloudAiplatformV1PurgeArtifactsRequest) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { + c := &ProjectsLocationsMetadataStoresArtifactsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1purgeartifactsrequest = googlecloudaiplatformv1purgeartifactsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesRemoveDatapointsCall { +func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexesRemoveDatapointsCall { +func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesRemoveDatapointsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1removedatapointsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgeartifactsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+index}:removeDatapoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -68132,18 +71046,18 @@ func (c *ProjectsLocationsIndexesRemoveDatapointsCall) doRequest(alt string) (*h } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "index": c.index, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.removeDatapoints" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1RemoveDatapointsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsIndexesRemoveDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RemoveDatapointsResponse, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68162,7 +71076,7 @@ func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1RemoveDatapointsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68175,78 +71089,122 @@ func (c *ProjectsLocationsIndexesRemoveDatapointsCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsIndexesUpsertDatapointsCall struct { - s *Service - index string - googlecloudaiplatformv1upsertdatapointsrequest *GoogleCloudAiplatformV1UpsertDatapointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall struct { + s *Service + artifact string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpsertDatapoints: Add/update Datapoints into an Index. +// QueryArtifactLineageSubgraph: Retrieves lineage of an Artifact represented +// through Artifacts and Executions connected by Event edges and returned as a +// LineageSubgraph. // -// - index: The name of the Index resource to be updated. Format: -// `projects/{project}/locations/{location}/indexes/{index}`. -func (r *ProjectsLocationsIndexesService) UpsertDatapoints(index string, googlecloudaiplatformv1upsertdatapointsrequest *GoogleCloudAiplatformV1UpsertDatapointsRequest) *ProjectsLocationsIndexesUpsertDatapointsCall { - c := &ProjectsLocationsIndexesUpsertDatapointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.index = index - c.googlecloudaiplatformv1upsertdatapointsrequest = googlecloudaiplatformv1upsertdatapointsrequest +// - artifact: The resource name of the Artifact whose Lineage needs to be +// retrieved as a LineageSubgraph. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art +// ifacts/{artifact}` The request may error with FAILED_PRECONDITION if the +// number of Artifacts, the number of Executions, or the number of Events +// that would be returned for the Context exceeds 1000. +func (r *ProjectsLocationsMetadataStoresArtifactsService) QueryArtifactLineageSubgraph(artifact string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { + c := &ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.artifact = artifact + return c +} + +// Filter sets the optional parameter "filter": Filter specifying the boolean +// condition for the Artifacts to satisfy in order to be part of the Lineage +// Subgraph. The syntax to define filter query is based on +// https://google.aip.dev/160. The supported set of filters include the +// following: * **Attribute filtering**: For example: `display_name = "test" +// Supported fields include: `name`, `display_name`, `uri`, `state`, +// `schema_title`, `create_time`, and `update_time`. Time fields, such as +// `create_time` and `update_time`, require values specified in RFC-3339 +// format. For example: `create_time = "2020-11-19T11:30:00-04:00" * +// **Metadata field**: To filter on metadata fields use traversal operation as +// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0` +// In case the field name contains special characters (such as colon), one can +// embed it inside double quote. For example: `metadata."field:1".number_value +// = 10.0` Each of the above supported filter types can be combined together +// using logical operators (`AND` & `OR`). Maximum nested expression depth +// allowed is 5. For example: `display_name = "test" AND +// metadata.field1.bool_value = true`. +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxHops sets the optional parameter "maxHops": Specifies the size of the +// lineage graph in terms of number of hops from the specified artifact. +// Negative Value: INVALID_ARGUMENT error is returned 0: Only input artifact is +// returned. No value: Transitive closure is performed to return the complete +// graph. +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) MaxHops(maxHops int64) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { + c.urlParams_.Set("maxHops", fmt.Sprint(maxHops)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesUpsertDatapointsCall { +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Context(ctx context.Context) *ProjectsLocationsIndexesUpsertDatapointsCall { +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesUpsertDatapointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1upsertdatapointsrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+index}:upsertDatapoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+artifact}:queryArtifactLineageSubgraph") 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{ - "index": c.index, + "artifact": c.artifact, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.upsertDatapoints" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.queryArtifactLineageSubgraph" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1UpsertDatapointsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1LineageSubgraph.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1UpsertDatapointsResponse, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68265,7 +71223,7 @@ func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1UpsertDatapointsResponse{ + ret := &GoogleCloudAiplatformV1LineageSubgraph{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -68278,7 +71236,7 @@ func (c *ProjectsLocationsIndexesUpsertDatapointsCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsIndexesOperationsCancelCall struct { +type ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -68297,8 +71255,8 @@ type ProjectsLocationsIndexesOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsIndexesOperationsService) Cancel(name string) *ProjectsLocationsIndexesOperationsCancelCall { - c := &ProjectsLocationsIndexesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { + c := &ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -68306,27 +71264,27 @@ func (r *ProjectsLocationsIndexesOperationsService) Cancel(name string) *Project // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -68344,13 +71302,13 @@ func (c *ProjectsLocationsIndexesOperationsCancelCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.cancel" call. // 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 *ProjectsLocationsIndexesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68382,7 +71340,7 @@ func (c *ProjectsLocationsIndexesOperationsCancelCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsIndexesOperationsDeleteCall struct { +type ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -68396,8 +71354,8 @@ type ProjectsLocationsIndexesOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsIndexesOperationsService) Delete(name string) *ProjectsLocationsIndexesOperationsDeleteCall { - c := &ProjectsLocationsIndexesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { + c := &ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -68405,27 +71363,27 @@ func (r *ProjectsLocationsIndexesOperationsService) Delete(name string) *Project // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -68443,13 +71401,13 @@ func (c *ProjectsLocationsIndexesOperationsDeleteCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.operations.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.delete" call. // 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 *ProjectsLocationsIndexesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68481,7 +71439,7 @@ func (c *ProjectsLocationsIndexesOperationsDeleteCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsIndexesOperationsGetCall struct { +type ProjectsLocationsMetadataStoresArtifactsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -68495,145 +71453,16 @@ type ProjectsLocationsIndexesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsIndexesOperationsService) Get(name string) *ProjectsLocationsIndexesOperationsGetCall { - c := &ProjectsLocationsIndexesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsIndexesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsIndexesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsIndexesOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsIndexesOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.indexes.operations.get" call. -// 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 *ProjectsLocationsIndexesOperationsGetCall) 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 -} - -type ProjectsLocationsIndexesOperationsListCall 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 *ProjectsLocationsIndexesOperationsService) List(name string) *ProjectsLocationsIndexesOperationsListCall { - c := &ProjectsLocationsIndexesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { + c := &ProjectsLocationsMetadataStoresArtifactsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsIndexesOperationsListCall) Filter(filter string) *ProjectsLocationsIndexesOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsIndexesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsIndexesOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsIndexesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsIndexesOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsIndexesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsListCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -68641,171 +71470,37 @@ func (c *ProjectsLocationsIndexesOperationsListCall) Fields(s ...googleapi.Field // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsIndexesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsIndexesOperationsListCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsIndexesOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsIndexesOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.indexes.operations.list" call. -// 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 *ProjectsLocationsIndexesOperationsListCall) 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 -} - -// 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 *ProjectsLocationsIndexesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsIndexesOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. -// -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsIndexesOperationsService) Wait(name string) *ProjectsLocationsIndexesOperationsWaitCall { - c := &ProjectsLocationsIndexesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsIndexesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsIndexesOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsIndexesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsIndexesOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsIndexesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsIndexesOperationsWaitCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsIndexesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsIndexesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + 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 } @@ -68816,13 +71511,13 @@ func (c *ProjectsLocationsIndexesOperationsWaitCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.indexes.operations.wait" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.get" call. // 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 *ProjectsLocationsIndexesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68854,91 +71549,104 @@ func (c *ProjectsLocationsIndexesOperationsWaitCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsMetadataStoresCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1metadatastore *GoogleCloudAiplatformV1MetadataStore - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresArtifactsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Create: Initializes a MetadataStore, including allocation of resources. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the Location where the MetadataStore should -// be created. Format: `projects/{project}/locations/{location}/`. -func (r *ProjectsLocationsMetadataStoresService) Create(parent string, googlecloudaiplatformv1metadatastore *GoogleCloudAiplatformV1MetadataStore) *ProjectsLocationsMetadataStoresCreateCall { - c := &ProjectsLocationsMetadataStoresCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1metadatastore = googlecloudaiplatformv1metadatastore +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) List(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { + c := &ProjectsLocationsMetadataStoresArtifactsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// MetadataStoreId sets the optional parameter "metadataStoreId": The -// {metadatastore} portion of the resource name with the format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}` If -// not provided, the MetadataStore's ID will be a UUID generated by the -// service. Must be 4-128 characters in length. Valid characters are `/a-z-/`. -// Must be unique across all MetadataStores in the parent Location. (Otherwise -// the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the -// caller can't view the preexisting MetadataStore.) -func (c *ProjectsLocationsMetadataStoresCreateCall) MetadataStoreId(metadataStoreId string) *ProjectsLocationsMetadataStoresCreateCall { - c.urlParams_.Set("metadataStoreId", metadataStoreId) +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresCreateCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresCreateCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresCreateCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1metadatastore) - if err != nil { - return nil, err +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 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 "aiplatform.projects.locations.metadataStores.create" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.list" call. // 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 +// *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 *ProjectsLocationsMetadataStoresCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -68957,7 +71665,7 @@ func (c *ProjectsLocationsMetadataStoresCreateCall) Do(opts ...googleapi.CallOpt 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, @@ -68970,7 +71678,28 @@ func (c *ProjectsLocationsMetadataStoresCreateCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsMetadataStoresDeleteCall struct { +// 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 *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -68978,55 +71707,63 @@ type ProjectsLocationsMetadataStoresDeleteCall struct { header_ http.Header } -// Delete: Deletes a single MetadataStore and all its child resources -// (Artifacts, Executions, and Contexts). +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - name: The resource name of the MetadataStore to delete. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresService) Delete(name string) *ProjectsLocationsMetadataStoresDeleteCall { - c := &ProjectsLocationsMetadataStoresDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { + c := &ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": Deprecated: Field is no longer -// supported. -func (c *ProjectsLocationsMetadataStoresDeleteCall) Force(force bool) *ProjectsLocationsMetadataStoresDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresDeleteCall { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -69037,13 +71774,13 @@ func (c *ProjectsLocationsMetadataStoresDeleteCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.wait" call. // 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 *ProjectsLocationsMetadataStoresDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69075,84 +71812,82 @@ func (c *ProjectsLocationsMetadataStoresDeleteCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsMetadataStoresGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall struct { + s *Service + context string + googlecloudaiplatformv1addcontextartifactsandexecutionsrequest *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Retrieves a specific MetadataStore. +// AddContextArtifactsAndExecutions: Adds a set of Artifacts and Executions to +// a Context. If any of the Artifacts or Executions have already been added to +// a Context, they are simply skipped. // -// - name: The resource name of the MetadataStore to retrieve. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresService) Get(name string) *ProjectsLocationsMetadataStoresGetCall { - c := &ProjectsLocationsMetadataStoresGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - context: The resource name of the Context that the Artifacts and +// Executions belong to. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}`. +func (r *ProjectsLocationsMetadataStoresContextsService) AddContextArtifactsAndExecutions(context string, googlecloudaiplatformv1addcontextartifactsandexecutionsrequest *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsRequest) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { + c := &ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.context = context + c.googlecloudaiplatformv1addcontextartifactsandexecutionsrequest = googlecloudaiplatformv1addcontextartifactsandexecutionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresGetCall { +func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresGetCall { +func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addcontextartifactsandexecutionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:addContextArtifactsAndExecutions") 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, + "context": c.context, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.addContextArtifactsAndExecutions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1MetadataStore.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataStore, error) { +// *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse.ServerRespon +// se.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69171,7 +71906,7 @@ func (c *ProjectsLocationsMetadataStoresGetCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1MetadataStore{ + ret := &GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69184,102 +71919,83 @@ func (c *ProjectsLocationsMetadataStoresGetCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsLocationsMetadataStoresListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresContextsAddContextChildrenCall struct { + s *Service + context string + googlecloudaiplatformv1addcontextchildrenrequest *GoogleCloudAiplatformV1AddContextChildrenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists MetadataStores for a Location. +// AddContextChildren: Adds a set of Contexts as children to a parent Context. +// If any of the child Contexts have already been added to the parent Context, +// they are simply skipped. If this call would create a cycle or cause any +// Context to have more than 10 parents, the request will fail with an +// INVALID_ARGUMENT error. // -// - parent: The Location whose MetadataStores should be listed. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsMetadataStoresService) List(parent string) *ProjectsLocationsMetadataStoresListCall { - c := &ProjectsLocationsMetadataStoresListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// PageSize sets the optional parameter "pageSize": The maximum number of -// Metadata Stores to return. The service may return fewer. Must be in range -// 1-1000, inclusive. Defaults to 100. -func (c *ProjectsLocationsMetadataStoresListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous MetadataService.ListMetadataStores call. Provide this to -// retrieve the subsequent page. When paginating, all other provided parameters -// must match the call that provided the page token. (Otherwise the request -// will fail with INVALID_ARGUMENT error.) -func (c *ProjectsLocationsMetadataStoresListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresListCall { - c.urlParams_.Set("pageToken", pageToken) +// - context: The resource name of the parent Context. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}`. +func (r *ProjectsLocationsMetadataStoresContextsService) AddContextChildren(context string, googlecloudaiplatformv1addcontextchildrenrequest *GoogleCloudAiplatformV1AddContextChildrenRequest) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { + c := &ProjectsLocationsMetadataStoresContextsAddContextChildrenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.context = context + c.googlecloudaiplatformv1addcontextchildrenrequest = googlecloudaiplatformv1addcontextchildrenrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresListCall { +func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresListCall { +func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addcontextchildrenrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataStores") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:addContextChildren") 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, + "context": c.context, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.addContextChildren" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListMetadataStoresResponse.ServerResponse.Header or +// *GoogleCloudAiplatformV1AddContextChildrenResponse.ServerResponse.Header or // (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListMetadataStoresResponse, error) { +func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddContextChildrenResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69298,7 +72014,7 @@ func (c *ProjectsLocationsMetadataStoresListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListMetadataStoresResponse{ + ret := &GoogleCloudAiplatformV1AddContextChildrenResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69311,94 +72027,73 @@ func (c *ProjectsLocationsMetadataStoresListCall) Do(opts ...googleapi.CallOptio return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsMetadataStoresListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListMetadataStoresResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsMetadataStoresArtifactsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresContextsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an Artifact associated with a MetadataStore. +// Create: Creates a Context associated with a MetadataStore. // -// - parent: The resource name of the MetadataStore where the Artifact should -// be created. Format: +// - parent: The resource name of the MetadataStore where the Context should be +// created. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresArtifactsService) Create(parent string, googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact) *ProjectsLocationsMetadataStoresArtifactsCreateCall { - c := &ProjectsLocationsMetadataStoresArtifactsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsService) Create(parent string, googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context) *ProjectsLocationsMetadataStoresContextsCreateCall { + c := &ProjectsLocationsMetadataStoresContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1artifact = googlecloudaiplatformv1artifact + c.googlecloudaiplatformv1context = googlecloudaiplatformv1context return c } -// ArtifactId sets the optional parameter "artifactId": The {artifact} portion -// of the resource name with the format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/artif -// acts/{artifact}` If not provided, the Artifact's ID will be a UUID generated +// ContextId sets the optional parameter "contextId": The {context} portion of +// the resource name with the format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/conte +// xts/{context}`. If not provided, the Context's ID will be a UUID generated // by the service. Must be 4-128 characters in length. Valid characters are -// `/a-z-/`. Must be unique across all Artifacts in the parent MetadataStore. +// `/a-z-/`. Must be unique across all Contexts in the parent MetadataStore. // (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED -// if the caller can't view the preexisting Artifact.) -func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) ArtifactId(artifactId string) *ProjectsLocationsMetadataStoresArtifactsCreateCall { - c.urlParams_.Set("artifactId", artifactId) +// if the caller can't view the preexisting Context.) +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) ContextId(contextId string) *ProjectsLocationsMetadataStoresContextsCreateCall { + c.urlParams_.Set("contextId", contextId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsCreateCall { +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsCreateCall { +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1artifact) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1context) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contexts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -69411,13 +72106,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.create" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Artifact.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Context.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { +func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69436,7 +72131,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Artifact{ + ret := &GoogleCloudAiplatformV1Context{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69449,7 +72144,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsCreateCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsDeleteCall struct { +type ProjectsLocationsMetadataStoresContextsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -69457,49 +72152,56 @@ type ProjectsLocationsMetadataStoresArtifactsDeleteCall struct { header_ http.Header } -// Delete: Deletes an Artifact. +// Delete: Deletes a stored Context. // -// - name: The resource name of the Artifact to delete. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art -// ifacts/{artifact}`. -func (r *ProjectsLocationsMetadataStoresArtifactsService) Delete(name string) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { - c := &ProjectsLocationsMetadataStoresArtifactsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Context to delete. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}`. +func (r *ProjectsLocationsMetadataStoresContextsService) Delete(name string) *ProjectsLocationsMetadataStoresContextsDeleteCall { + c := &ProjectsLocationsMetadataStoresContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Etag sets the optional parameter "etag": The etag of the Artifact to delete. +// Etag sets the optional parameter "etag": The etag of the Context to delete. // If this is provided, it must match the server's etag. Otherwise, the request // will fail with a FAILED_PRECONDITION. -func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresContextsDeleteCall { c.urlParams_.Set("etag", etag) return c } +// Force sets the optional parameter "force": The force deletion semantics is +// still undefined. Users should not use this field. +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Force(force bool) *ProjectsLocationsMetadataStoresContextsDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsDeleteCall { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -69517,13 +72219,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.delete" call. // 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 *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69555,7 +72257,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsGetCall struct { +type ProjectsLocationsMetadataStoresContextsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -69564,13 +72266,13 @@ type ProjectsLocationsMetadataStoresArtifactsGetCall struct { header_ http.Header } -// Get: Retrieves a specific Artifact. +// Get: Retrieves a specific Context. // -// - name: The resource name of the Artifact to retrieve. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art -// ifacts/{artifact}`. -func (r *ProjectsLocationsMetadataStoresArtifactsService) Get(name string) *ProjectsLocationsMetadataStoresArtifactsGetCall { - c := &ProjectsLocationsMetadataStoresArtifactsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Context to retrieve. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}`. +func (r *ProjectsLocationsMetadataStoresContextsService) Get(name string) *ProjectsLocationsMetadataStoresContextsGetCall { + c := &ProjectsLocationsMetadataStoresContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -69578,7 +72280,7 @@ func (r *ProjectsLocationsMetadataStoresArtifactsService) Get(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -69586,27 +72288,27 @@ func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Fields(s ...googleapi. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -69627,13 +72329,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Artifact.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Context.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { +func (c *ProjectsLocationsMetadataStoresContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69652,7 +72354,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Artifact{ + ret := &GoogleCloudAiplatformV1Context{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69665,7 +72367,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsListCall struct { +type ProjectsLocationsMetadataStoresContextsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -69674,37 +72376,36 @@ type ProjectsLocationsMetadataStoresArtifactsListCall struct { header_ http.Header } -// List: Lists Artifacts in the MetadataStore. +// List: Lists Contexts on the MetadataStore. // -// - parent: The MetadataStore whose Artifacts should be listed. Format: +// - parent: The MetadataStore whose Contexts should be listed. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresArtifactsService) List(parent string) *ProjectsLocationsMetadataStoresArtifactsListCall { - c := &ProjectsLocationsMetadataStoresArtifactsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsService) List(parent string) *ProjectsLocationsMetadataStoresContextsListCall { + c := &ProjectsLocationsMetadataStoresContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filter specifying the boolean -// condition for the Artifacts to satisfy in order to be part of the result -// set. The syntax to define filter query is based on -// https://google.aip.dev/160. The supported set of filters include the -// following: * **Attribute filtering**: For example: `display_name = "test". -// Supported fields include: `name`, `display_name`, `uri`, `state`, -// `schema_title`, `create_time`, and `update_time`. Time fields, such as -// `create_time` and `update_time`, require values specified in RFC-3339 -// format. For example: `create_time = "2020-11-19T11:30:00-04:00" * +// condition for the Contexts to satisfy in order to be part of the result set. +// The syntax to define filter query is based on https://google.aip.dev/160. +// Following are the supported set of filters: * **Attribute filtering**: For +// example: `display_name = "test". Supported fields include: `name`, +// `display_name`, `schema_title`, `create_time`, and `update_time`. Time +// fields, such as `create_time` and `update_time`, require values specified in +// RFC-3339 format. For example: `create_time = "2020-11-19T11:30:00-04:00". * // **Metadata field**: To filter on metadata fields use traversal operation as -// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0` +// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0`. // In case the field name contains special characters (such as colon), one can // embed it inside double quote. For example: `metadata."field:1".number_value -// = 10.0` * **Context based filtering**: To filter Artifacts based on the -// contexts to which they belong, use the function operator with the full -// resource name `in_context()`. For example: -// `in_context("projects//locations//metadataStores//contexts/")` Each of the -// above supported filter types can be combined together using logical -// operators (`AND` & `OR`). Maximum nested expression depth allowed is 5. For -// example: `display_name = "test" AND metadata.field1.bool_value = true`. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsListCall { +// = 10.0` * **Parent Child filtering**: To filter Contexts based on +// parent-child relationship use the HAS operator as follows: ``` +// parent_contexts: "projects//locations//metadataStores//contexts/" +// child_contexts: "projects//locations//metadataStores//contexts/" ``` Each of +// the above supported filters can be combined together using logical operators +// (`AND` & `OR`). Maximum nested expression depth allowed is 5. For example: +// `display_name = "test" AND metadata.field1.bool_value = true`. +func (c *ProjectsLocationsMetadataStoresContextsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresContextsListCall { c.urlParams_.Set("filter", filter) return c } @@ -69715,25 +72416,25 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Filter(filter string) // users append a " desc" suffix; for example: "foo desc, bar". Subfields are // specified with a `.` character, such as foo.bar. see // https://google.aip.dev/132#ordering for more details. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresContextsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// Artifacts to return. The service may return fewer. Must be in range 1-1000, +// Contexts to return. The service may return fewer. Must be in range 1-1000, // inclusive. Defaults to 100. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresContextsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous MetadataService.ListArtifacts call. Provide this to retrieve +// from a previous MetadataService.ListContexts call. Provide this to retrieve // the subsequent page. When paginating, all other provided parameters must // match the call that provided the page token. (Otherwise the request will // fail with INVALID_ARGUMENT error.) -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresContextsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -69741,7 +72442,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) PageToken(pageToken s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -69749,27 +72450,27 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsListCall { +func (c *ProjectsLocationsMetadataStoresContextsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -69777,7 +72478,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) 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/{+parent}/artifacts") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contexts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -69790,13 +72491,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListArtifactsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1ListContextsResponse.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListArtifactsResponse, error) { +func (c *ProjectsLocationsMetadataStoresContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListContextsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69815,7 +72516,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListArtifactsResponse{ + ret := &GoogleCloudAiplatformV1ListContextsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69831,7 +72532,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Do(opts ...googleapi. // 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 *ProjectsLocationsMetadataStoresArtifactsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListArtifactsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListContextsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -69849,35 +72550,35 @@ func (c *ProjectsLocationsMetadataStoresArtifactsListCall) Pages(ctx context.Con } } -type ProjectsLocationsMetadataStoresArtifactsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresContextsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a stored Artifact. +// Patch: Updates a stored Context. // -// - name: Output only. The resource name of the Artifact. -func (r *ProjectsLocationsMetadataStoresArtifactsService) Patch(name string, googlecloudaiplatformv1artifact *GoogleCloudAiplatformV1Artifact) *ProjectsLocationsMetadataStoresArtifactsPatchCall { - c := &ProjectsLocationsMetadataStoresArtifactsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. The resource name of the Context. +func (r *ProjectsLocationsMetadataStoresContextsService) Patch(name string, googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context) *ProjectsLocationsMetadataStoresContextsPatchCall { + c := &ProjectsLocationsMetadataStoresContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1artifact = googlecloudaiplatformv1artifact + c.googlecloudaiplatformv1context = googlecloudaiplatformv1context return c } // AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Artifact is not found, a new Artifact is created. -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresArtifactsPatchCall { +// the Context is not found, a new Context is created. +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresContextsPatchCall { c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // UpdateMask sets the optional parameter "updateMask": A FieldMask indicating // which fields should be updated. -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresArtifactsPatchCall { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresContextsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -69885,30 +72586,30 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) UpdateMask(updateMas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsPatchCall { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsPatchCall { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1artifact) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1context) if err != nil { return nil, err } @@ -69927,13 +72628,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.patch" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Artifact.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1Context.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Artifact, error) { +func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -69952,7 +72653,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Artifact{ + ret := &GoogleCloudAiplatformV1Context{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -69965,59 +72666,59 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPatchCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsPurgeCall struct { - s *Service - parent string - googlecloudaiplatformv1purgeartifactsrequest *GoogleCloudAiplatformV1PurgeArtifactsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresContextsPurgeCall struct { + s *Service + parent string + googlecloudaiplatformv1purgecontextsrequest *GoogleCloudAiplatformV1PurgeContextsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Purges Artifacts. +// Purge: Purges Contexts. // -// - parent: The metadata store to purge Artifacts from. Format: +// - parent: The metadata store to purge Contexts from. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresArtifactsService) Purge(parent string, googlecloudaiplatformv1purgeartifactsrequest *GoogleCloudAiplatformV1PurgeArtifactsRequest) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { - c := &ProjectsLocationsMetadataStoresArtifactsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsService) Purge(parent string, googlecloudaiplatformv1purgecontextsrequest *GoogleCloudAiplatformV1PurgeContextsRequest) *ProjectsLocationsMetadataStoresContextsPurgeCall { + c := &ProjectsLocationsMetadataStoresContextsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1purgeartifactsrequest = googlecloudaiplatformv1purgeartifactsrequest + c.googlecloudaiplatformv1purgecontextsrequest = googlecloudaiplatformv1purgecontextsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { +func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsPurgeCall { +func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgeartifactsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgecontextsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/artifacts:purge") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contexts:purge") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -70030,13 +72731,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.purge" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.purge" call. // 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 *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70068,67 +72769,35 @@ func (c *ProjectsLocationsMetadataStoresArtifactsPurgeCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall struct { +type ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall struct { s *Service - artifact string + context string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// QueryArtifactLineageSubgraph: Retrieves lineage of an Artifact represented -// through Artifacts and Executions connected by Event edges and returned as a +// QueryContextLineageSubgraph: Retrieves Artifacts and Executions within the +// specified Context, connected by Event edges and returned as a // LineageSubgraph. // -// - artifact: The resource name of the Artifact whose Lineage needs to be -// retrieved as a LineageSubgraph. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/art -// ifacts/{artifact}` The request may error with FAILED_PRECONDITION if the +// - context: The resource name of the Context whose Artifacts and Executions +// should be retrieved as a LineageSubgraph. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}` The request may error with FAILED_PRECONDITION if the // number of Artifacts, the number of Executions, or the number of Events // that would be returned for the Context exceeds 1000. -func (r *ProjectsLocationsMetadataStoresArtifactsService) QueryArtifactLineageSubgraph(artifact string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { - c := &ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.artifact = artifact - return c -} - -// Filter sets the optional parameter "filter": Filter specifying the boolean -// condition for the Artifacts to satisfy in order to be part of the Lineage -// Subgraph. The syntax to define filter query is based on -// https://google.aip.dev/160. The supported set of filters include the -// following: * **Attribute filtering**: For example: `display_name = "test" -// Supported fields include: `name`, `display_name`, `uri`, `state`, -// `schema_title`, `create_time`, and `update_time`. Time fields, such as -// `create_time` and `update_time`, require values specified in RFC-3339 -// format. For example: `create_time = "2020-11-19T11:30:00-04:00" * -// **Metadata field**: To filter on metadata fields use traversal operation as -// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0` -// In case the field name contains special characters (such as colon), one can -// embed it inside double quote. For example: `metadata."field:1".number_value -// = 10.0` Each of the above supported filter types can be combined together -// using logical operators (`AND` & `OR`). Maximum nested expression depth -// allowed is 5. For example: `display_name = "test" AND -// metadata.field1.bool_value = true`. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxHops sets the optional parameter "maxHops": Specifies the size of the -// lineage graph in terms of number of hops from the specified artifact. -// Negative Value: INVALID_ARGUMENT error is returned 0: Only input artifact is -// returned. No value: Transitive closure is performed to return the complete -// graph. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) MaxHops(maxHops int64) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { - c.urlParams_.Set("maxHops", fmt.Sprint(maxHops)) +func (r *ProjectsLocationsMetadataStoresContextsService) QueryContextLineageSubgraph(context string) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { + c := &ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.context = context return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70136,27 +72805,27 @@ func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCal // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -70164,7 +72833,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCal var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+artifact}:queryArtifactLineageSubgraph") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:queryContextLineageSubgraph") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -70172,18 +72841,18 @@ func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCal } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "artifact": c.artifact, + "context": c.context, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.queryArtifactLineageSubgraph" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.queryContextLineageSubgraph" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleCloudAiplatformV1LineageSubgraph.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { +func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70215,7 +72884,113 @@ func (c *ProjectsLocationsMetadataStoresArtifactsQueryArtifactLineageSubgraphCal return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall struct { +type ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall struct { + s *Service + context string + googlecloudaiplatformv1removecontextchildrenrequest *GoogleCloudAiplatformV1RemoveContextChildrenRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveContextChildren: Remove a set of children contexts from a parent +// Context. If any of the child Contexts were NOT added to the parent Context, +// they are simply skipped. +// +// - context: The resource name of the parent Context. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con +// texts/{context}`. +func (r *ProjectsLocationsMetadataStoresContextsService) RemoveContextChildren(context string, googlecloudaiplatformv1removecontextchildrenrequest *GoogleCloudAiplatformV1RemoveContextChildrenRequest) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { + c := &ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.context = context + c.googlecloudaiplatformv1removecontextchildrenrequest = googlecloudaiplatformv1removecontextchildrenrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1removecontextchildrenrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:removeContextChildren") + 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{ + "context": c.context, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.removeContextChildren" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1RemoveContextChildrenResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RemoveContextChildrenResponse, 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 := &GoogleCloudAiplatformV1RemoveContextChildrenResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsMetadataStoresContextsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -70234,8 +73009,8 @@ type ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { - c := &ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { + c := &ProjectsLocationsMetadataStoresContextsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -70243,27 +73018,27 @@ func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Cancel(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -70281,13 +73056,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.cancel" call. // 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 *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70319,7 +73094,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsCancelCall) Do(opts . return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall struct { +type ProjectsLocationsMetadataStoresContextsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -70333,8 +73108,8 @@ type ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { - c := &ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { + c := &ProjectsLocationsMetadataStoresContextsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -70342,27 +73117,27 @@ func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Delete(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -70380,13 +73155,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) doRequest return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.delete" call. // 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 *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70418,7 +73193,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsDeleteCall) Do(opts . return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsOperationsGetCall struct { +type ProjectsLocationsMetadataStoresContextsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -70432,8 +73207,8 @@ type ProjectsLocationsMetadataStoresArtifactsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { - c := &ProjectsLocationsMetadataStoresArtifactsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { + c := &ProjectsLocationsMetadataStoresContextsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -70441,7 +73216,7 @@ func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Get(name str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70449,27 +73224,27 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Fields(s ... // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -70490,13 +73265,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.get" call. // 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 *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70528,7 +73303,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsGetCall) Do(opts ...g return ret, nil } -type ProjectsLocationsMetadataStoresArtifactsOperationsListCall struct { +type ProjectsLocationsMetadataStoresContextsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -70541,28 +73316,28 @@ type ProjectsLocationsMetadataStoresArtifactsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) List(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { - c := &ProjectsLocationsMetadataStoresArtifactsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresContextsOperationsService) List(name string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { + c := &ProjectsLocationsMetadataStoresContextsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -70570,7 +73345,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) PageToken(p // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -70578,27 +73353,27 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Fields(s .. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -70619,13 +73394,13 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.list" call. // 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 *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70660,7 +73435,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) 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 *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -70678,7 +73453,7 @@ func (c *ProjectsLocationsMetadataStoresArtifactsOperationsListCall) Pages(ctx c } } -type ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall struct { +type ProjectsLocationsMetadataStoresContextsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -70691,163 +73466,56 @@ type ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall struct { // already done, the latest state is immediately returned. If the timeout // specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout // is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. -// -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsMetadataStoresArtifactsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { - c := &ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.metadataStores.artifacts.operations.wait" call. -// 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 *ProjectsLocationsMetadataStoresArtifactsOperationsWaitCall) 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 -} - -type ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall struct { - s *Service - context string - googlecloudaiplatformv1addcontextartifactsandexecutionsrequest *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. +// +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { + c := &ProjectsLocationsMetadataStoresContextsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c } -// AddContextArtifactsAndExecutions: Adds a set of Artifacts and Executions to -// a Context. If any of the Artifacts or Executions have already been added to -// a Context, they are simply skipped. -// -// - context: The resource name of the Context that the Artifacts and -// Executions belong to. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}`. -func (r *ProjectsLocationsMetadataStoresContextsService) AddContextArtifactsAndExecutions(context string, googlecloudaiplatformv1addcontextartifactsandexecutionsrequest *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsRequest) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { - c := &ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.context = context - c.googlecloudaiplatformv1addcontextartifactsandexecutionsrequest = googlecloudaiplatformv1addcontextartifactsandexecutionsrequest +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall { +func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addcontextartifactsandexecutionsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:addContextArtifactsAndExecutions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -70855,18 +73523,18 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutions } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "context": c.context, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.addContextArtifactsAndExecutions" call. +// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse.ServerRespon -// se.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutionsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse, error) { +// *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 *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70885,7 +73553,7 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutions if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1AddContextArtifactsAndExecutionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -70898,64 +73566,64 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextArtifactsAndExecutions return ret, nil } -type ProjectsLocationsMetadataStoresContextsAddContextChildrenCall struct { +type ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall struct { s *Service - context string - googlecloudaiplatformv1addcontextchildrenrequest *GoogleCloudAiplatformV1AddContextChildrenRequest + execution string + googlecloudaiplatformv1addexecutioneventsrequest *GoogleCloudAiplatformV1AddExecutionEventsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// AddContextChildren: Adds a set of Contexts as children to a parent Context. -// If any of the child Contexts have already been added to the parent Context, -// they are simply skipped. If this call would create a cycle or cause any -// Context to have more than 10 parents, the request will fail with an -// INVALID_ARGUMENT error. +// AddExecutionEvents: Adds Events to the specified Execution. An Event +// indicates whether an Artifact was used as an input or output for an +// Execution. If an Event already exists between the Execution and the +// Artifact, the Event is skipped. // -// - context: The resource name of the parent Context. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}`. -func (r *ProjectsLocationsMetadataStoresContextsService) AddContextChildren(context string, googlecloudaiplatformv1addcontextchildrenrequest *GoogleCloudAiplatformV1AddContextChildrenRequest) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { - c := &ProjectsLocationsMetadataStoresContextsAddContextChildrenCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.context = context - c.googlecloudaiplatformv1addcontextchildrenrequest = googlecloudaiplatformv1addcontextchildrenrequest +// - execution: The resource name of the Execution that the Events connect +// Artifacts with. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe +// cutions/{execution}`. +func (r *ProjectsLocationsMetadataStoresExecutionsService) AddExecutionEvents(execution string, googlecloudaiplatformv1addexecutioneventsrequest *GoogleCloudAiplatformV1AddExecutionEventsRequest) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { + c := &ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.execution = execution + c.googlecloudaiplatformv1addexecutioneventsrequest = googlecloudaiplatformv1addexecutioneventsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { +func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall { +func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addcontextchildrenrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addexecutioneventsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:addContextChildren") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+execution}:addExecutionEvents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -70963,18 +73631,18 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) doReques } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "context": c.context, + "execution": c.execution, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.addContextChildren" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.addExecutionEvents" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1AddContextChildrenResponse.ServerResponse.Header or +// *GoogleCloudAiplatformV1AddExecutionEventsResponse.ServerResponse.Header or // (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddContextChildrenResponse, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddExecutionEventsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -70993,7 +73661,7 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Do(opts if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1AddContextChildrenResponse{ + ret := &GoogleCloudAiplatformV1AddExecutionEventsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71006,73 +73674,73 @@ func (c *ProjectsLocationsMetadataStoresContextsAddContextChildrenCall) Do(opts return ret, nil } -type ProjectsLocationsMetadataStoresContextsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresExecutionsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a Context associated with a MetadataStore. +// Create: Creates an Execution associated with a MetadataStore. // -// - parent: The resource name of the MetadataStore where the Context should be -// created. Format: +// - parent: The resource name of the MetadataStore where the Execution should +// be created. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresContextsService) Create(parent string, googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context) *ProjectsLocationsMetadataStoresContextsCreateCall { - c := &ProjectsLocationsMetadataStoresContextsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsService) Create(parent string, googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution) *ProjectsLocationsMetadataStoresExecutionsCreateCall { + c := &ProjectsLocationsMetadataStoresExecutionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1context = googlecloudaiplatformv1context + c.googlecloudaiplatformv1execution = googlecloudaiplatformv1execution return c } -// ContextId sets the optional parameter "contextId": The {context} portion of -// the resource name with the format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/conte -// xts/{context}`. If not provided, the Context's ID will be a UUID generated -// by the service. Must be 4-128 characters in length. Valid characters are -// `/a-z-/`. Must be unique across all Contexts in the parent MetadataStore. -// (Otherwise the request will fail with ALREADY_EXISTS, or PERMISSION_DENIED -// if the caller can't view the preexisting Context.) -func (c *ProjectsLocationsMetadataStoresContextsCreateCall) ContextId(contextId string) *ProjectsLocationsMetadataStoresContextsCreateCall { - c.urlParams_.Set("contextId", contextId) +// ExecutionId sets the optional parameter "executionId": The {execution} +// portion of the resource name with the format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/execu +// tions/{execution}` If not provided, the Execution's ID will be a UUID +// generated by the service. Must be 4-128 characters in length. Valid +// characters are `/a-z-/`. Must be unique across all Executions in the parent +// MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or +// PERMISSION_DENIED if the caller can't view the preexisting Execution.) +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) ExecutionId(executionId string) *ProjectsLocationsMetadataStoresExecutionsCreateCall { + c.urlParams_.Set("executionId", executionId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsCreateCall { +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsCreateCall { +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1context) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1execution) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contexts") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -71085,13 +73753,13 @@ func (c *ProjectsLocationsMetadataStoresContextsCreateCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.create" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Context.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1Execution.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71110,7 +73778,7 @@ func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Context{ + ret := &GoogleCloudAiplatformV1Execution{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71123,7 +73791,7 @@ func (c *ProjectsLocationsMetadataStoresContextsCreateCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsMetadataStoresContextsDeleteCall struct { +type ProjectsLocationsMetadataStoresExecutionsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -71131,56 +73799,49 @@ type ProjectsLocationsMetadataStoresContextsDeleteCall struct { header_ http.Header } -// Delete: Deletes a stored Context. +// Delete: Deletes an Execution. // -// - name: The resource name of the Context to delete. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}`. -func (r *ProjectsLocationsMetadataStoresContextsService) Delete(name string) *ProjectsLocationsMetadataStoresContextsDeleteCall { - c := &ProjectsLocationsMetadataStoresContextsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Execution to delete. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe +// cutions/{execution}`. +func (r *ProjectsLocationsMetadataStoresExecutionsService) Delete(name string) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { + c := &ProjectsLocationsMetadataStoresExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Etag sets the optional parameter "etag": The etag of the Context to delete. -// If this is provided, it must match the server's etag. Otherwise, the request -// will fail with a FAILED_PRECONDITION. -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresContextsDeleteCall { +// Etag sets the optional parameter "etag": The etag of the Execution to +// delete. If this is provided, it must match the server's etag. Otherwise, the +// request will fail with a FAILED_PRECONDITION. +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { c.urlParams_.Set("etag", etag) return c } -// Force sets the optional parameter "force": The force deletion semantics is -// still undefined. Users should not use this field. -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Force(force bool) *ProjectsLocationsMetadataStoresContextsDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsDeleteCall { +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsDeleteCall { +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -71198,13 +73859,13 @@ func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.delete" call. // 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 *ProjectsLocationsMetadataStoresContextsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71236,7 +73897,7 @@ func (c *ProjectsLocationsMetadataStoresContextsDeleteCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsMetadataStoresContextsGetCall struct { +type ProjectsLocationsMetadataStoresExecutionsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -71245,13 +73906,13 @@ type ProjectsLocationsMetadataStoresContextsGetCall struct { header_ http.Header } -// Get: Retrieves a specific Context. +// Get: Retrieves a specific Execution. // -// - name: The resource name of the Context to retrieve. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}`. -func (r *ProjectsLocationsMetadataStoresContextsService) Get(name string) *ProjectsLocationsMetadataStoresContextsGetCall { - c := &ProjectsLocationsMetadataStoresContextsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Execution to retrieve. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe +// cutions/{execution}`. +func (r *ProjectsLocationsMetadataStoresExecutionsService) Get(name string) *ProjectsLocationsMetadataStoresExecutionsGetCall { + c := &ProjectsLocationsMetadataStoresExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -71259,7 +73920,7 @@ func (r *ProjectsLocationsMetadataStoresContextsService) Get(name string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -71267,27 +73928,27 @@ func (c *ProjectsLocationsMetadataStoresContextsGetCall) Fields(s ...googleapi.F // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresContextsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -71308,13 +73969,13 @@ func (c *ProjectsLocationsMetadataStoresContextsGetCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Context.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1Execution.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresContextsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71333,7 +73994,7 @@ func (c *ProjectsLocationsMetadataStoresContextsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Context{ + ret := &GoogleCloudAiplatformV1Execution{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71346,7 +74007,7 @@ func (c *ProjectsLocationsMetadataStoresContextsGetCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsMetadataStoresContextsListCall struct { +type ProjectsLocationsMetadataStoresExecutionsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -71355,36 +74016,37 @@ type ProjectsLocationsMetadataStoresContextsListCall struct { header_ http.Header } -// List: Lists Contexts on the MetadataStore. +// List: Lists Executions in the MetadataStore. // -// - parent: The MetadataStore whose Contexts should be listed. Format: +// - parent: The MetadataStore whose Executions should be listed. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresContextsService) List(parent string) *ProjectsLocationsMetadataStoresContextsListCall { - c := &ProjectsLocationsMetadataStoresContextsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsService) List(parent string) *ProjectsLocationsMetadataStoresExecutionsListCall { + c := &ProjectsLocationsMetadataStoresExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filter specifying the boolean -// condition for the Contexts to satisfy in order to be part of the result set. -// The syntax to define filter query is based on https://google.aip.dev/160. -// Following are the supported set of filters: * **Attribute filtering**: For -// example: `display_name = "test". Supported fields include: `name`, -// `display_name`, `schema_title`, `create_time`, and `update_time`. Time -// fields, such as `create_time` and `update_time`, require values specified in -// RFC-3339 format. For example: `create_time = "2020-11-19T11:30:00-04:00". * -// **Metadata field**: To filter on metadata fields use traversal operation as -// follows: `metadata..`. For example: `metadata.field_1.number_value = 10.0`. -// In case the field name contains special characters (such as colon), one can -// embed it inside double quote. For example: `metadata."field:1".number_value -// = 10.0` * **Parent Child filtering**: To filter Contexts based on -// parent-child relationship use the HAS operator as follows: ``` -// parent_contexts: "projects//locations//metadataStores//contexts/" -// child_contexts: "projects//locations//metadataStores//contexts/" ``` Each of -// the above supported filters can be combined together using logical operators +// condition for the Executions to satisfy in order to be part of the result +// set. The syntax to define filter query is based on +// https://google.aip.dev/160. Following are the supported set of filters: * +// **Attribute filtering**: For example: `display_name = "test". Supported +// fields include: `name`, `display_name`, `state`, `schema_title`, +// `create_time`, and `update_time`. Time fields, such as `create_time` and +// `update_time`, require values specified in RFC-3339 format. For example: +// `create_time = "2020-11-19T11:30:00-04:00". * **Metadata field**: To filter +// on metadata fields use traversal operation as follows: `metadata..` For +// example: `metadata.field_1.number_value = 10.0` In case the field name +// contains special characters (such as colon), one can embed it inside double +// quote. For example: `metadata."field:1".number_value = 10.0` * **Context +// based filtering**: To filter Executions based on the contexts to which they +// belong use the function operator with the full resource name: +// `in_context()`. For example: +// `in_context("projects//locations//metadataStores//contexts/")` Each of the +// above supported filters can be combined together using logical operators // (`AND` & `OR`). Maximum nested expression depth allowed is 5. For example: // `display_name = "test" AND metadata.field1.bool_value = true`. -func (c *ProjectsLocationsMetadataStoresContextsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresExecutionsListCall { c.urlParams_.Set("filter", filter) return c } @@ -71395,25 +74057,25 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) Filter(filter string) // users append a " desc" suffix; for example: "foo desc, bar". Subfields are // specified with a `.` character, such as foo.bar. see // https://google.aip.dev/132#ordering for more details. -func (c *ProjectsLocationsMetadataStoresContextsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresExecutionsListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The maximum number of -// Contexts to return. The service may return fewer. Must be in range 1-1000, +// Executions to return. The service may return fewer. Must be in range 1-1000, // inclusive. Defaults to 100. -func (c *ProjectsLocationsMetadataStoresContextsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresExecutionsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous MetadataService.ListContexts call. Provide this to retrieve -// the subsequent page. When paginating, all other provided parameters must -// match the call that provided the page token. (Otherwise the request will -// fail with INVALID_ARGUMENT error.) -func (c *ProjectsLocationsMetadataStoresContextsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresContextsListCall { +// from a previous MetadataService.ListExecutions call. Provide this to +// retrieve the subsequent page. When paginating, all other provided parameters +// must match the call that provided the page token. (Otherwise the request +// will fail with an INVALID_ARGUMENT error.) +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresExecutionsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -71421,7 +74083,7 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) PageToken(pageToken st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -71429,27 +74091,27 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) Fields(s ...googleapi. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresContextsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -71457,7 +74119,7 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) 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/{+parent}/contexts") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -71470,13 +74132,13 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListContextsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListExecutionsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresContextsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListContextsResponse, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListExecutionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71495,7 +74157,7 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListContextsResponse{ + ret := &GoogleCloudAiplatformV1ListExecutionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71511,7 +74173,7 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) Do(opts ...googleapi.C // 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 *ProjectsLocationsMetadataStoresContextsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListContextsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListExecutionsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -71529,35 +74191,35 @@ func (c *ProjectsLocationsMetadataStoresContextsListCall) Pages(ctx context.Cont } } -type ProjectsLocationsMetadataStoresContextsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresExecutionsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a stored Context. +// Patch: Updates a stored Execution. // -// - name: Immutable. The resource name of the Context. -func (r *ProjectsLocationsMetadataStoresContextsService) Patch(name string, googlecloudaiplatformv1context *GoogleCloudAiplatformV1Context) *ProjectsLocationsMetadataStoresContextsPatchCall { - c := &ProjectsLocationsMetadataStoresContextsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. The resource name of the Execution. +func (r *ProjectsLocationsMetadataStoresExecutionsService) Patch(name string, googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution) *ProjectsLocationsMetadataStoresExecutionsPatchCall { + c := &ProjectsLocationsMetadataStoresExecutionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1context = googlecloudaiplatformv1context + c.googlecloudaiplatformv1execution = googlecloudaiplatformv1execution return c } // AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Context is not found, a new Context is created. -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresContextsPatchCall { +// the Execution is not found, a new Execution is created. +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresExecutionsPatchCall { c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) return c } // UpdateMask sets the optional parameter "updateMask": A FieldMask indicating // which fields should be updated. -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresContextsPatchCall { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresExecutionsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -71565,30 +74227,30 @@ func (c *ProjectsLocationsMetadataStoresContextsPatchCall) UpdateMask(updateMask // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsPatchCall { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsPatchCall { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1context) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1execution) if err != nil { return nil, err } @@ -71607,116 +74269,13 @@ func (c *ProjectsLocationsMetadataStoresContextsPatchCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Context.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresContextsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Context, 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 := &GoogleCloudAiplatformV1Context{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsMetadataStoresContextsPurgeCall struct { - s *Service - parent string - googlecloudaiplatformv1purgecontextsrequest *GoogleCloudAiplatformV1PurgeContextsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Purge: Purges Contexts. -// -// - parent: The metadata store to purge Contexts from. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresContextsService) Purge(parent string, googlecloudaiplatformv1purgecontextsrequest *GoogleCloudAiplatformV1PurgeContextsRequest) *ProjectsLocationsMetadataStoresContextsPurgeCall { - c := &ProjectsLocationsMetadataStoresContextsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1purgecontextsrequest = googlecloudaiplatformv1purgecontextsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsPurgeCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsPurgeCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgecontextsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/contexts: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 "aiplatform.projects.locations.metadataStores.contexts.purge" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.patch" call. // 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 +// *GoogleCloudAiplatformV1Execution.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71735,7 +74294,7 @@ func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1Execution{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71748,90 +74307,78 @@ func (c *ProjectsLocationsMetadataStoresContextsPurgeCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall struct { - s *Service - context string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// QueryContextLineageSubgraph: Retrieves Artifacts and Executions within the -// specified Context, connected by Event edges and returned as a -// LineageSubgraph. +type ProjectsLocationsMetadataStoresExecutionsPurgeCall struct { + s *Service + parent string + googlecloudaiplatformv1purgeexecutionsrequest *GoogleCloudAiplatformV1PurgeExecutionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Purge: Purges Executions. // -// - context: The resource name of the Context whose Artifacts and Executions -// should be retrieved as a LineageSubgraph. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}` The request may error with FAILED_PRECONDITION if the -// number of Artifacts, the number of Executions, or the number of Events -// that would be returned for the Context exceeds 1000. -func (r *ProjectsLocationsMetadataStoresContextsService) QueryContextLineageSubgraph(context string) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { - c := &ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.context = context +// - parent: The metadata store to purge Executions from. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. +func (r *ProjectsLocationsMetadataStoresExecutionsService) Purge(parent string, googlecloudaiplatformv1purgeexecutionsrequest *GoogleCloudAiplatformV1PurgeExecutionsRequest) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { + c := &ProjectsLocationsMetadataStoresExecutionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1purgeexecutionsrequest = googlecloudaiplatformv1purgeexecutionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { +func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall { +func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgeexecutionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:queryContextLineageSubgraph") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions: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{ - "context": c.context, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.queryContextLineageSubgraph" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.purge" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1LineageSubgraph.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71850,7 +74397,7 @@ func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1LineageSubgraph{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71863,81 +74410,88 @@ func (c *ProjectsLocationsMetadataStoresContextsQueryContextLineageSubgraphCall) return ret, nil } -type ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall struct { - s *Service - context string - googlecloudaiplatformv1removecontextchildrenrequest *GoogleCloudAiplatformV1RemoveContextChildrenRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall struct { + s *Service + execution string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RemoveContextChildren: Remove a set of children contexts from a parent -// Context. If any of the child Contexts were NOT added to the parent Context, -// they are simply skipped. +// QueryExecutionInputsAndOutputs: Obtains the set of input and output +// Artifacts for this Execution, in the form of LineageSubgraph that also +// contains the Execution and connecting Events. // -// - context: The resource name of the parent Context. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/con -// texts/{context}`. -func (r *ProjectsLocationsMetadataStoresContextsService) RemoveContextChildren(context string, googlecloudaiplatformv1removecontextchildrenrequest *GoogleCloudAiplatformV1RemoveContextChildrenRequest) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { - c := &ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.context = context - c.googlecloudaiplatformv1removecontextchildrenrequest = googlecloudaiplatformv1removecontextchildrenrequest +// - execution: The resource name of the Execution whose input and output +// Artifacts should be retrieved as a LineageSubgraph. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe +// cutions/{execution}`. +func (r *ProjectsLocationsMetadataStoresExecutionsService) QueryExecutionInputsAndOutputs(execution string) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { + c := &ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.execution = execution return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall { +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1removecontextchildrenrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+context}:removeContextChildren") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+execution}:queryExecutionInputsAndOutputs") 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{ - "context": c.context, + "execution": c.execution, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.removeContextChildren" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.queryExecutionInputsAndOutputs" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1RemoveContextChildrenResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudAiplatformV1LineageSubgraph.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RemoveContextChildrenResponse, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -71956,7 +74510,7 @@ func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1RemoveContextChildrenResponse{ + ret := &GoogleCloudAiplatformV1LineageSubgraph{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -71969,7 +74523,7 @@ func (c *ProjectsLocationsMetadataStoresContextsRemoveContextChildrenCall) Do(op return ret, nil } -type ProjectsLocationsMetadataStoresContextsOperationsCancelCall struct { +type ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -71988,8 +74542,8 @@ type ProjectsLocationsMetadataStoresContextsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { - c := &ProjectsLocationsMetadataStoresContextsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { + c := &ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -71997,27 +74551,27 @@ func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Cancel(name s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -72035,13 +74589,13 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.cancel" call. // 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 *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72073,7 +74627,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsCancelCall) Do(opts .. return ret, nil } -type ProjectsLocationsMetadataStoresContextsOperationsDeleteCall struct { +type ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -72087,8 +74641,8 @@ type ProjectsLocationsMetadataStoresContextsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { - c := &ProjectsLocationsMetadataStoresContextsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { + c := &ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -72096,27 +74650,27 @@ func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Delete(name s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -72134,13 +74688,13 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.delete" call. // 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 *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72172,7 +74726,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsDeleteCall) Do(opts .. return ret, nil } -type ProjectsLocationsMetadataStoresContextsOperationsGetCall struct { +type ProjectsLocationsMetadataStoresExecutionsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -72186,8 +74740,8 @@ type ProjectsLocationsMetadataStoresContextsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { - c := &ProjectsLocationsMetadataStoresContextsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { + c := &ProjectsLocationsMetadataStoresExecutionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -72195,7 +74749,7 @@ func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Get(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72203,27 +74757,27 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Fields(s ...g // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsGetCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -72244,13 +74798,13 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.get" call. // 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 *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72282,7 +74836,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsGetCall) Do(opts ...go return ret, nil } -type ProjectsLocationsMetadataStoresContextsOperationsListCall struct { +type ProjectsLocationsMetadataStoresExecutionsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -72295,28 +74849,28 @@ type ProjectsLocationsMetadataStoresContextsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsMetadataStoresContextsOperationsService) List(name string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { - c := &ProjectsLocationsMetadataStoresContextsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) List(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { + c := &ProjectsLocationsMetadataStoresExecutionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -72324,7 +74878,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) PageToken(pa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72332,27 +74886,27 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Fields(s ... // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsListCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -72373,13 +74927,13 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.list" call. // 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 *ProjectsLocationsMetadataStoresContextsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72414,7 +74968,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Do(opts ...g // 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 *ProjectsLocationsMetadataStoresContextsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -72432,7 +74986,7 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsListCall) Pages(ctx co } } -type ProjectsLocationsMetadataStoresContextsOperationsWaitCall struct { +type ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -72451,8 +75005,8 @@ type ProjectsLocationsMetadataStoresContextsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { - c := &ProjectsLocationsMetadataStoresContextsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { + c := &ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -72461,7 +75015,7 @@ func (r *ProjectsLocationsMetadataStoresContextsOperationsService) Wait(name str // before timing out. If left blank, the wait will be at most the time // permitted by the underlying HTTP/RPC protocol. If RPC context deadline is // also specified, the shorter one will be used. -func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -72469,27 +75023,27 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Timeout(time // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresContextsOperationsWaitCall { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -72507,13 +75061,13 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.contexts.operations.wait" call. +// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.wait" call. // 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 *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72545,306 +75099,92 @@ func (c *ProjectsLocationsMetadataStoresContextsOperationsWaitCall) Do(opts ...g return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall struct { - s *Service - execution string - googlecloudaiplatformv1addexecutioneventsrequest *GoogleCloudAiplatformV1AddExecutionEventsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// AddExecutionEvents: Adds Events to the specified Execution. An Event -// indicates whether an Artifact was used as an input or output for an -// Execution. If an Event already exists between the Execution and the -// Artifact, the Event is skipped. -// -// - execution: The resource name of the Execution that the Events connect -// Artifacts with. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe -// cutions/{execution}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) AddExecutionEvents(execution string, googlecloudaiplatformv1addexecutioneventsrequest *GoogleCloudAiplatformV1AddExecutionEventsRequest) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { - c := &ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.execution = execution - c.googlecloudaiplatformv1addexecutioneventsrequest = googlecloudaiplatformv1addexecutioneventsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1addexecutioneventsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+execution}:addExecutionEvents") - 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{ - "execution": c.execution, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.metadataStores.executions.addExecutionEvents" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1AddExecutionEventsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresExecutionsAddExecutionEventsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1AddExecutionEventsResponse, 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 := &GoogleCloudAiplatformV1AddExecutionEventsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsMetadataStoresExecutionsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresMetadataSchemasCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1metadataschema *GoogleCloudAiplatformV1MetadataSchema + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates an Execution associated with a MetadataStore. +// Create: Creates a MetadataSchema. // -// - parent: The resource name of the MetadataStore where the Execution should -// be created. Format: +// - parent: The resource name of the MetadataStore where the MetadataSchema +// should be created. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) Create(parent string, googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution) *ProjectsLocationsMetadataStoresExecutionsCreateCall { - c := &ProjectsLocationsMetadataStoresExecutionsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) Create(parent string, googlecloudaiplatformv1metadataschema *GoogleCloudAiplatformV1MetadataSchema) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { + c := &ProjectsLocationsMetadataStoresMetadataSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1execution = googlecloudaiplatformv1execution + c.googlecloudaiplatformv1metadataschema = googlecloudaiplatformv1metadataschema return c } -// ExecutionId sets the optional parameter "executionId": The {execution} -// portion of the resource name with the format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/execu -// tions/{execution}` If not provided, the Execution's ID will be a UUID -// generated by the service. Must be 4-128 characters in length. Valid -// characters are `/a-z-/`. Must be unique across all Executions in the parent -// MetadataStore. (Otherwise the request will fail with ALREADY_EXISTS, or -// PERMISSION_DENIED if the caller can't view the preexisting Execution.) -func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) ExecutionId(executionId string) *ProjectsLocationsMetadataStoresExecutionsCreateCall { - c.urlParams_.Set("executionId", executionId) +// MetadataSchemaId sets the optional parameter "metadataSchemaId": The +// {metadata_schema} portion of the resource name with the format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metad +// ataSchemas/{metadataschema}` If not provided, the MetadataStore's ID will be +// a UUID generated by the service. Must be 4-128 characters in length. Valid +// characters are `/a-z-/`. Must be unique across all MetadataSchemas in the +// parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or +// PERMISSION_DENIED if the caller can't view the preexisting MetadataSchema.) +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) MetadataSchemaId(metadataSchemaId string) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { + c.urlParams_.Set("metadataSchemaId", metadataSchemaId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsCreateCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsCreateCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1execution) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.metadataStores.executions.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Execution.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresExecutionsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, 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 := &GoogleCloudAiplatformV1Execution{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsMetadataStoresExecutionsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes an Execution. -// -// - name: The resource name of the Execution to delete. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe -// cutions/{execution}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) Delete(name string) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { - c := &ProjectsLocationsMetadataStoresExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Etag sets the optional parameter "etag": The etag of the Execution to -// delete. If this is provided, it must match the server's etag. Otherwise, the -// request will fail with a FAILED_PRECONDITION. -func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Etag(etag string) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { - c.urlParams_.Set("etag", etag) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1metadataschema) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataSchemas") 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 "aiplatform.projects.locations.metadataStores.executions.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.metadataSchemas.create" call. // 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 +// *GoogleCloudAiplatformV1MetadataSchema.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72863,7 +75203,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1MetadataSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -72876,7 +75216,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsGetCall struct { +type ProjectsLocationsMetadataStoresMetadataSchemasGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -72885,13 +75225,13 @@ type ProjectsLocationsMetadataStoresExecutionsGetCall struct { header_ http.Header } -// Get: Retrieves a specific Execution. +// Get: Retrieves a specific MetadataSchema. // -// - name: The resource name of the Execution to retrieve. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe -// cutions/{execution}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) Get(name string) *ProjectsLocationsMetadataStoresExecutionsGetCall { - c := &ProjectsLocationsMetadataStoresExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the MetadataSchema to retrieve. Format: +// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/met +// adataSchemas/{metadataschema}`. +func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) Get(name string) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { + c := &ProjectsLocationsMetadataStoresMetadataSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -72899,7 +75239,7 @@ func (r *ProjectsLocationsMetadataStoresExecutionsService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsGetCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -72907,27 +75247,27 @@ func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsGetCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsGetCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -72948,13 +75288,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.get" call. +// Do executes the "aiplatform.projects.locations.metadataStores.metadataSchemas.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Execution.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1MetadataSchema.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataSchema, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -72973,7 +75313,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Execution{ + ret := &GoogleCloudAiplatformV1MetadataSchema{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -72986,7 +75326,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsListCall struct { +type ProjectsLocationsMetadataStoresMetadataSchemasListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -72995,66 +75335,37 @@ type ProjectsLocationsMetadataStoresExecutionsListCall struct { header_ http.Header } -// List: Lists Executions in the MetadataStore. +// List: Lists MetadataSchemas. // -// - parent: The MetadataStore whose Executions should be listed. Format: +// - parent: The MetadataStore whose MetadataSchemas should be listed. Format: // `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) List(parent string) *ProjectsLocationsMetadataStoresExecutionsListCall { - c := &ProjectsLocationsMetadataStoresExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) List(parent string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { + c := &ProjectsLocationsMetadataStoresMetadataSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": Filter specifying the boolean -// condition for the Executions to satisfy in order to be part of the result -// set. The syntax to define filter query is based on -// https://google.aip.dev/160. Following are the supported set of filters: * -// **Attribute filtering**: For example: `display_name = "test". Supported -// fields include: `name`, `display_name`, `state`, `schema_title`, -// `create_time`, and `update_time`. Time fields, such as `create_time` and -// `update_time`, require values specified in RFC-3339 format. For example: -// `create_time = "2020-11-19T11:30:00-04:00". * **Metadata field**: To filter -// on metadata fields use traversal operation as follows: `metadata..` For -// example: `metadata.field_1.number_value = 10.0` In case the field name -// contains special characters (such as colon), one can embed it inside double -// quote. For example: `metadata."field:1".number_value = 10.0` * **Context -// based filtering**: To filter Executions based on the contexts to which they -// belong use the function operator with the full resource name: -// `in_context()`. For example: -// `in_context("projects//locations//metadataStores//contexts/")` Each of the -// above supported filters can be combined together using logical operators -// (`AND` & `OR`). Maximum nested expression depth allowed is 5. For example: -// `display_name = "test" AND metadata.field1.bool_value = true`. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresExecutionsListCall { +// Filter sets the optional parameter "filter": A query to filter available +// MetadataSchemas for matching results. +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Filter(filter string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.urlParams_.Set("filter", filter) return c } -// OrderBy sets the optional parameter "orderBy": How the list of messages is -// ordered. Specify the values to order by and an ordering operation. The -// default sorting order is ascending. To specify descending order for a field, -// users append a " desc" suffix; for example: "foo desc, bar". Subfields are -// specified with a `.` character, such as foo.bar. see -// https://google.aip.dev/132#ordering for more details. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsMetadataStoresExecutionsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": The maximum number of -// Executions to return. The service may return fewer. Must be in range 1-1000, -// inclusive. Defaults to 100. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresExecutionsListCall { +// MetadataSchemas to return. The service may return fewer. Must be in range +// 1-1000, inclusive. Defaults to 100. +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A page token, received -// from a previous MetadataService.ListExecutions call. Provide this to -// retrieve the subsequent page. When paginating, all other provided parameters -// must match the call that provided the page token. (Otherwise the request -// will fail with an INVALID_ARGUMENT error.) -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresExecutionsListCall { +// from a previous MetadataService.ListMetadataSchemas call. Provide this to +// retrieve the next page. When paginating, all other provided parameters must +// match the call that provided the page token. (Otherwise the request will +// fail with INVALID_ARGUMENT error.) +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -73062,7 +75373,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) PageToken(pageToken // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsListCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -73070,27 +75381,27 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Fields(s ...googleap // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsListCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsListCall { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -73098,7 +75409,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) 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/{+parent}/executions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataSchemas") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -73111,13 +75422,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.list" call. +// Do executes the "aiplatform.projects.locations.metadataStores.metadataSchemas.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListExecutionsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListMetadataSchemasResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListExecutionsResponse, error) { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListMetadataSchemasResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73136,7 +75447,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListExecutionsResponse{ + ret := &GoogleCloudAiplatformV1ListMetadataSchemasResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73152,7 +75463,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Do(opts ...googleapi // 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 *ProjectsLocationsMetadataStoresExecutionsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListExecutionsResponse) error) error { +func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListMetadataSchemasResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -73170,74 +75481,62 @@ func (c *ProjectsLocationsMetadataStoresExecutionsListCall) Pages(ctx context.Co } } -type ProjectsLocationsMetadataStoresExecutionsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a stored Execution. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - name: Output only. The resource name of the Execution. -func (r *ProjectsLocationsMetadataStoresExecutionsService) Patch(name string, googlecloudaiplatformv1execution *GoogleCloudAiplatformV1Execution) *ProjectsLocationsMetadataStoresExecutionsPatchCall { - c := &ProjectsLocationsMetadataStoresExecutionsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsMetadataStoresOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresOperationsCancelCall { + c := &ProjectsLocationsMetadataStoresOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1execution = googlecloudaiplatformv1execution - return c -} - -// AllowMissing sets the optional parameter "allowMissing": If set to true, and -// the Execution is not found, a new Execution is created. -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) AllowMissing(allowMissing bool) *ProjectsLocationsMetadataStoresExecutionsPatchCall { - c.urlParams_.Set("allowMissing", fmt.Sprint(allowMissing)) - return c -} - -// UpdateMask sets the optional parameter "updateMask": A FieldMask indicating -// which fields should be updated. -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsMetadataStoresExecutionsPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsPatchCall { +func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsPatchCall { +func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1execution) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -73248,13 +75547,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.patch" call. +// Do executes the "aiplatform.projects.locations.metadataStores.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Execution.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Execution, error) { +// *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 *ProjectsLocationsMetadataStoresOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73273,7 +75572,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Execution{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73286,78 +75585,74 @@ func (c *ProjectsLocationsMetadataStoresExecutionsPatchCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsPurgeCall struct { - s *Service - parent string - googlecloudaiplatformv1purgeexecutionsrequest *GoogleCloudAiplatformV1PurgeExecutionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Purge: Purges Executions. +// 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`. // -// - parent: The metadata store to purge Executions from. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) Purge(parent string, googlecloudaiplatformv1purgeexecutionsrequest *GoogleCloudAiplatformV1PurgeExecutionsRequest) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { - c := &ProjectsLocationsMetadataStoresExecutionsPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1purgeexecutionsrequest = googlecloudaiplatformv1purgeexecutionsrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsMetadataStoresOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresOperationsDeleteCall { + c := &ProjectsLocationsMetadataStoresOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { +func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsPurgeCall { +func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1purgeexecutionsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/executions:purge") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.purge" call. +// Do executes the "aiplatform.projects.locations.metadataStores.operations.delete" call. // 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 *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsMetadataStoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73376,7 +75671,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Do(opts ...googleap 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, @@ -73389,33 +75684,30 @@ func (c *ProjectsLocationsMetadataStoresExecutionsPurgeCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall struct { +type ProjectsLocationsMetadataStoresOperationsGetCall struct { s *Service - execution string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// QueryExecutionInputsAndOutputs: Obtains the set of input and output -// Artifacts for this Execution, in the form of LineageSubgraph that also -// contains the Execution and connecting Events. +// 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. // -// - execution: The resource name of the Execution whose input and output -// Artifacts should be retrieved as a LineageSubgraph. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/exe -// cutions/{execution}`. -func (r *ProjectsLocationsMetadataStoresExecutionsService) QueryExecutionInputsAndOutputs(execution string) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { - c := &ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.execution = execution +// - name: The name of the operation resource. +func (r *ProjectsLocationsMetadataStoresOperationsService) Get(name string) *ProjectsLocationsMetadataStoresOperationsGetCall { + c := &ProjectsLocationsMetadataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -73423,27 +75715,27 @@ func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputs // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -73451,7 +75743,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputs var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+execution}:queryExecutionInputsAndOutputs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -73459,18 +75751,18 @@ func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputs } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "execution": c.execution, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.queryExecutionInputsAndOutputs" call. +// Do executes the "aiplatform.projects.locations.metadataStores.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1LineageSubgraph.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1LineageSubgraph, error) { +func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73489,7 +75781,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputs if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1LineageSubgraph{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73502,62 +75794,87 @@ func (c *ProjectsLocationsMetadataStoresExecutionsQueryExecutionInputsAndOutputs return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMetadataStoresOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// 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 to be cancelled. -func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { - c := &ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsMetadataStoresOperationsService) List(name string) *ProjectsLocationsMetadataStoresOperationsListCall { + c := &ProjectsLocationsMetadataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsMetadataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsMetadataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsMetadataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsMetadataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall { +func (c *ProjectsLocationsMetadataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -73568,13 +75885,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.metadataStores.operations.list" call. // 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 *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, 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 *ProjectsLocationsMetadataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73593,7 +75910,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) 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, @@ -73606,7 +75923,28 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsCancelCall) Do(opts return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall struct { +// 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 *ProjectsLocationsMetadataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsMetadataStoresOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -73614,49 +75952,63 @@ type ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall struct { 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`. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { - c := &ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsMetadataStoresOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresOperationsWaitCall { + c := &ProjectsLocationsMetadataStoresOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall { +func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -73667,13 +76019,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.delete" call. +// Do executes the "aiplatform.projects.locations.metadataStores.operations.wait" call. // 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 *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsMetadataStoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73692,7 +76044,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Do(opts 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, @@ -73705,85 +76057,79 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsDeleteCall) Do(opts return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigratableResourcesBatchMigrateCall struct { + s *Service + parent string + googlecloudaiplatformv1batchmigrateresourcesrequest *GoogleCloudAiplatformV1BatchMigrateResourcesRequest + 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. +// BatchMigrate: Batch migrates resources from ml.googleapis.com, +// automl.googleapis.com, and datalabeling.googleapis.com to Vertex AI. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Get(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { - c := &ProjectsLocationsMetadataStoresExecutionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The location of the migrated resource will live in. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsMigratableResourcesService) BatchMigrate(parent string, googlecloudaiplatformv1batchmigrateresourcesrequest *GoogleCloudAiplatformV1BatchMigrateResourcesRequest) *ProjectsLocationsMigratableResourcesBatchMigrateCall { + c := &ProjectsLocationsMigratableResourcesBatchMigrateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchmigrateresourcesrequest = googlecloudaiplatformv1batchmigrateresourcesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { +func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesBatchMigrateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall { +func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesBatchMigrateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchmigrateresourcesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratableResources:batchMigrate") 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 "aiplatform.projects.locations.metadataStores.executions.operations.get" call. +// Do executes the "aiplatform.projects.locations.migratableResources.batchMigrate" call. // 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 *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73815,104 +76161,82 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsMetadataStoresExecutionsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigratableResourcesSearchCall struct { + s *Service + parent string + googlecloudaiplatformv1searchmigratableresourcesrequest *GoogleCloudAiplatformV1SearchMigratableResourcesRequest + 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`. +// Search: Searches all of the resources in automl.googleapis.com, +// datalabeling.googleapis.com and ml.googleapis.com that can be migrated to +// Vertex AI's given location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) List(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { - c := &ProjectsLocationsMetadataStoresExecutionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - parent: The location that the migratable resources should be searched +// from. It's the Vertex AI location that the resources can be migrated to, +// not the resources' original location. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsMigratableResourcesService) Search(parent string, googlecloudaiplatformv1searchmigratableresourcesrequest *GoogleCloudAiplatformV1SearchMigratableResourcesRequest) *ProjectsLocationsMigratableResourcesSearchCall { + c := &ProjectsLocationsMigratableResourcesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1searchmigratableresourcesrequest = googlecloudaiplatformv1searchmigratableresourcesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { +func (c *ProjectsLocationsMigratableResourcesSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesSearchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsListCall { +func (c *ProjectsLocationsMigratableResourcesSearchCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesSearchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesSearchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsMigratableResourcesSearchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchmigratableresourcesrequest) + if err != nil { + return nil, err + } 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}/migratableResources: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{ - "name": c.name, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.list" call. +// Do executes the "aiplatform.projects.locations.migratableResources.search" call. // 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 *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleCloudAiplatformV1SearchMigratableResourcesResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsMigratableResourcesSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchMigratableResourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -73931,7 +76255,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1SearchMigratableResourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -73947,9 +76271,9 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) 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 *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsMigratableResourcesSearchCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchMigratableResourcesResponse) error) error { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) + defer func(pt string) { c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken = pt }(c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken) for { x, err := c.Do() if err != nil { @@ -73961,11 +76285,11 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsListCall) Pages(ctx if x.NextPageToken == "" { return nil } - c.PageToken(x.NextPageToken) + c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken = x.NextPageToken } } -type ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall struct { +type ProjectsLocationsMigratableResourcesOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -73973,61 +76297,52 @@ type ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall struct { header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsMetadataStoresExecutionsOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { - c := &ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsMigratableResourcesOperationsService) Cancel(name string) *ProjectsLocationsMigratableResourcesOperationsCancelCall { + c := &ProjectsLocationsMigratableResourcesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { +func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall { +func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -74040,13 +76355,13 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.executions.operations.wait" call. +// Do executes the "aiplatform.projects.locations.migratableResources.operations.cancel" call. // 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 *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsMigratableResourcesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74065,7 +76380,7 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) 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, @@ -74078,92 +76393,74 @@ func (c *ProjectsLocationsMetadataStoresExecutionsOperationsWaitCall) Do(opts .. return ret, nil } -type ProjectsLocationsMetadataStoresMetadataSchemasCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1metadataschema *GoogleCloudAiplatformV1MetadataSchema - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsMigratableResourcesOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a MetadataSchema. +// 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`. // -// - parent: The resource name of the MetadataStore where the MetadataSchema -// should be created. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) Create(parent string, googlecloudaiplatformv1metadataschema *GoogleCloudAiplatformV1MetadataSchema) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { - c := &ProjectsLocationsMetadataStoresMetadataSchemasCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1metadataschema = googlecloudaiplatformv1metadataschema - return c -} - -// MetadataSchemaId sets the optional parameter "metadataSchemaId": The -// {metadata_schema} portion of the resource name with the format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/metad -// ataSchemas/{metadataschema}` If not provided, the MetadataStore's ID will be -// a UUID generated by the service. Must be 4-128 characters in length. Valid -// characters are `/a-z-/`. Must be unique across all MetadataSchemas in the -// parent Location. (Otherwise the request will fail with ALREADY_EXISTS, or -// PERMISSION_DENIED if the caller can't view the preexisting MetadataSchema.) -func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) MetadataSchemaId(metadataSchemaId string) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { - c.urlParams_.Set("metadataSchemaId", metadataSchemaId) +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsMigratableResourcesOperationsService) Delete(name string) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { + c := &ProjectsLocationsMigratableResourcesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { +func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall { +func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1metadataschema) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataSchemas") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.metadataSchemas.create" call. +// Do executes the "aiplatform.projects.locations.migratableResources.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1MetadataSchema.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataSchema, error) { +// *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 *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74182,7 +76479,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1MetadataSchema{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74195,7 +76492,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasCreateCall) Do(opts ...go return ret, nil } -type ProjectsLocationsMetadataStoresMetadataSchemasGetCall struct { +type ProjectsLocationsMigratableResourcesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -74204,13 +76501,13 @@ type ProjectsLocationsMetadataStoresMetadataSchemasGetCall struct { header_ http.Header } -// Get: Retrieves a specific MetadataSchema. +// 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 resource name of the MetadataSchema to retrieve. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}/met -// adataSchemas/{metadataschema}`. -func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) Get(name string) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { - c := &ProjectsLocationsMetadataStoresMetadataSchemasGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsMigratableResourcesOperationsService) Get(name string) *ProjectsLocationsMigratableResourcesOperationsGetCall { + c := &ProjectsLocationsMigratableResourcesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -74218,7 +76515,7 @@ func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74226,27 +76523,27 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigratableResourcesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasGetCall { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -74267,13 +76564,13 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.metadataSchemas.get" call. +// Do executes the "aiplatform.projects.locations.migratableResources.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1MetadataSchema.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1MetadataSchema, error) { +func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74292,7 +76589,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1MetadataSchema{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74305,46 +76602,41 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsMetadataStoresMetadataSchemasListCall struct { +type ProjectsLocationsMigratableResourcesOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists MetadataSchemas. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The MetadataStore whose MetadataSchemas should be listed. Format: -// `projects/{project}/locations/{location}/metadataStores/{metadatastore}`. -func (r *ProjectsLocationsMetadataStoresMetadataSchemasService) List(parent string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { - c := &ProjectsLocationsMetadataStoresMetadataSchemasListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsMigratableResourcesOperationsService) List(name string) *ProjectsLocationsMigratableResourcesOperationsListCall { + c := &ProjectsLocationsMigratableResourcesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// Filter sets the optional parameter "filter": A query to filter available -// MetadataSchemas for matching results. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Filter(filter string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Filter(filter string) *ProjectsLocationsMigratableResourcesOperationsListCall { c.urlParams_.Set("filter", filter) return c } -// PageSize sets the optional parameter "pageSize": The maximum number of -// MetadataSchemas to return. The service may return fewer. Must be in range -// 1-1000, inclusive. Defaults to 100. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMigratableResourcesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": A page token, received -// from a previous MetadataService.ListMetadataSchemas call. Provide this to -// retrieve the next page. When paginating, all other provided parameters must -// match the call that provided the page token. (Otherwise the request will -// fail with INVALID_ARGUMENT error.) -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMigratableResourcesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -74352,7 +76644,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) PageToken(pageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74360,27 +76652,27 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Fields(s ...goo // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigratableResourcesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresMetadataSchemasListCall { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -74388,7 +76680,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) doRequest(alt s var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/metadataSchemas") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -74396,18 +76688,18 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) doRequest(alt s } 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 "aiplatform.projects.locations.metadataStores.metadataSchemas.list" call. +// Do executes the "aiplatform.projects.locations.migratableResources.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListMetadataSchemasResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListMetadataSchemasResponse, error) { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74426,7 +76718,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListMetadataSchemasResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74442,7 +76734,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Do(opts ...goog // 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 *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListMetadataSchemasResponse) error) error { +func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -74460,7 +76752,7 @@ func (c *ProjectsLocationsMetadataStoresMetadataSchemasListCall) Pages(ctx conte } } -type ProjectsLocationsMetadataStoresOperationsCancelCall struct { +type ProjectsLocationsMigratableResourcesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -74468,52 +76760,165 @@ type ProjectsLocationsMetadataStoresOperationsCancelCall struct { header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsMetadataStoresOperationsService) Cancel(name string) *ProjectsLocationsMetadataStoresOperationsCancelCall { - c := &ProjectsLocationsMetadataStoresOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsMigratableResourcesOperationsService) Wait(name string) *ProjectsLocationsMigratableResourcesOperationsWaitCall { + c := &ProjectsLocationsMigratableResourcesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMigratableResourcesOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsCancelCall { +func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsCancelCall { +func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.migratableResources.operations.wait" call. +// 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 *ProjectsLocationsMigratableResourcesOperationsWaitCall) 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 +} + +type ProjectsLocationsModelDeploymentMonitoringJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a ModelDeploymentMonitoringJob. It will run periodically on +// a configured interval. +// +// - parent: The parent of the ModelDeploymentMonitoringJob. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Create(parent string, googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1modeldeploymentmonitoringjob = googlecloudaiplatformv1modeldeploymentmonitoringjob + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1modeldeploymentmonitoringjob) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/modelDeploymentMonitoringJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -74521,18 +76926,18 @@ func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) doRequest(alt stri } 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 "aiplatform.projects.locations.metadataStores.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.create" call. // 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 *ProjectsLocationsMetadataStoresOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelDeploymentMonitoringJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74551,7 +76956,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ModelDeploymentMonitoringJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74564,7 +76969,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsCancelCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsMetadataStoresOperationsDeleteCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -74572,14 +76977,13 @@ type ProjectsLocationsMetadataStoresOperationsDeleteCall struct { 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`. +// Delete: Deletes a ModelDeploymentMonitoringJob. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsMetadataStoresOperationsService) Delete(name string) *ProjectsLocationsMetadataStoresOperationsDeleteCall { - c := &ProjectsLocationsMetadataStoresOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the model monitoring job to delete. Format: +// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod +// el_deployment_monitoring_job}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Delete(name string) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -74587,27 +76991,27 @@ func (r *ProjectsLocationsMetadataStoresOperationsService) Delete(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsDeleteCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsDeleteCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -74625,13 +77029,13 @@ func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.operations.delete" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.delete" call. // 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 *ProjectsLocationsMetadataStoresOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74650,7 +77054,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Do(opts ...googlea 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, @@ -74663,7 +77067,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsMetadataStoresOperationsGetCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -74672,13 +77076,13 @@ type ProjectsLocationsMetadataStoresOperationsGetCall 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 ModelDeploymentMonitoringJob. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsMetadataStoresOperationsService) Get(name string) *ProjectsLocationsMetadataStoresOperationsGetCall { - c := &ProjectsLocationsMetadataStoresOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the ModelDeploymentMonitoringJob. Format: +// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod +// el_deployment_monitoring_job}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Get(name string) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -74686,7 +77090,7 @@ func (r *ProjectsLocationsMetadataStoresOperationsService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74694,27 +77098,27 @@ func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -74735,13 +77139,13 @@ func (c *ProjectsLocationsMetadataStoresOperationsGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.operations.get" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.get" call. // 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 +// *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelDeploymentMonitoringJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74760,7 +77164,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ModelDeploymentMonitoringJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74773,49 +77177,66 @@ func (c *ProjectsLocationsMetadataStoresOperationsGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsMetadataStoresOperationsListCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsListCall 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 ModelDeploymentMonitoringJobs in a Location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsMetadataStoresOperationsService) List(name string) *ProjectsLocationsMetadataStoresOperationsListCall { - c := &ProjectsLocationsMetadataStoresOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The parent of the ModelDeploymentMonitoringJob. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) List(parent string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) Filter(filter string) *ProjectsLocationsMetadataStoresOperationsListCall { +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports +// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 +// format. * `labels` supports general map functions that is: +// `labels.key=value` - key:value equality `labels.key:* - key existence Some +// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND +// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR +// display_name="my_job" * `NOT display_name="my_job" * +// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * +// `labels.keyB:*` +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Filter(filter string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMetadataStoresOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) PageSize(pageSize int64) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMetadataStoresOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) PageToken(pageToken string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) ReadMask(readMask string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -74823,27 +77244,27 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) Fields(s ...googleap // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMetadataStoresOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -74851,7 +77272,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) 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/{+name}/operations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/modelDeploymentMonitoringJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -74859,18 +77280,18 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) 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 "aiplatform.projects.locations.metadataStores.operations.list" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.list" call. // 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 *ProjectsLocationsMetadataStoresOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +// *GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse.ServerRespo +// nse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -74889,7 +77310,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -74905,7 +77326,7 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) Do(opts ...googleapi // 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 *ProjectsLocationsMetadataStoresOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -74923,71 +77344,87 @@ func (c *ProjectsLocationsMetadataStoresOperationsListCall) Pages(ctx context.Co } } -type ProjectsLocationsMetadataStoresOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelDeploymentMonitoringJobsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// Patch: Updates a ModelDeploymentMonitoringJob. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsMetadataStoresOperationsService) Wait(name string) *ProjectsLocationsMetadataStoresOperationsWaitCall { - c := &ProjectsLocationsMetadataStoresOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Output only. Resource name of a ModelDeploymentMonitoringJob. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Patch(name string, googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1modeldeploymentmonitoringjob = googlecloudaiplatformv1modeldeploymentmonitoringjob return c } -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMetadataStoresOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask is used to specify the fields to be overwritten in the +// ModelDeploymentMonitoringJob 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 only the non-empty fields present in the request will be +// overwritten. Set the update_mask to `*` to override all fields. For the +// objective config, the user can either provide the update mask for +// model_deployment_monitoring_objective_configs or any combination of its +// nested fields, such as: +// model_deployment_monitoring_objective_configs.objective_config.training_datas +// et. Updatable fields: * `display_name` * +// `model_deployment_monitoring_schedule_config` * +// `model_monitoring_alert_config` * `logging_sampling_strategy` * `labels` * +// `log_ttl` * `enable_monitoring_pipeline_logs` . and * +// `model_deployment_monitoring_objective_configs` . or * +// `model_deployment_monitoring_objective_configs.objective_config.training_data +// set` * +// `model_deployment_monitoring_objective_configs.objective_config.training_pred +// iction_skew_detection_config` * +// `model_deployment_monitoring_objective_configs.objective_config.prediction_dr +// ift_detection_config` +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMetadataStoresOperationsWaitCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMetadataStoresOperationsWaitCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1modeldeploymentmonitoringjob) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + 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 } @@ -74998,13 +77435,13 @@ func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.metadataStores.operations.wait" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.patch" call. // 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 *ProjectsLocationsMetadataStoresOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75036,60 +77473,63 @@ func (c *ProjectsLocationsMetadataStoresOperationsWaitCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsMigratableResourcesBatchMigrateCall struct { - s *Service - parent string - googlecloudaiplatformv1batchmigrateresourcesrequest *GoogleCloudAiplatformV1BatchMigrateResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelDeploymentMonitoringJobsPauseCall struct { + s *Service + name string + googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchMigrate: Batch migrates resources from ml.googleapis.com, -// automl.googleapis.com, and datalabeling.googleapis.com to Vertex AI. +// Pause: Pauses a ModelDeploymentMonitoringJob. If the job is running, the +// server makes a best effort to cancel the job. Will mark +// ModelDeploymentMonitoringJob.state to 'PAUSED'. // -// - parent: The location of the migrated resource will live in. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsMigratableResourcesService) BatchMigrate(parent string, googlecloudaiplatformv1batchmigrateresourcesrequest *GoogleCloudAiplatformV1BatchMigrateResourcesRequest) *ProjectsLocationsMigratableResourcesBatchMigrateCall { - c := &ProjectsLocationsMigratableResourcesBatchMigrateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchmigrateresourcesrequest = googlecloudaiplatformv1batchmigrateresourcesrequest +// - name: The resource name of the ModelDeploymentMonitoringJob to pause. +// Format: +// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod +// el_deployment_monitoring_job}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Pause(name string, googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest = googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesBatchMigrateCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesBatchMigrateCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchmigrateresourcesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratableResources:batchMigrate") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:pause") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -75097,18 +77537,18 @@ func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) doRequest(alt str } 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 "aiplatform.projects.locations.migratableResources.batchMigrate" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.pause" call. // 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 *ProjectsLocationsMigratableResourcesBatchMigrateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75127,7 +77567,7 @@ func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Do(opts ...google 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, @@ -75140,63 +77580,63 @@ func (c *ProjectsLocationsMigratableResourcesBatchMigrateCall) Do(opts ...google return ret, nil } -type ProjectsLocationsMigratableResourcesSearchCall struct { - s *Service - parent string - googlecloudaiplatformv1searchmigratableresourcesrequest *GoogleCloudAiplatformV1SearchMigratableResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelDeploymentMonitoringJobsResumeCall struct { + s *Service + name string + googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1ResumeModelDeploymentMonitoringJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Search: Searches all of the resources in automl.googleapis.com, -// datalabeling.googleapis.com and ml.googleapis.com that can be migrated to -// Vertex AI's given location. +// Resume: Resumes a paused ModelDeploymentMonitoringJob. It will start to run +// from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be +// resumed. // -// - parent: The location that the migratable resources should be searched -// from. It's the Vertex AI location that the resources can be migrated to, -// not the resources' original location. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsMigratableResourcesService) Search(parent string, googlecloudaiplatformv1searchmigratableresourcesrequest *GoogleCloudAiplatformV1SearchMigratableResourcesRequest) *ProjectsLocationsMigratableResourcesSearchCall { - c := &ProjectsLocationsMigratableResourcesSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1searchmigratableresourcesrequest = googlecloudaiplatformv1searchmigratableresourcesrequest +// - name: The resource name of the ModelDeploymentMonitoringJob to resume. +// Format: +// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod +// el_deployment_monitoring_job}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Resume(name string, googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1ResumeModelDeploymentMonitoringJobRequest) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest = googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesSearchCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesSearchCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesSearchCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesSearchCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesSearchCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesSearchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchmigratableresourcesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/migratableResources:search") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resume") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -75204,18 +77644,124 @@ func (c *ProjectsLocationsMigratableResourcesSearchCall) doRequest(alt string) ( } 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 "aiplatform.projects.locations.migratableResources.search" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.resume" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SearchMigratableResourcesResponse.ServerResponse.Head -// er or (if a response was returned at all) in +// *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 *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) 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 +} + +type ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall struct { + s *Service + modelDeploymentMonitoringJob string + googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SearchModelDeploymentMonitoringStatsAnomalies: Searches Model Monitoring +// Statistics generated within a given time window. +// +// - modelDeploymentMonitoringJob: ModelDeploymentMonitoring Job resource name. +// Format: +// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod +// el_deployment_monitoring_job}`. +func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) SearchModelDeploymentMonitoringStatsAnomalies(modelDeploymentMonitoringJob string, googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesRequest) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.modelDeploymentMonitoringJob = modelDeploymentMonitoringJob + c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest = googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+modelDeploymentMonitoringJob}:searchModelDeploymentMonitoringStatsAnomalies") + 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{ + "modelDeploymentMonitoringJob": c.modelDeploymentMonitoringJob, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.searchModelDeploymentMonitoringStatsAnomalies" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse +// .ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsMigratableResourcesSearchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchMigratableResourcesResponse, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75234,7 +77780,7 @@ func (c *ProjectsLocationsMigratableResourcesSearchCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SearchMigratableResourcesResponse{ + ret := &GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -75250,9 +77796,11 @@ func (c *ProjectsLocationsMigratableResourcesSearchCall) 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 *ProjectsLocationsMigratableResourcesSearchCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchMigratableResourcesResponse) error) error { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse) error) error { c.ctx_ = ctx - defer func(pt string) { c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken = pt }(c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken) + defer func(pt string) { + c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken = pt + }(c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken) for { x, err := c.Do() if err != nil { @@ -75264,11 +77812,11 @@ func (c *ProjectsLocationsMigratableResourcesSearchCall) Pages(ctx context.Conte if x.NextPageToken == "" { return nil } - c.googlecloudaiplatformv1searchmigratableresourcesrequest.PageToken = x.NextPageToken + c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken = x.NextPageToken } } -type ProjectsLocationsMigratableResourcesOperationsCancelCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75287,8 +77835,8 @@ type ProjectsLocationsMigratableResourcesOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsMigratableResourcesOperationsService) Cancel(name string) *ProjectsLocationsMigratableResourcesOperationsCancelCall { - c := &ProjectsLocationsMigratableResourcesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Cancel(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -75296,27 +77844,27 @@ func (r *ProjectsLocationsMigratableResourcesOperationsService) Cancel(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsCancelCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsCancelCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -75334,13 +77882,13 @@ func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.migratableResources.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.cancel" call. // 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 *ProjectsLocationsMigratableResourcesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75372,7 +77920,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsCancelCall) Do(opts ...go return ret, nil } -type ProjectsLocationsMigratableResourcesOperationsDeleteCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75386,8 +77934,8 @@ type ProjectsLocationsMigratableResourcesOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsMigratableResourcesOperationsService) Delete(name string) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { - c := &ProjectsLocationsMigratableResourcesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Delete(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -75395,27 +77943,27 @@ func (r *ProjectsLocationsMigratableResourcesOperationsService) Delete(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsDeleteCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -75433,13 +77981,13 @@ func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.migratableResources.operations.delete" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.delete" call. // 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 *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75471,7 +78019,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsMigratableResourcesOperationsGetCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75485,8 +78033,8 @@ type ProjectsLocationsMigratableResourcesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsMigratableResourcesOperationsService) Get(name string) *ProjectsLocationsMigratableResourcesOperationsGetCall { - c := &ProjectsLocationsMigratableResourcesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Get(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -75494,7 +78042,7 @@ func (r *ProjectsLocationsMigratableResourcesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -75502,27 +78050,27 @@ func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigratableResourcesOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsGetCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -75543,13 +78091,13 @@ func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.migratableResources.operations.get" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.get" call. // 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 *ProjectsLocationsMigratableResourcesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75581,7 +78129,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsMigratableResourcesOperationsListCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75594,28 +78142,28 @@ type ProjectsLocationsMigratableResourcesOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsMigratableResourcesOperationsService) List(name string) *ProjectsLocationsMigratableResourcesOperationsListCall { - c := &ProjectsLocationsMigratableResourcesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) List(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Filter(filter string) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Filter(filter string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -75623,7 +78171,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsListCall) PageToken(pageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -75631,27 +78179,27 @@ func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Fields(s ...goo // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsListCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -75672,13 +78220,13 @@ func (c *ProjectsLocationsMigratableResourcesOperationsListCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.migratableResources.operations.list" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.list" call. // 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 *ProjectsLocationsMigratableResourcesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75713,7 +78261,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Do(opts ...goog // 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 *ProjectsLocationsMigratableResourcesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -75731,7 +78279,7 @@ func (c *ProjectsLocationsMigratableResourcesOperationsListCall) Pages(ctx conte } } -type ProjectsLocationsMigratableResourcesOperationsWaitCall struct { +type ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75750,8 +78298,8 @@ type ProjectsLocationsMigratableResourcesOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsMigratableResourcesOperationsService) Wait(name string) *ProjectsLocationsMigratableResourcesOperationsWaitCall { - c := &ProjectsLocationsMigratableResourcesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Wait(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { + c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -75760,7 +78308,7 @@ func (r *ProjectsLocationsMigratableResourcesOperationsService) Wait(name string // before timing out. If left blank, the wait will be at most the time // permitted by the underlying HTTP/RPC protocol. If RPC context deadline is // also specified, the shorter one will be used. -func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsMigratableResourcesOperationsWaitCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -75768,27 +78316,27 @@ func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Timeout(timeout // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigratableResourcesOperationsWaitCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsMigratableResourcesOperationsWaitCall { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -75806,13 +78354,13 @@ func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.migratableResources.operations.wait" call. +// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.wait" call. // 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 *ProjectsLocationsMigratableResourcesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75844,60 +78392,63 @@ func (c *ProjectsLocationsMigratableResourcesOperationsWaitCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsCopyCall struct { + s *Service + parent string + googlecloudaiplatformv1copymodelrequest *GoogleCloudAiplatformV1CopyModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a ModelDeploymentMonitoringJob. It will run periodically on -// a configured interval. +// Copy: Copies an already existing Vertex AI Model into the specified +// Location. The source Model must exist in the same Project. When copying +// custom Models, the users themselves are responsible for Model.metadata +// content to be region-agnostic, as well as making sure that any resources +// (e.g. files) it depends on remain accessible. // -// - parent: The parent of the ModelDeploymentMonitoringJob. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Create(parent string, googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location into which to copy the Model. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsModelsService) Copy(parent string, googlecloudaiplatformv1copymodelrequest *GoogleCloudAiplatformV1CopyModelRequest) *ProjectsLocationsModelsCopyCall { + c := &ProjectsLocationsModelsCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1modeldeploymentmonitoringjob = googlecloudaiplatformv1modeldeploymentmonitoringjob + c.googlecloudaiplatformv1copymodelrequest = googlecloudaiplatformv1copymodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { +func (c *ProjectsLocationsModelsCopyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsCopyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall { +func (c *ProjectsLocationsModelsCopyCall) Context(ctx context.Context) *ProjectsLocationsModelsCopyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsModelsCopyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsCopyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1modeldeploymentmonitoringjob) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1copymodelrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/modelDeploymentMonitoringJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models:copy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -75910,13 +78461,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.create" call. +// Do executes the "aiplatform.projects.locations.models.copy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *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 *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelDeploymentMonitoringJob, error) { +func (c *ProjectsLocationsModelsCopyCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -75935,7 +78486,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ModelDeploymentMonitoringJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -75948,7 +78499,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsCreateCall) Do(opts ...go return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall struct { +type ProjectsLocationsModelsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -75956,13 +78507,13 @@ type ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall struct { header_ http.Header } -// Delete: Deletes a ModelDeploymentMonitoringJob. +// Delete: Deletes a Model. A model cannot be deleted if any Endpoint resource +// has a DeployedModel based on the model in its deployed_models field. // -// - name: The resource name of the model monitoring job to delete. Format: -// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod -// el_deployment_monitoring_job}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Delete(name string) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Model resource to be deleted. Format: +// `projects/{project}/locations/{location}/models/{model}`. +func (r *ProjectsLocationsModelsService) Delete(name string) *ProjectsLocationsModelsDeleteCall { + c := &ProjectsLocationsModelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -75970,27 +78521,27 @@ func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Delete(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { +func (c *ProjectsLocationsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall { +func (c *ProjectsLocationsModelsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsModelsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -76008,13 +78559,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.delete" call. +// Do executes the "aiplatform.projects.locations.models.delete" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76046,7 +78597,213 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsGetCall struct { +type ProjectsLocationsModelsDeleteVersionCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DeleteVersion: Deletes a Model version. Model version can only be deleted if +// there are no DeployedModels created from it. Deleting the only version in +// the Model is not allowed. Use DeleteModel for deleting the Model instead. +// +// - name: The name of the model version to be deleted, with a version ID +// explicitly included. Example: +// `projects/{project}/locations/{location}/models/{model}@1234`. +func (r *ProjectsLocationsModelsService) DeleteVersion(name string) *ProjectsLocationsModelsDeleteVersionCall { + c := &ProjectsLocationsModelsDeleteVersionCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsModelsDeleteVersionCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsDeleteVersionCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsModelsDeleteVersionCall) Context(ctx context.Context) *ProjectsLocationsModelsDeleteVersionCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsModelsDeleteVersionCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsModelsDeleteVersionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteVersion") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.models.deleteVersion" call. +// 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 *ProjectsLocationsModelsDeleteVersionCall) 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 +} + +type ProjectsLocationsModelsExportCall struct { + s *Service + name string + googlecloudaiplatformv1exportmodelrequest *GoogleCloudAiplatformV1ExportModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Export: Exports a trained, exportable Model to a location specified by the +// user. A Model is considered to be exportable if it has at least one +// supported export format. +// +// - name: The resource name of the Model to export. The resource name may +// contain version id or version alias to specify the version, if no version +// is specified, the default version will be exported. +func (r *ProjectsLocationsModelsService) Export(name string, googlecloudaiplatformv1exportmodelrequest *GoogleCloudAiplatformV1ExportModelRequest) *ProjectsLocationsModelsExportCall { + c := &ProjectsLocationsModelsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1exportmodelrequest = googlecloudaiplatformv1exportmodelrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsModelsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsExportCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsModelsExportCall) Context(ctx context.Context) *ProjectsLocationsModelsExportCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsModelsExportCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsModelsExportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportmodelrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("POST", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.models.export" call. +// 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 *ProjectsLocationsModelsExportCall) 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 +} + +type ProjectsLocationsModelsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -76055,13 +78812,20 @@ type ProjectsLocationsModelDeploymentMonitoringJobsGetCall struct { header_ http.Header } -// Get: Gets a ModelDeploymentMonitoringJob. +// Get: Gets a Model. // -// - name: The resource name of the ModelDeploymentMonitoringJob. Format: -// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod -// el_deployment_monitoring_job}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Get(name string) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the Model resource. Format: +// `projects/{project}/locations/{location}/models/{model}` In order to +// retrieve a specific version of the model, also provide the version ID or +// version alias. Example: +// `projects/{project}/locations/{location}/models/{model}@2` or +// `projects/{project}/locations/{location}/models/{model}@golden` If no +// version ID or alias is specified, the "default" version will be returned. +// The "default" version alias is created for the first version of the model, +// and can be moved to other versions later on. There will be exactly one +// default version. +func (r *ProjectsLocationsModelsService) Get(name string) *ProjectsLocationsModelsGetCall { + c := &ProjectsLocationsModelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -76069,62 +78833,178 @@ func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { +func (c *ProjectsLocationsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsModelsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsModelsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsModelsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsModelsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.models.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1Model.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsModelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, 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 := &GoogleCloudAiplatformV1Model{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsModelsGetIamPolicyCall struct { + s *Service + resource string + 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. +// +// - 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 *ProjectsLocationsModelsService) GetIamPolicy(resource string) *ProjectsLocationsModelsGetIamPolicyCall { + c := &ProjectsLocationsModelsGetIamPolicyCall{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 *ProjectsLocationsModelsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsModelsGetIamPolicyCall { + 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 +// details. +func (c *ProjectsLocationsModelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsGetCall { +func (c *ProjectsLocationsModelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsModelsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsModelsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 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 "aiplatform.projects.locations.modelDeploymentMonitoringJobs.get" call. +// Do executes the "aiplatform.projects.locations.models.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelDeploymentMonitoringJob, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76143,7 +79023,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ModelDeploymentMonitoringJob{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76156,7 +79036,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsListCall struct { +type ProjectsLocationsModelsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -76165,49 +79045,58 @@ type ProjectsLocationsModelDeploymentMonitoringJobsListCall struct { header_ http.Header } -// List: Lists ModelDeploymentMonitoringJobs in a Location. +// List: Lists Models in a Location. // -// - parent: The parent of the ModelDeploymentMonitoringJob. Format: +// - parent: The resource name of the Location to list the Models from. Format: // `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) List(parent string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsModelsService) List(parent string) *ProjectsLocationsModelsListCall { + c := &ProjectsLocationsModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports -// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 -// format. * `labels` supports general map functions that is: -// `labels.key=value` - key:value equality `labels.key:* - key existence Some -// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND -// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR -// display_name="my_job" * `NOT display_name="my_job" * -// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * -// `labels.keyB:*` -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Filter(filter string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `model` supports = and !=. `model` represents the Model ID, +// i.e. the last segment of the Model's resource name. * `display_name` +// supports = and != * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". * +// `base_model_name` only supports = Some examples: * `model=1234` * +// `displayName="myDisplayName" * `labels.myKey="myValue" * +// `baseModelName="text-bison" +func (c *ProjectsLocationsModelsListCall) Filter(filter string) *ProjectsLocationsModelsListCall { 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: * `display_name` * `create_time` * +// `update_time` Example: `display_name, create_time desc`. +func (c *ProjectsLocationsModelsListCall) OrderBy(orderBy string) *ProjectsLocationsModelsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) PageSize(pageSize int64) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +func (c *ProjectsLocationsModelsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) PageToken(pageToken string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +// token. Typically obtained via ListModelsResponse.next_page_token of the +// previous ModelService.ListModels call. +func (c *ProjectsLocationsModelsListCall) PageToken(pageToken string) *ProjectsLocationsModelsListCall { c.urlParams_.Set("pageToken", pageToken) return c } // ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) ReadMask(readMask string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +// fields to read. +func (c *ProjectsLocationsModelsListCall) ReadMask(readMask string) *ProjectsLocationsModelsListCall { c.urlParams_.Set("readMask", readMask) return c } @@ -76215,7 +79104,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) ReadMask(readMa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +func (c *ProjectsLocationsModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -76223,27 +79112,27 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Fields(s ...goo // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +func (c *ProjectsLocationsModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsListCall { +func (c *ProjectsLocationsModelsListCall) Context(ctx context.Context) *ProjectsLocationsModelsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Header() http.Header { +func (c *ProjectsLocationsModelsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -76251,7 +79140,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) doRequest(alt s var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/modelDeploymentMonitoringJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -76264,13 +79153,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.list" call. +// Do executes the "aiplatform.projects.locations.models.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse.ServerRespo -// nse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse, error) { +// *GoogleCloudAiplatformV1ListModelsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76289,7 +79178,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse{ + ret := &GoogleCloudAiplatformV1ListModelsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76305,7 +79194,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Do(opts ...goog // 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 *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelDeploymentMonitoringJobsResponse) error) error { +func (c *ProjectsLocationsModelsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -76323,87 +79212,108 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsListCall) Pages(ctx conte } } -type ProjectsLocationsModelDeploymentMonitoringJobsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsListVersionsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a ModelDeploymentMonitoringJob. +// ListVersions: Lists versions of the specified model. // -// - name: Output only. Resource name of a ModelDeploymentMonitoringJob. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Patch(name string, googlecloudaiplatformv1modeldeploymentmonitoringjob *GoogleCloudAiplatformV1ModelDeploymentMonitoringJob) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the model to list versions for. +func (r *ProjectsLocationsModelsService) ListVersions(name string) *ProjectsLocationsModelsListVersionsCall { + c := &ProjectsLocationsModelsListVersionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1modeldeploymentmonitoringjob = googlecloudaiplatformv1modeldeploymentmonitoringjob return c } -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask is used to specify the fields to be overwritten in the -// ModelDeploymentMonitoringJob 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 only the non-empty fields present in the request will be -// overwritten. Set the update_mask to `*` to override all fields. For the -// objective config, the user can either provide the update mask for -// model_deployment_monitoring_objective_configs or any combination of its -// nested fields, such as: -// model_deployment_monitoring_objective_configs.objective_config.training_datas -// et. Updatable fields: * `display_name` * -// `model_deployment_monitoring_schedule_config` * -// `model_monitoring_alert_config` * `logging_sampling_strategy` * `labels` * -// `log_ttl` * `enable_monitoring_pipeline_logs` . and * -// `model_deployment_monitoring_objective_configs` . or * -// `model_deployment_monitoring_objective_configs.objective_config.training_data -// set` * -// `model_deployment_monitoring_objective_configs.objective_config.training_pred -// iction_skew_detection_config` * -// `model_deployment_monitoring_objective_configs.objective_config.prediction_dr -// ift_detection_config` -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `labels` supports general map functions that is: * +// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key +// existence * A key including a space must be quoted. `labels."a key". Some +// examples: * `labels.myKey="myValue" +func (c *ProjectsLocationsModelsListVersionsCall) Filter(filter string) *ProjectsLocationsModelsListVersionsCall { + 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: * `create_time` * `update_time` Example: +// `update_time asc, create_time desc`. +func (c *ProjectsLocationsModelsListVersionsCall) OrderBy(orderBy string) *ProjectsLocationsModelsListVersionsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsModelsListVersionsCall) PageSize(pageSize int64) *ProjectsLocationsModelsListVersionsCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via next_page_token of the previous +// ListModelVersions call. +func (c *ProjectsLocationsModelsListVersionsCall) PageToken(pageToken string) *ProjectsLocationsModelsListVersionsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsModelsListVersionsCall) ReadMask(readMask string) *ProjectsLocationsModelsListVersionsCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { +func (c *ProjectsLocationsModelsListVersionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsListVersionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsModelsListVersionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsListVersionsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall { +func (c *ProjectsLocationsModelsListVersionsCall) Context(ctx context.Context) *ProjectsLocationsModelsListVersionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Header() http.Header { +func (c *ProjectsLocationsModelsListVersionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1modeldeploymentmonitoringjob) - if err != nil { - return nil, err +func (c *ProjectsLocationsModelsListVersionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listVersions") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -76414,13 +79324,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.patch" call. +// Do executes the "aiplatform.projects.locations.models.listVersions" call. // 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 +// *GoogleCloudAiplatformV1ListModelVersionsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsListVersionsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelVersionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76439,7 +79349,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListModelVersionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76452,63 +79362,81 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPatchCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsPauseCall struct { - s *Service - name string - googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest - 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 *ProjectsLocationsModelsListVersionsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelVersionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Pause: Pauses a ModelDeploymentMonitoringJob. If the job is running, the -// server makes a best effort to cancel the job. Will mark -// ModelDeploymentMonitoringJob.state to 'PAUSED'. +type ProjectsLocationsModelsMergeVersionAliasesCall struct { + s *Service + name string + googlecloudaiplatformv1mergeversionaliasesrequest *GoogleCloudAiplatformV1MergeVersionAliasesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MergeVersionAliases: Merges a set of aliases for a Model version. // -// - name: The resource name of the ModelDeploymentMonitoringJob to pause. -// Format: -// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod -// el_deployment_monitoring_job}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Pause(name string, googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1PauseModelDeploymentMonitoringJobRequest) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the model version to merge aliases, with a version ID +// explicitly included. Example: +// `projects/{project}/locations/{location}/models/{model}@1234`. +func (r *ProjectsLocationsModelsService) MergeVersionAliases(name string, googlecloudaiplatformv1mergeversionaliasesrequest *GoogleCloudAiplatformV1MergeVersionAliasesRequest) *ProjectsLocationsModelsMergeVersionAliasesCall { + c := &ProjectsLocationsModelsMergeVersionAliasesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest = googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest + c.googlecloudaiplatformv1mergeversionaliasesrequest = googlecloudaiplatformv1mergeversionaliasesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { +func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsMergeVersionAliasesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall { +func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Context(ctx context.Context) *ProjectsLocationsModelsMergeVersionAliasesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Header() http.Header { +func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsMergeVersionAliasesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1pausemodeldeploymentmonitoringjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1mergeversionaliasesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:pause") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:mergeVersionAliases") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76521,13 +79449,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.pause" call. +// Do executes the "aiplatform.projects.locations.models.mergeVersionAliases" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1Model.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76546,7 +79474,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1Model{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76559,65 +79487,68 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsPauseCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsResumeCall struct { - s *Service - name string - googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1ResumeModelDeploymentMonitoringJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsPatchCall struct { + s *Service + name string + googlecloudaiplatformv1model *GoogleCloudAiplatformV1Model + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resume: Resumes a paused ModelDeploymentMonitoringJob. It will start to run -// from next scheduled time. A deleted ModelDeploymentMonitoringJob can't be -// resumed. +// Patch: Updates a Model. // -// - name: The resource name of the ModelDeploymentMonitoringJob to resume. -// Format: -// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod -// el_deployment_monitoring_job}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) Resume(name string, googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest *GoogleCloudAiplatformV1ResumeModelDeploymentMonitoringJobRequest) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The resource name of the Model. +func (r *ProjectsLocationsModelsService) Patch(name string, googlecloudaiplatformv1model *GoogleCloudAiplatformV1Model) *ProjectsLocationsModelsPatchCall { + c := &ProjectsLocationsModelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest = googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest + c.googlecloudaiplatformv1model = googlecloudaiplatformv1model + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. +func (c *ProjectsLocationsModelsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsModelsPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { +func (c *ProjectsLocationsModelsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall { +func (c *ProjectsLocationsModelsPatchCall) Context(ctx context.Context) *ProjectsLocationsModelsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Header() http.Header { +func (c *ProjectsLocationsModelsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1resumemodeldeploymentmonitoringjobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1model) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:resume") + 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 } @@ -76628,13 +79559,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.resume" call. +// Do executes the "aiplatform.projects.locations.models.patch" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1Model.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsModelsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76653,7 +79584,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Do(opts ...go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1Model{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76666,62 +79597,62 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsResumeCall) Do(opts ...go return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall struct { - s *Service - modelDeploymentMonitoringJob string - googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SearchModelDeploymentMonitoringStatsAnomalies: Searches Model Monitoring -// Statistics generated within a given time window. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. // -// - modelDeploymentMonitoringJob: ModelDeploymentMonitoring Job resource name. -// Format: -// `projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{mod -// el_deployment_monitoring_job}`. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsService) SearchModelDeploymentMonitoringStatsAnomalies(modelDeploymentMonitoringJob string, googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesRequest) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.modelDeploymentMonitoringJob = modelDeploymentMonitoringJob - c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest = googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest +// - 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 *ProjectsLocationsModelsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsModelsSetIamPolicyCall { + c := &ProjectsLocationsModelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { +func (c *ProjectsLocationsModelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall { +func (c *ProjectsLocationsModelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsModelsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Header() http.Header { +func (c *ProjectsLocationsModelsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+modelDeploymentMonitoringJob}:searchModelDeploymentMonitoringStatsAnomalies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76729,18 +79660,18 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMoni } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "modelDeploymentMonitoringJob": c.modelDeploymentMonitoringJob, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.searchModelDeploymentMonitoringStatsAnomalies" call. +// Do executes the "aiplatform.projects.locations.models.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse -// .ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76759,7 +79690,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMoni if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76772,83 +79703,68 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMoni return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsSearchModelDeploymentMonitoringStatsAnomaliesCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1SearchModelDeploymentMonitoringStatsAnomaliesResponse) error) error { - c.ctx_ = ctx - defer func(pt string) { - c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken = pt - }(c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.googlecloudaiplatformv1searchmodeldeploymentmonitoringstatsanomaliesrequest.PageToken = x.NextPageToken - } -} - -type ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall struct { +type ProjectsLocationsModelsTestIamPermissionsCall struct { s *Service - name string + resource string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// 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 name of the operation resource to be cancelled. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Cancel(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall{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 *ProjectsLocationsModelsService) TestIamPermissions(resource string) *ProjectsLocationsModelsTestIamPermissionsCall { + c := &ProjectsLocationsModelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c +} + +// Permissions sets the optional parameter "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). +func (c *ProjectsLocationsModelsTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsModelsTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { +func (c *ProjectsLocationsModelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall { +func (c *ProjectsLocationsModelsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsModelsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsModelsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -76856,18 +79772,18 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) doR } 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 "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.models.testIamPermissions" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsModelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76886,7 +79802,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Do( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -76899,74 +79815,79 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsCancelCall) Do( return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsUpdateExplanationDatasetCall struct { + s *Service + model string + googlecloudaiplatformv1updateexplanationdatasetrequest *GoogleCloudAiplatformV1UpdateExplanationDatasetRequest + 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`. +// UpdateExplanationDataset: Incrementally update the dataset used for an +// examples model. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Delete(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - model: The resource name of the Model to update. Format: +// `projects/{project}/locations/{location}/models/{model}`. +func (r *ProjectsLocationsModelsService) UpdateExplanationDataset(model string, googlecloudaiplatformv1updateexplanationdatasetrequest *GoogleCloudAiplatformV1UpdateExplanationDatasetRequest) *ProjectsLocationsModelsUpdateExplanationDatasetCall { + c := &ProjectsLocationsModelsUpdateExplanationDatasetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1updateexplanationdatasetrequest = googlecloudaiplatformv1updateexplanationdatasetrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { +func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsUpdateExplanationDatasetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall { +func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Context(ctx context.Context) *ProjectsLocationsModelsUpdateExplanationDatasetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1updateexplanationdatasetrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:updateExplanationDataset") 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, + "model": c.model, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.models.updateExplanationDataset" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsModelsUpdateExplanationDatasetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -76985,7 +79906,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Do( 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, @@ -76998,85 +79919,78 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsDeleteCall) Do( return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsUploadCall struct { + s *Service + parent string + googlecloudaiplatformv1uploadmodelrequest *GoogleCloudAiplatformV1UploadModelRequest + 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. +// Upload: Uploads a Model artifact into Vertex AI. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Get(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location into which to upload the Model. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsModelsService) Upload(parent string, googlecloudaiplatformv1uploadmodelrequest *GoogleCloudAiplatformV1UploadModelRequest) *ProjectsLocationsModelsUploadCall { + c := &ProjectsLocationsModelsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1uploadmodelrequest = googlecloudaiplatformv1uploadmodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { +func (c *ProjectsLocationsModelsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsUploadCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall { +func (c *ProjectsLocationsModelsUploadCall) Context(ctx context.Context) *ProjectsLocationsModelsUploadCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsModelsUploadCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsModelsUploadCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1uploadmodelrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models:upload") 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 "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.models.upload" call. // 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 *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsUploadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77108,7 +80022,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsGetCall) Do(opt return ret, nil } -type ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall struct { +type ProjectsLocationsModelsEvaluationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -77117,40 +80031,21 @@ type ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall 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 ModelEvaluation. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) List(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the ModelEvaluation resource. Format: +// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua +// tion}`. +func (r *ProjectsLocationsModelsEvaluationsService) Get(name string) *ProjectsLocationsModelsEvaluationsGetCall { + c := &ProjectsLocationsModelsEvaluationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Filter(filter string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { +func (c *ProjectsLocationsModelsEvaluationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -77158,27 +80053,27 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Field // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { +func (c *ProjectsLocationsModelsEvaluationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall { +func (c *ProjectsLocationsModelsEvaluationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -77186,7 +80081,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) doReq 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/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -77199,13 +80094,13 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.list" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningListOperationsResponse.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1ModelEvaluation.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsModelsEvaluationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77224,7 +80119,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ModelEvaluation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77237,90 +80132,59 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Do(op return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsEvaluationsImportCall struct { + s *Service + parent string + googlecloudaiplatformv1importmodelevaluationrequest *GoogleCloudAiplatformV1ImportModelEvaluationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// Import: Imports an externally generated ModelEvaluation. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsModelDeploymentMonitoringJobsOperationsService) Wait(name string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { - c := &ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - parent: The name of the parent model resource. Format: +// `projects/{project}/locations/{location}/models/{model}`. +func (r *ProjectsLocationsModelsEvaluationsService) Import(parent string, googlecloudaiplatformv1importmodelevaluationrequest *GoogleCloudAiplatformV1ImportModelEvaluationRequest) *ProjectsLocationsModelsEvaluationsImportCall { + c := &ProjectsLocationsModelsEvaluationsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1importmodelevaluationrequest = googlecloudaiplatformv1importmodelevaluationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { +func (c *ProjectsLocationsModelsEvaluationsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall { +func (c *ProjectsLocationsModelsEvaluationsImportCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsModelsEvaluationsImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importmodelevaluationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations:import") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -77328,18 +80192,18 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) 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 "aiplatform.projects.locations.modelDeploymentMonitoringJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.import" call. // 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 +// *GoogleCloudAiplatformV1ModelEvaluation.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsEvaluationsImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77358,7 +80222,7 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Do(op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ModelEvaluation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77371,65 +80235,95 @@ func (c *ProjectsLocationsModelDeploymentMonitoringJobsOperationsWaitCall) Do(op return ret, nil } -type ProjectsLocationsModelsCopyCall struct { - s *Service - parent string - googlecloudaiplatformv1copymodelrequest *GoogleCloudAiplatformV1CopyModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsEvaluationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Copy: Copies an already existing Vertex AI Model into the specified -// Location. The source Model must exist in the same Project. When copying -// custom Models, the users themselves are responsible for Model.metadata -// content to be region-agnostic, as well as making sure that any resources -// (e.g. files) it depends on remain accessible. +// List: Lists ModelEvaluations in a Model. // -// - parent: The resource name of the Location into which to copy the Model. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsModelsService) Copy(parent string, googlecloudaiplatformv1copymodelrequest *GoogleCloudAiplatformV1CopyModelRequest) *ProjectsLocationsModelsCopyCall { - c := &ProjectsLocationsModelsCopyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Model to list the ModelEvaluations from. +// Format: `projects/{project}/locations/{location}/models/{model}`. +func (r *ProjectsLocationsModelsEvaluationsService) List(parent string) *ProjectsLocationsModelsEvaluationsListCall { + c := &ProjectsLocationsModelsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1copymodelrequest = googlecloudaiplatformv1copymodelrequest + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsModelsEvaluationsListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsModelsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListModelEvaluationsResponse.next_page_token +// of the previous ModelService.ListModelEvaluations call. +func (c *ProjectsLocationsModelsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsModelsEvaluationsListCall) ReadMask(readMask string) *ProjectsLocationsModelsEvaluationsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsCopyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsCopyCall { +func (c *ProjectsLocationsModelsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsModelsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsCopyCall) Context(ctx context.Context) *ProjectsLocationsModelsCopyCall { +func (c *ProjectsLocationsModelsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsCopyCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsCopyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1copymodelrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsModelsEvaluationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models:copy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -77440,13 +80334,13 @@ func (c *ProjectsLocationsModelsCopyCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.copy" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.list" call. // 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 +// *GoogleCloudAiplatformV1ListModelEvaluationsResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsModelsCopyCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelEvaluationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77465,7 +80359,7 @@ func (c *ProjectsLocationsModelsCopyCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListModelEvaluationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77478,7 +80372,28 @@ func (c *ProjectsLocationsModelsCopyCall) Do(opts ...googleapi.CallOption) (*Goo return ret, nil } -type ProjectsLocationsModelsDeleteCall struct { +// 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 *ProjectsLocationsModelsEvaluationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelEvaluationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsModelsEvaluationsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -77486,13 +80401,19 @@ type ProjectsLocationsModelsDeleteCall struct { header_ http.Header } -// Delete: Deletes a Model. A model cannot be deleted if any Endpoint resource -// has a DeployedModel based on the model in its deployed_models field. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - name: The name of the Model resource to be deleted. Format: -// `projects/{project}/locations/{location}/models/{model}`. -func (r *ProjectsLocationsModelsService) Delete(name string) *ProjectsLocationsModelsDeleteCall { - c := &ProjectsLocationsModelsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsModelsEvaluationsOperationsService) Cancel(name string) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { + c := &ProjectsLocationsModelsEvaluationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -77500,34 +80421,34 @@ func (r *ProjectsLocationsModelsService) Delete(name string) *ProjectsLocationsM // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsDeleteCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsDeleteCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -77538,13 +80459,13 @@ func (c *ProjectsLocationsModelsDeleteCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.delete" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.operations.cancel" call. // 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 *ProjectsLocationsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77563,7 +80484,7 @@ func (c *ProjectsLocationsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*G 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, @@ -77576,7 +80497,7 @@ func (c *ProjectsLocationsModelsDeleteCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsModelsDeleteVersionCall struct { +type ProjectsLocationsModelsEvaluationsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -77584,15 +80505,14 @@ type ProjectsLocationsModelsDeleteVersionCall struct { header_ http.Header } -// DeleteVersion: Deletes a Model version. Model version can only be deleted if -// there are no DeployedModels created from it. Deleting the only version in -// the Model is not allowed. Use DeleteModel for deleting the Model instead. +// 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 model version to be deleted, with a version ID -// explicitly included. Example: -// `projects/{project}/locations/{location}/models/{model}@1234`. -func (r *ProjectsLocationsModelsService) DeleteVersion(name string) *ProjectsLocationsModelsDeleteVersionCall { - c := &ProjectsLocationsModelsDeleteVersionCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsModelsEvaluationsOperationsService) Delete(name string) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { + c := &ProjectsLocationsModelsEvaluationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -77600,32 +80520,32 @@ func (r *ProjectsLocationsModelsService) DeleteVersion(name string) *ProjectsLoc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsDeleteVersionCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsDeleteVersionCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsDeleteVersionCall) Context(ctx context.Context) *ProjectsLocationsModelsDeleteVersionCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsDeleteVersionCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsDeleteVersionCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:deleteVersion") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -77638,13 +80558,13 @@ func (c *ProjectsLocationsModelsDeleteVersionCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.deleteVersion" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.operations.delete" call. // 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 *ProjectsLocationsModelsDeleteVersionCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77663,7 +80583,7 @@ func (c *ProjectsLocationsModelsDeleteVersionCall) Do(opts ...googleapi.CallOpti 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, @@ -77673,67 +80593,71 @@ func (c *ProjectsLocationsModelsDeleteVersionCall) Do(opts ...googleapi.CallOpti if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil -} - -type ProjectsLocationsModelsExportCall struct { - s *Service - name string - googlecloudaiplatformv1exportmodelrequest *GoogleCloudAiplatformV1ExportModelRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + return ret, nil } -// Export: Exports a trained, exportable Model to a location specified by the -// user. A Model is considered to be exportable if it has at least one -// supported export format. +type ProjectsLocationsModelsEvaluationsOperationsGetCall 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 resource name of the Model to export. The resource name may -// contain version id or version alias to specify the version, if no version -// is specified, the default version will be exported. -func (r *ProjectsLocationsModelsService) Export(name string, googlecloudaiplatformv1exportmodelrequest *GoogleCloudAiplatformV1ExportModelRequest) *ProjectsLocationsModelsExportCall { - c := &ProjectsLocationsModelsExportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsModelsEvaluationsOperationsService) Get(name string) *ProjectsLocationsModelsEvaluationsOperationsGetCall { + c := &ProjectsLocationsModelsEvaluationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1exportmodelrequest = googlecloudaiplatformv1exportmodelrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsExportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsExportCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsExportCall) Context(ctx context.Context) *ProjectsLocationsModelsExportCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsExportCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsExportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1exportmodelrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:export") + 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 } @@ -77744,13 +80668,13 @@ func (c *ProjectsLocationsModelsExportCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.export" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.operations.get" call. // 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 *ProjectsLocationsModelsExportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77782,7 +80706,7 @@ func (c *ProjectsLocationsModelsExportCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsModelsGetCall struct { +type ProjectsLocationsModelsEvaluationsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -77791,28 +80715,40 @@ type ProjectsLocationsModelsGetCall struct { header_ http.Header } -// Get: Gets a Model. +// 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 Model resource. Format: -// `projects/{project}/locations/{location}/models/{model}` In order to -// retrieve a specific version of the model, also provide the version ID or -// version alias. Example: -// `projects/{project}/locations/{location}/models/{model}@2` or -// `projects/{project}/locations/{location}/models/{model}@golden` If no -// version ID or alias is specified, the "default" version will be returned. -// The "default" version alias is created for the first version of the model, -// and can be moved to other versions later on. There will be exactly one -// default version. -func (r *ProjectsLocationsModelsService) Get(name string) *ProjectsLocationsModelsGetCall { - c := &ProjectsLocationsModelsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsModelsEvaluationsOperationsService) List(name string) *ProjectsLocationsModelsEvaluationsOperationsListCall { + c := &ProjectsLocationsModelsEvaluationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsGetCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -77820,27 +80756,27 @@ func (c *ProjectsLocationsModelsGetCall) Fields(s ...googleapi.Field) *ProjectsL // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsModelsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsGetCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsGetCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsGetCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -77848,7 +80784,7 @@ func (c *ProjectsLocationsModelsGetCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -77861,13 +80797,13 @@ func (c *ProjectsLocationsModelsGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.get" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Model.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsModelsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -77886,7 +80822,7 @@ func (c *ProjectsLocationsModelsGetCall) Do(opts ...googleapi.CallOption) (*Goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Model{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -77899,72 +80835,90 @@ func (c *ProjectsLocationsModelsGetCall) Do(opts ...googleapi.CallOption) (*Goog return ret, nil } -type ProjectsLocationsModelsGetIamPolicyCall struct { +// 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 *ProjectsLocationsModelsEvaluationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsModelsEvaluationsOperationsWaitCall struct { s *Service - resource string + name string 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. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - 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 *ProjectsLocationsModelsService) GetIamPolicy(resource string) *ProjectsLocationsModelsGetIamPolicyCall { - c := &ProjectsLocationsModelsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsModelsEvaluationsOperationsService) Wait(name string) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { + c := &ProjectsLocationsModelsEvaluationsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name 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 *ProjectsLocationsModelsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsModelsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsGetIamPolicyCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsModelsGetIamPolicyCall { +func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -77972,18 +80926,18 @@ func (c *ProjectsLocationsModelsGetIamPolicyCall) doRequest(alt string) (*http.R } 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 "aiplatform.projects.locations.models.getIamPolicy" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78002,7 +80956,7 @@ func (c *ProjectsLocationsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78015,113 +80969,62 @@ func (c *ProjectsLocationsModelsGetIamPolicyCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsModelsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsEvaluationsSlicesBatchImportCall struct { + s *Service + parent string + googlecloudaiplatformv1batchimportevaluatedannotationsrequest *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists Models in a Location. +// BatchImport: Imports a list of externally generated EvaluatedAnnotations. // -// - parent: The resource name of the Location to list the Models from. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsModelsService) List(parent string) *ProjectsLocationsModelsListCall { - c := &ProjectsLocationsModelsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The name of the parent ModelEvaluationSlice resource. Format: +// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua +// tion}/slices/{slice}`. +func (r *ProjectsLocationsModelsEvaluationsSlicesService) BatchImport(parent string, googlecloudaiplatformv1batchimportevaluatedannotationsrequest *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsRequest) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { + c := &ProjectsLocationsModelsEvaluationsSlicesBatchImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `model` supports = and !=. `model` represents the Model ID, -// i.e. the last segment of the Model's resource name. * `display_name` -// supports = and != * `labels` supports general map functions that is: * -// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key -// existence * A key including a space must be quoted. `labels."a key". * -// `base_model_name` only supports = Some examples: * `model=1234` * -// `displayName="myDisplayName" * `labels.myKey="myValue" * -// `baseModelName="text-bison" -func (c *ProjectsLocationsModelsListCall) Filter(filter string) *ProjectsLocationsModelsListCall { - 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: * `display_name` * `create_time` * -// `update_time` Example: `display_name, create_time desc`. -func (c *ProjectsLocationsModelsListCall) OrderBy(orderBy string) *ProjectsLocationsModelsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsModelsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListModelsResponse.next_page_token of the -// previous ModelService.ListModels call. -func (c *ProjectsLocationsModelsListCall) PageToken(pageToken string) *ProjectsLocationsModelsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsModelsListCall) ReadMask(readMask string) *ProjectsLocationsModelsListCall { - c.urlParams_.Set("readMask", readMask) + c.googlecloudaiplatformv1batchimportevaluatedannotationsrequest = googlecloudaiplatformv1batchimportevaluatedannotationsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsListCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsModelsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsListCall) Context(ctx context.Context) *ProjectsLocationsModelsListCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsListCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchimportevaluatedannotationsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:batchImport") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -78132,13 +81035,13 @@ func (c *ProjectsLocationsModelsListCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.list" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.slices.batchImport" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListModelsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelsResponse, error) { +// *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse.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 *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78157,7 +81060,7 @@ func (c *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListModelsResponse{ + ret := &GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78170,28 +81073,7 @@ func (c *ProjectsLocationsModelsListCall) Do(opts ...googleapi.CallOption) (*Goo return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsModelsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsModelsListVersionsCall struct { +type ProjectsLocationsModelsEvaluationsSlicesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -78200,61 +81082,21 @@ type ProjectsLocationsModelsListVersionsCall struct { header_ http.Header } -// ListVersions: Lists versions of the specified model. +// Get: Gets a ModelEvaluationSlice. // -// - name: The name of the model to list versions for. -func (r *ProjectsLocationsModelsService) ListVersions(name string) *ProjectsLocationsModelsListVersionsCall { - c := &ProjectsLocationsModelsListVersionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the ModelEvaluationSlice resource. Format: +// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua +// tion}/slices/{slice}`. +func (r *ProjectsLocationsModelsEvaluationsSlicesService) Get(name string) *ProjectsLocationsModelsEvaluationsSlicesGetCall { + c := &ProjectsLocationsModelsEvaluationsSlicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `labels` supports general map functions that is: * -// `labels.key=value` - key:value equality * `labels.key:* or labels:key - key -// existence * A key including a space must be quoted. `labels."a key". Some -// examples: * `labels.myKey="myValue" -func (c *ProjectsLocationsModelsListVersionsCall) Filter(filter string) *ProjectsLocationsModelsListVersionsCall { - 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: * `create_time` * `update_time` Example: -// `update_time asc, create_time desc`. -func (c *ProjectsLocationsModelsListVersionsCall) OrderBy(orderBy string) *ProjectsLocationsModelsListVersionsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsModelsListVersionsCall) PageSize(pageSize int64) *ProjectsLocationsModelsListVersionsCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via next_page_token of the previous -// ListModelVersions call. -func (c *ProjectsLocationsModelsListVersionsCall) PageToken(pageToken string) *ProjectsLocationsModelsListVersionsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsModelsListVersionsCall) ReadMask(readMask string) *ProjectsLocationsModelsListVersionsCall { - c.urlParams_.Set("readMask", readMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsListVersionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsListVersionsCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -78262,27 +81104,27 @@ func (c *ProjectsLocationsModelsListVersionsCall) Fields(s ...googleapi.Field) * // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsModelsListVersionsCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsListVersionsCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsSlicesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsListVersionsCall) Context(ctx context.Context) *ProjectsLocationsModelsListVersionsCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsListVersionsCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsListVersionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -78290,7 +81132,7 @@ func (c *ProjectsLocationsModelsListVersionsCall) doRequest(alt string) (*http.R var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:listVersions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -78303,13 +81145,13 @@ func (c *ProjectsLocationsModelsListVersionsCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.listVersions" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.slices.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListModelVersionsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ModelEvaluationSlice.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsModelsListVersionsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelVersionsResponse, error) { +func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluationSlice, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78328,7 +81170,7 @@ func (c *ProjectsLocationsModelsListVersionsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListModelVersionsResponse{ + ret := &GoogleCloudAiplatformV1ModelEvaluationSlice{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78341,100 +81183,116 @@ func (c *ProjectsLocationsModelsListVersionsCall) Do(opts ...googleapi.CallOptio return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsModelsListVersionsCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelVersionsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +type ProjectsLocationsModelsEvaluationsSlicesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -type ProjectsLocationsModelsMergeVersionAliasesCall struct { - s *Service - name string - googlecloudaiplatformv1mergeversionaliasesrequest *GoogleCloudAiplatformV1MergeVersionAliasesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// List: Lists ModelEvaluationSlices in a ModelEvaluation. +// +// - parent: The resource name of the ModelEvaluation to list the +// ModelEvaluationSlices from. Format: +// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua +// tion}`. +func (r *ProjectsLocationsModelsEvaluationsSlicesService) List(parent string) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c := &ProjectsLocationsModelsEvaluationsSlicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c } -// MergeVersionAliases: Merges a set of aliases for a Model version. -// -// - name: The name of the model version to merge aliases, with a version ID -// explicitly included. Example: -// `projects/{project}/locations/{location}/models/{model}@1234`. -func (r *ProjectsLocationsModelsService) MergeVersionAliases(name string, googlecloudaiplatformv1mergeversionaliasesrequest *GoogleCloudAiplatformV1MergeVersionAliasesRequest) *ProjectsLocationsModelsMergeVersionAliasesCall { - c := &ProjectsLocationsModelsMergeVersionAliasesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1mergeversionaliasesrequest = googlecloudaiplatformv1mergeversionaliasesrequest +// Filter sets the optional parameter "filter": The standard list filter. * +// `slice.dimension` - for =. +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via +// ListModelEvaluationSlicesResponse.next_page_token of the previous +// ModelService.ListModelEvaluationSlices call. +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) ReadMask(readMask string) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsMergeVersionAliasesCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsSlicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Context(ctx context.Context) *ProjectsLocationsModelsMergeVersionAliasesCall { +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Header() http.Header { +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsMergeVersionAliasesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1mergeversionaliasesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:mergeVersionAliases") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/slices") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.mergeVersionAliases" call. +// Do executes the "aiplatform.projects.locations.models.evaluations.slices.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Model.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, error) { +// *GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78453,7 +81311,7 @@ func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Model{ + ret := &GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78466,68 +81324,83 @@ func (c *ProjectsLocationsModelsMergeVersionAliasesCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsModelsPatchCall struct { - s *Service - name string - googlecloudaiplatformv1model *GoogleCloudAiplatformV1Model - 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 *ProjectsLocationsModelsEvaluationsSlicesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Patch: Updates a Model. -// -// - name: The resource name of the Model. -func (r *ProjectsLocationsModelsService) Patch(name string, googlecloudaiplatformv1model *GoogleCloudAiplatformV1Model) *ProjectsLocationsModelsPatchCall { - c := &ProjectsLocationsModelsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1model = googlecloudaiplatformv1model - return c +type ProjectsLocationsModelsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. -func (c *ProjectsLocationsModelsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsModelsPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. +// +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsModelsOperationsService) Cancel(name string) *ProjectsLocationsModelsOperationsCancelCall { + c := &ProjectsLocationsModelsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsPatchCall { +func (c *ProjectsLocationsModelsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsPatchCall) Context(ctx context.Context) *ProjectsLocationsModelsPatchCall { +func (c *ProjectsLocationsModelsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsPatchCall) Header() http.Header { +func (c *ProjectsLocationsModelsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsModelsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1model) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -78538,13 +81411,13 @@ func (c *ProjectsLocationsModelsPatchCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.patch" call. +// Do executes the "aiplatform.projects.locations.models.operations.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1Model.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsModelsPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1Model, error) { +// *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 *ProjectsLocationsModelsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78563,7 +81436,7 @@ func (c *ProjectsLocationsModelsPatchCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1Model{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78576,81 +81449,74 @@ func (c *ProjectsLocationsModelsPatchCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -type ProjectsLocationsModelsSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsOperationsDeleteCall struct { + s *Service + name string + 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. +// 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`. // -// - 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 *ProjectsLocationsModelsService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsModelsSetIamPolicyCall { - c := &ProjectsLocationsModelsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsModelsOperationsService) Delete(name string) *ProjectsLocationsModelsOperationsDeleteCall { + c := &ProjectsLocationsModelsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsSetIamPolicyCall { +func (c *ProjectsLocationsModelsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsModelsSetIamPolicyCall { +func (c *ProjectsLocationsModelsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsModelsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsModelsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err - } 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("DELETE", 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 "aiplatform.projects.locations.models.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.models.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +func (c *ProjectsLocationsModelsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78669,7 +81535,7 @@ func (c *ProjectsLocationsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78682,87 +81548,85 @@ func (c *ProjectsLocationsModelsSetIamPolicyCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsModelsTestIamPermissionsCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsOperationsGetCall 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: 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. // -// - 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 *ProjectsLocationsModelsService) TestIamPermissions(resource string) *ProjectsLocationsModelsTestIamPermissionsCall { - c := &ProjectsLocationsModelsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// Permissions sets the optional parameter "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). -func (c *ProjectsLocationsModelsTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsModelsTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// - name: The name of the operation resource. +func (r *ProjectsLocationsModelsOperationsService) Get(name string) *ProjectsLocationsModelsOperationsGetCall { + c := &ProjectsLocationsModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsTestIamPermissionsCall { +func (c *ProjectsLocationsModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsModelsTestIamPermissionsCall { +func (c *ProjectsLocationsModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsModelsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+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 "aiplatform.projects.locations.models.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.models.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsModelsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78781,7 +81645,7 @@ func (c *ProjectsLocationsModelsTestIamPermissionsCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -78794,79 +81658,104 @@ func (c *ProjectsLocationsModelsTestIamPermissionsCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsModelsUpdateExplanationDatasetCall struct { - s *Service - model string - googlecloudaiplatformv1updateexplanationdatasetrequest *GoogleCloudAiplatformV1UpdateExplanationDatasetRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsModelsOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdateExplanationDataset: Incrementally update the dataset used for an -// examples model. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - model: The resource name of the Model to update. Format: -// `projects/{project}/locations/{location}/models/{model}`. -func (r *ProjectsLocationsModelsService) UpdateExplanationDataset(model string, googlecloudaiplatformv1updateexplanationdatasetrequest *GoogleCloudAiplatformV1UpdateExplanationDatasetRequest) *ProjectsLocationsModelsUpdateExplanationDatasetCall { - c := &ProjectsLocationsModelsUpdateExplanationDatasetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1updateexplanationdatasetrequest = googlecloudaiplatformv1updateexplanationdatasetrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsModelsOperationsService) List(name string) *ProjectsLocationsModelsOperationsListCall { + c := &ProjectsLocationsModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsModelsOperationsListCall) Filter(filter string) *ProjectsLocationsModelsOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsUpdateExplanationDatasetCall { +func (c *ProjectsLocationsModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Context(ctx context.Context) *ProjectsLocationsModelsUpdateExplanationDatasetCall { +func (c *ProjectsLocationsModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Header() http.Header { +func (c *ProjectsLocationsModelsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1updateexplanationdatasetrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:updateExplanationDataset") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 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{ - "model": c.model, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.updateExplanationDataset" call. +// Do executes the "aiplatform.projects.locations.models.operations.list" call. // 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 +// *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 *ProjectsLocationsModelsUpdateExplanationDatasetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -78885,7 +81774,7 @@ func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Do(opts ...googlea 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, @@ -78898,59 +81787,90 @@ func (c *ProjectsLocationsModelsUpdateExplanationDatasetCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsModelsUploadCall struct { - s *Service - parent string - googlecloudaiplatformv1uploadmodelrequest *GoogleCloudAiplatformV1UploadModelRequest - 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 *ProjectsLocationsModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Upload: Uploads a Model artifact into Vertex AI. +type ProjectsLocationsModelsOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - parent: The resource name of the Location into which to upload the Model. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsModelsService) Upload(parent string, googlecloudaiplatformv1uploadmodelrequest *GoogleCloudAiplatformV1UploadModelRequest) *ProjectsLocationsModelsUploadCall { - c := &ProjectsLocationsModelsUploadCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1uploadmodelrequest = googlecloudaiplatformv1uploadmodelrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsModelsOperationsService) Wait(name string) *ProjectsLocationsModelsOperationsWaitCall { + c := &ProjectsLocationsModelsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsModelsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsUploadCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsUploadCall { +func (c *ProjectsLocationsModelsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsUploadCall) Context(ctx context.Context) *ProjectsLocationsModelsUploadCall { +func (c *ProjectsLocationsModelsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsUploadCall) Header() http.Header { +func (c *ProjectsLocationsModelsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsUploadCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsModelsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1uploadmodelrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/models:upload") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -78958,18 +81878,18 @@ func (c *ProjectsLocationsModelsUploadCall) doRequest(alt string) (*http.Respons } 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 "aiplatform.projects.locations.models.upload" call. +// Do executes the "aiplatform.projects.locations.models.operations.wait" call. // 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 *ProjectsLocationsModelsUploadCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsModelsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79001,68 +81921,68 @@ func (c *ProjectsLocationsModelsUploadCall) Do(opts ...googleapi.CallOption) (*G return ret, nil } -type ProjectsLocationsModelsEvaluationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNasJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelnasjobrequest *GoogleCloudAiplatformV1CancelNasJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a ModelEvaluation. +// Cancel: Cancels a NasJob. Starts asynchronous cancellation on the NasJob. +// The server makes a best effort to cancel the job, but success is not +// guaranteed. Clients can use JobService.GetNasJob or other methods to check +// whether the cancellation succeeded or whether the job completed despite +// cancellation. On successful cancellation, the NasJob is not deleted; instead +// it becomes a job with a NasJob.error value with a google.rpc.Status.code of +// 1, corresponding to `Code.CANCELLED`, and NasJob.state is set to +// `CANCELLED`. // -// - name: The name of the ModelEvaluation resource. Format: -// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua -// tion}`. -func (r *ProjectsLocationsModelsEvaluationsService) Get(name string) *ProjectsLocationsModelsEvaluationsGetCall { - c := &ProjectsLocationsModelsEvaluationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NasJob to cancel. Format: +// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. +func (r *ProjectsLocationsNasJobsService) Cancel(name string, googlecloudaiplatformv1cancelnasjobrequest *GoogleCloudAiplatformV1CancelNasJobRequest) *ProjectsLocationsNasJobsCancelCall { + c := &ProjectsLocationsNasJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1cancelnasjobrequest = googlecloudaiplatformv1cancelnasjobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsGetCall { +func (c *ProjectsLocationsNasJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsModelsEvaluationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsGetCall { +func (c *ProjectsLocationsNasJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsNasJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsGetCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsNasJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelnasjobrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -79073,13 +81993,13 @@ func (c *ProjectsLocationsModelsEvaluationsGetCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.get" call. +// Do executes the "aiplatform.projects.locations.nasJobs.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ModelEvaluation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsModelsEvaluationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluation, error) { +// *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 *ProjectsLocationsNasJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79098,7 +82018,7 @@ func (c *ProjectsLocationsModelsEvaluationsGetCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ModelEvaluation{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79111,59 +82031,59 @@ func (c *ProjectsLocationsModelsEvaluationsGetCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsModelsEvaluationsImportCall struct { - s *Service - parent string - googlecloudaiplatformv1importmodelevaluationrequest *GoogleCloudAiplatformV1ImportModelEvaluationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNasJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1nasjob *GoogleCloudAiplatformV1NasJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Import: Imports an externally generated ModelEvaluation. +// Create: Creates a NasJob // -// - parent: The name of the parent model resource. Format: -// `projects/{project}/locations/{location}/models/{model}`. -func (r *ProjectsLocationsModelsEvaluationsService) Import(parent string, googlecloudaiplatformv1importmodelevaluationrequest *GoogleCloudAiplatformV1ImportModelEvaluationRequest) *ProjectsLocationsModelsEvaluationsImportCall { - c := &ProjectsLocationsModelsEvaluationsImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to create the NasJob in. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNasJobsService) Create(parent string, googlecloudaiplatformv1nasjob *GoogleCloudAiplatformV1NasJob) *ProjectsLocationsNasJobsCreateCall { + c := &ProjectsLocationsNasJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1importmodelevaluationrequest = googlecloudaiplatformv1importmodelevaluationrequest + c.googlecloudaiplatformv1nasjob = googlecloudaiplatformv1nasjob return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsImportCall { +func (c *ProjectsLocationsNasJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsImportCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsImportCall { +func (c *ProjectsLocationsNasJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsNasJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsImportCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsImportCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importmodelevaluationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1nasjob) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nasJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -79176,13 +82096,13 @@ func (c *ProjectsLocationsModelsEvaluationsImportCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.import" call. +// Do executes the "aiplatform.projects.locations.nasJobs.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ModelEvaluation.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1NasJob.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsModelsEvaluationsImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluation, error) { +func (c *ProjectsLocationsNasJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79201,7 +82121,7 @@ func (c *ProjectsLocationsModelsEvaluationsImportCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ModelEvaluation{ + ret := &GoogleCloudAiplatformV1NasJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79214,112 +82134,72 @@ func (c *ProjectsLocationsModelsEvaluationsImportCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsModelsEvaluationsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNasJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists ModelEvaluations in a Model. +// Delete: Deletes a NasJob. // -// - parent: The resource name of the Model to list the ModelEvaluations from. -// Format: `projects/{project}/locations/{location}/models/{model}`. -func (r *ProjectsLocationsModelsEvaluationsService) List(parent string) *ProjectsLocationsModelsEvaluationsListCall { - c := &ProjectsLocationsModelsEvaluationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsModelsEvaluationsListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsModelsEvaluationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListModelEvaluationsResponse.next_page_token -// of the previous ModelService.ListModelEvaluations call. -func (c *ProjectsLocationsModelsEvaluationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsModelsEvaluationsListCall) ReadMask(readMask string) *ProjectsLocationsModelsEvaluationsListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the NasJob resource to be deleted. Format: +// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. +func (r *ProjectsLocationsNasJobsService) Delete(name string) *ProjectsLocationsNasJobsDeleteCall { + c := &ProjectsLocationsNasJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsListCall { +func (c *ProjectsLocationsNasJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsModelsEvaluationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsListCall { +func (c *ProjectsLocationsNasJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNasJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsListCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/evaluations") + 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 "aiplatform.projects.locations.models.evaluations.list" call. +// Do executes the "aiplatform.projects.locations.nasJobs.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListModelEvaluationsResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because +// *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 *ProjectsLocationsModelsEvaluationsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelEvaluationsResponse, error) { +func (c *ProjectsLocationsNasJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79338,7 +82218,7 @@ func (c *ProjectsLocationsModelsEvaluationsListCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListModelEvaluationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79351,48 +82231,21 @@ func (c *ProjectsLocationsModelsEvaluationsListCall) Do(opts ...googleapi.CallOp return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsModelsEvaluationsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelEvaluationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsModelsEvaluationsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNasJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// Get: Gets a NasJob // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsModelsEvaluationsOperationsService) Cancel(name string) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { - c := &ProjectsLocationsModelsEvaluationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NasJob resource. Format: +// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. +func (r *ProjectsLocationsNasJobsService) Get(name string) *ProjectsLocationsNasJobsGetCall { + c := &ProjectsLocationsNasJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -79400,34 +82253,45 @@ func (r *ProjectsLocationsModelsEvaluationsOperationsService) Cancel(name string // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { +func (c *ProjectsLocationsNasJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsNasJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsCancelCall { +func (c *ProjectsLocationsNasJobsGetCall) Context(ctx context.Context) *ProjectsLocationsNasJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + 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 } @@ -79438,13 +82302,13 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.nasJobs.get" call. // 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 *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1NasJob.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNasJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79463,7 +82327,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1NasJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79476,74 +82340,122 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsCancelCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsModelsEvaluationsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNasJobsListCall struct { + s *Service + parent 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`. +// List: Lists NasJobs in a Location. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsModelsEvaluationsOperationsService) Delete(name string) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { - c := &ProjectsLocationsModelsEvaluationsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to list the NasJobs from. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNasJobsService) List(parent string) *ProjectsLocationsNasJobsListCall { + c := &ProjectsLocationsNasJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` +// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports +// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 +// format. * `labels` supports general map functions that is: +// `labels.key=value` - key:value equality `labels.key:* - key existence Some +// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND +// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR +// display_name="my_job" * `NOT display_name="my_job" * +// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * +// `labels.keyB:*` +func (c *ProjectsLocationsNasJobsListCall) Filter(filter string) *ProjectsLocationsNasJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsNasJobsListCall) PageSize(pageSize int64) *ProjectsLocationsNasJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListNasJobsResponse.next_page_token of the +// previous JobService.ListNasJobs call. +func (c *ProjectsLocationsNasJobsListCall) PageToken(pageToken string) *ProjectsLocationsNasJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsNasJobsListCall) ReadMask(readMask string) *ProjectsLocationsNasJobsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { +func (c *ProjectsLocationsNasJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsNasJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsDeleteCall { +func (c *ProjectsLocationsNasJobsListCall) Context(ctx context.Context) *ProjectsLocationsNasJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nasJobs") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.operations.delete" call. +// Do executes the "aiplatform.projects.locations.nasJobs.list" call. // 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 *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ListNasJobsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNasJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNasJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79562,7 +82474,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Do(opts ...goog if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ListNasJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79575,7 +82487,28 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsDeleteCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsModelsEvaluationsOperationsGetCall struct { +// 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 *ProjectsLocationsNasJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNasJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsNasJobsNasTrialDetailsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -79584,13 +82517,13 @@ type ProjectsLocationsModelsEvaluationsOperationsGetCall 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 NasTrialDetail. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsModelsEvaluationsOperationsService) Get(name string) *ProjectsLocationsModelsEvaluationsOperationsGetCall { - c := &ProjectsLocationsModelsEvaluationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NasTrialDetail resource. Format: +// `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/ +// {nas_trial_detail}`. +func (r *ProjectsLocationsNasJobsNasTrialDetailsService) Get(name string) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { + c := &ProjectsLocationsNasJobsNasTrialDetailsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -79598,7 +82531,7 @@ func (r *ProjectsLocationsModelsEvaluationsOperationsService) Get(name string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79606,27 +82539,27 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Fields(s ...google // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsGetCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Context(ctx context.Context) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -79647,13 +82580,13 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.operations.get" call. +// Do executes the "aiplatform.projects.locations.nasJobs.nasTrialDetails.get" call. // 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 +// *GoogleCloudAiplatformV1NasTrialDetail.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasTrialDetail, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79672,7 +82605,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1NasTrialDetail{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79685,41 +82618,36 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsGetCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsModelsEvaluationsOperationsListCall struct { +type ProjectsLocationsNasJobsNasTrialDetailsListCall 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: List top NasTrialDetails of a NasJob. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsModelsEvaluationsOperationsService) List(name string) *ProjectsLocationsModelsEvaluationsOperationsListCall { - c := &ProjectsLocationsModelsEvaluationsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The name of the NasJob resource. Format: +// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. +func (r *ProjectsLocationsNasJobsNasTrialDetailsService) List(parent string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { + c := &ProjectsLocationsNasJobsNasTrialDetailsListCall{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 *ProjectsLocationsModelsEvaluationsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsOperationsListCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) PageSize(pageSize int64) *ProjectsLocationsNasJobsNasTrialDetailsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsOperationsListCall { +// token. Typically obtained via ListNasTrialDetailsResponse.next_page_token of +// the previous JobService.ListNasTrialDetails call. +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) PageToken(pageToken string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -79727,7 +82655,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) PageToken(pageTok // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsListCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsNasTrialDetailsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -79735,27 +82663,27 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsOperationsListCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsListCall { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Context(ctx context.Context) *ProjectsLocationsNasJobsNasTrialDetailsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -79763,7 +82691,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) doRequest(alt str 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}/nasTrialDetails") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -79771,18 +82699,18 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) doRequest(alt str } 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 "aiplatform.projects.locations.models.evaluations.operations.list" call. +// Do executes the "aiplatform.projects.locations.nasJobs.nasTrialDetails.list" call. // 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 +// *GoogleCloudAiplatformV1ListNasTrialDetailsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNasTrialDetailsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79801,7 +82729,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ListNasTrialDetailsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -79817,7 +82745,7 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Do(opts ...google // 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 *ProjectsLocationsModelsEvaluationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNasTrialDetailsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -79835,69 +82763,66 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsListCall) Pages(ctx context } } -type ProjectsLocationsModelsEvaluationsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookExecutionJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1notebookexecutionjob *GoogleCloudAiplatformV1NotebookExecutionJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// Create: Creates a NotebookExecutionJob. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsModelsEvaluationsOperationsService) Wait(name string) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { - c := &ProjectsLocationsModelsEvaluationsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create the +// NotebookExecutionJob. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookExecutionJobsService) Create(parent string, googlecloudaiplatformv1notebookexecutionjob *GoogleCloudAiplatformV1NotebookExecutionJob) *ProjectsLocationsNotebookExecutionJobsCreateCall { + c := &ProjectsLocationsNotebookExecutionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1notebookexecutionjob = googlecloudaiplatformv1notebookexecutionjob return c } -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// NotebookExecutionJobId sets the optional parameter "notebookExecutionJobId": +// User specified ID for the NotebookExecutionJob. +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) NotebookExecutionJobId(notebookExecutionJobId string) *ProjectsLocationsNotebookExecutionJobsCreateCall { + c.urlParams_.Set("notebookExecutionJobId", notebookExecutionJobId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsOperationsWaitCall { +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookexecutionjob) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookExecutionJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -79905,18 +82830,18 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) doRequest(alt str } 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 "aiplatform.projects.locations.models.evaluations.operations.wait" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.create" call. // 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 *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -79948,79 +82873,71 @@ func (c *ProjectsLocationsModelsEvaluationsOperationsWaitCall) Do(opts ...google return ret, nil } -type ProjectsLocationsModelsEvaluationsSlicesBatchImportCall struct { - s *Service - parent string - googlecloudaiplatformv1batchimportevaluatedannotationsrequest *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookExecutionJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchImport: Imports a list of externally generated EvaluatedAnnotations. +// Delete: Deletes a NotebookExecutionJob. // -// - parent: The name of the parent ModelEvaluationSlice resource. Format: -// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua -// tion}/slices/{slice}`. -func (r *ProjectsLocationsModelsEvaluationsSlicesService) BatchImport(parent string, googlecloudaiplatformv1batchimportevaluatedannotationsrequest *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsRequest) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { - c := &ProjectsLocationsModelsEvaluationsSlicesBatchImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchimportevaluatedannotationsrequest = googlecloudaiplatformv1batchimportevaluatedannotationsrequest +// - name: The name of the NotebookExecutionJob resource to be deleted. +func (r *ProjectsLocationsNotebookExecutionJobsService) Delete(name string) *ProjectsLocationsNotebookExecutionJobsDeleteCall { + c := &ProjectsLocationsNotebookExecutionJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { +func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall { +func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchimportevaluatedannotationsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}:batchImport") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.slices.batchImport" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse.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 *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse, error) { +// *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 *ProjectsLocationsNotebookExecutionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80039,7 +82956,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Do(opts ...goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1BatchImportEvaluatedAnnotationsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80052,7 +82969,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesBatchImportCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsModelsEvaluationsSlicesGetCall struct { +type ProjectsLocationsNotebookExecutionJobsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80061,21 +82978,38 @@ type ProjectsLocationsModelsEvaluationsSlicesGetCall struct { header_ http.Header } -// Get: Gets a ModelEvaluationSlice. +// Get: Gets a NotebookExecutionJob. // -// - name: The name of the ModelEvaluationSlice resource. Format: -// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua -// tion}/slices/{slice}`. -func (r *ProjectsLocationsModelsEvaluationsSlicesService) Get(name string) *ProjectsLocationsModelsEvaluationsSlicesGetCall { - c := &ProjectsLocationsModelsEvaluationsSlicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NotebookExecutionJob resource. +func (r *ProjectsLocationsNotebookExecutionJobsService) Get(name string) *ProjectsLocationsNotebookExecutionJobsGetCall { + c := &ProjectsLocationsNotebookExecutionJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// View sets the optional parameter "view": The NotebookExecutionJob view. +// Defaults to BASIC. +// +// Possible values: +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED" - When unspecified, the API +// +// defaults to the BASIC view. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC" - Includes all fields except for +// +// direct notebook inputs. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" - Includes all fields. +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) View(view string) *ProjectsLocationsNotebookExecutionJobsGetCall { + c.urlParams_.Set("view", view) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80083,27 +83017,27 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Fields(s ...googleapi. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsSlicesGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -80124,13 +83058,13 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.slices.get" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ModelEvaluationSlice.ServerResponse.Header or (if a +// *GoogleCloudAiplatformV1NotebookExecutionJob.ServerResponse.Header or (if a // response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ModelEvaluationSlice, error) { +func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookExecutionJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80149,7 +83083,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ModelEvaluationSlice{ + ret := &GoogleCloudAiplatformV1NotebookExecutionJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80162,7 +83096,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsModelsEvaluationsSlicesListCall struct { +type ProjectsLocationsNotebookExecutionJobsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -80171,52 +83105,77 @@ type ProjectsLocationsModelsEvaluationsSlicesListCall struct { header_ http.Header } -// List: Lists ModelEvaluationSlices in a ModelEvaluation. +// List: Lists NotebookExecutionJobs in a Location. // -// - parent: The resource name of the ModelEvaluation to list the -// ModelEvaluationSlices from. Format: -// `projects/{project}/locations/{location}/models/{model}/evaluations/{evalua -// tion}`. -func (r *ProjectsLocationsModelsEvaluationsSlicesService) List(parent string) *ProjectsLocationsModelsEvaluationsSlicesListCall { - c := &ProjectsLocationsModelsEvaluationsSlicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location from which to list the +// NotebookExecutionJobs. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookExecutionJobsService) List(parent string) *ProjectsLocationsNotebookExecutionJobsListCall { + c := &ProjectsLocationsNotebookExecutionJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// Filter sets the optional parameter "filter": The standard list filter. * -// `slice.dimension` - for =. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Filter(filter string) *ProjectsLocationsModelsEvaluationsSlicesListCall { +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `notebookExecutionJob` supports = and !=. +// `notebookExecutionJob` represents the NotebookExecutionJob ID. * +// `displayName` supports = and != and regex. * `schedule` supports = and != +// and regex. Some examples: * `notebookExecutionJob="123" * +// `notebookExecutionJob="my-execution-job" * `displayName="myDisplayName" +// and `displayName=~"myDisplayNameRegex" +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Filter(filter string) *ProjectsLocationsNotebookExecutionJobsListCall { 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: * `display_name` * `create_time` * +// `update_time` Example: `display_name, create_time desc`. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookExecutionJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) PageSize(pageSize int64) *ProjectsLocationsModelsEvaluationsSlicesListCall { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookExecutionJobsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. Typically obtained via -// ListModelEvaluationSlicesResponse.next_page_token of the previous -// ModelService.ListModelEvaluationSlices call. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) PageToken(pageToken string) *ProjectsLocationsModelsEvaluationsSlicesListCall { +// ListNotebookExecutionJobsResponse.next_page_token of the previous +// NotebookService.ListNotebookExecutionJobs call. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookExecutionJobsListCall { c.urlParams_.Set("pageToken", pageToken) return c } -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) ReadMask(readMask string) *ProjectsLocationsModelsEvaluationsSlicesListCall { - c.urlParams_.Set("readMask", readMask) +// View sets the optional parameter "view": The NotebookExecutionJob view. +// Defaults to BASIC. +// +// Possible values: +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED" - When unspecified, the API +// +// defaults to the BASIC view. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC" - Includes all fields except for +// +// direct notebook inputs. +// +// "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" - Includes all fields. +func (c *ProjectsLocationsNotebookExecutionJobsListCall) View(view string) *ProjectsLocationsNotebookExecutionJobsListCall { + c.urlParams_.Set("view", view) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsEvaluationsSlicesListCall { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80224,27 +83183,27 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsEvaluationsSlicesListCall { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Context(ctx context.Context) *ProjectsLocationsModelsEvaluationsSlicesListCall { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -80252,7 +83211,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) 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/{+parent}/slices") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookExecutionJobs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -80265,13 +83224,13 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.evaluations.slices.list" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse.ServerResponse.Head +// *GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse.ServerResponse.Head // er or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse, error) { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80290,7 +83249,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse{ + ret := &GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -80306,7 +83265,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Do(opts ...googleapi. // 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 *ProjectsLocationsModelsEvaluationsSlicesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListModelEvaluationSlicesResponse) error) error { +func (c *ProjectsLocationsNotebookExecutionJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -80324,7 +83283,7 @@ func (c *ProjectsLocationsModelsEvaluationsSlicesListCall) Pages(ctx context.Con } } -type ProjectsLocationsModelsOperationsCancelCall struct { +type ProjectsLocationsNotebookExecutionJobsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80343,8 +83302,8 @@ type ProjectsLocationsModelsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsModelsOperationsService) Cancel(name string) *ProjectsLocationsModelsOperationsCancelCall { - c := &ProjectsLocationsModelsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Cancel(name string) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { + c := &ProjectsLocationsNotebookExecutionJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -80352,27 +83311,27 @@ func (r *ProjectsLocationsModelsOperationsService) Cancel(name string) *Projects // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsCancelCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsCancelCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -80390,13 +83349,13 @@ func (c *ProjectsLocationsModelsOperationsCancelCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.cancel" call. // 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 *ProjectsLocationsModelsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80428,7 +83387,7 @@ func (c *ProjectsLocationsModelsOperationsCancelCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsModelsOperationsDeleteCall struct { +type ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80442,8 +83401,8 @@ type ProjectsLocationsModelsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsModelsOperationsService) Delete(name string) *ProjectsLocationsModelsOperationsDeleteCall { - c := &ProjectsLocationsModelsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Delete(name string) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { + c := &ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -80451,27 +83410,27 @@ func (r *ProjectsLocationsModelsOperationsService) Delete(name string) *Projects // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsDeleteCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsDeleteCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -80489,13 +83448,13 @@ func (c *ProjectsLocationsModelsOperationsDeleteCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.operations.delete" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.delete" call. // 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 *ProjectsLocationsModelsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80527,7 +83486,7 @@ func (c *ProjectsLocationsModelsOperationsDeleteCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsModelsOperationsGetCall struct { +type ProjectsLocationsNotebookExecutionJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80541,8 +83500,8 @@ type ProjectsLocationsModelsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsModelsOperationsService) Get(name string) *ProjectsLocationsModelsOperationsGetCall { - c := &ProjectsLocationsModelsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Get(name string) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { + c := &ProjectsLocationsNotebookExecutionJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -80550,7 +83509,7 @@ func (r *ProjectsLocationsModelsOperationsService) Get(name string) *ProjectsLoc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80558,27 +83517,27 @@ func (c *ProjectsLocationsModelsOperationsGetCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsModelsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsOperationsGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsGetCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -80599,13 +83558,13 @@ func (c *ProjectsLocationsModelsOperationsGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.operations.get" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.get" call. // 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 *ProjectsLocationsModelsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80637,7 +83596,7 @@ func (c *ProjectsLocationsModelsOperationsGetCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsModelsOperationsListCall struct { +type ProjectsLocationsNotebookExecutionJobsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80650,28 +83609,28 @@ type ProjectsLocationsModelsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsModelsOperationsService) List(name string) *ProjectsLocationsModelsOperationsListCall { - c := &ProjectsLocationsModelsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) List(name string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { + c := &ProjectsLocationsNotebookExecutionJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsModelsOperationsListCall) Filter(filter string) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsModelsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsModelsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -80679,7 +83638,7 @@ func (c *ProjectsLocationsModelsOperationsListCall) PageToken(pageToken string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -80687,27 +83646,27 @@ func (c *ProjectsLocationsModelsOperationsListCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsModelsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsListCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -80728,13 +83687,13 @@ func (c *ProjectsLocationsModelsOperationsListCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.operations.list" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.list" call. // 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 *ProjectsLocationsModelsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80769,7 +83728,7 @@ func (c *ProjectsLocationsModelsOperationsListCall) Do(opts ...googleapi.CallOpt // 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 *ProjectsLocationsModelsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -80787,7 +83746,7 @@ func (c *ProjectsLocationsModelsOperationsListCall) Pages(ctx context.Context, f } } -type ProjectsLocationsModelsOperationsWaitCall struct { +type ProjectsLocationsNotebookExecutionJobsOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -80806,8 +83765,8 @@ type ProjectsLocationsModelsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsModelsOperationsService) Wait(name string) *ProjectsLocationsModelsOperationsWaitCall { - c := &ProjectsLocationsModelsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Wait(name string) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { + c := &ProjectsLocationsNotebookExecutionJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -80816,7 +83775,7 @@ func (r *ProjectsLocationsModelsOperationsService) Wait(name string) *ProjectsLo // before timing out. If left blank, the wait will be at most the time // permitted by the underlying HTTP/RPC protocol. If RPC context deadline is // also specified, the shorter one will be used. -func (c *ProjectsLocationsModelsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsModelsOperationsWaitCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -80824,27 +83783,27 @@ func (c *ProjectsLocationsModelsOperationsWaitCall) Timeout(timeout string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsModelsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsModelsOperationsWaitCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsModelsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsModelsOperationsWaitCall { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsModelsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsModelsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -80862,13 +83821,13 @@ func (c *ProjectsLocationsModelsOperationsWaitCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.models.operations.wait" call. +// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.wait" call. // 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 *ProjectsLocationsModelsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -80900,285 +83859,86 @@ func (c *ProjectsLocationsModelsOperationsWaitCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsNasJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelnasjobrequest *GoogleCloudAiplatformV1CancelNasJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Cancel: Cancels a NasJob. Starts asynchronous cancellation on the NasJob. -// The server makes a best effort to cancel the job, but success is not -// guaranteed. Clients can use JobService.GetNasJob or other methods to check -// whether the cancellation succeeded or whether the job completed despite -// cancellation. On successful cancellation, the NasJob is not deleted; instead -// it becomes a job with a NasJob.error value with a google.rpc.Status.code of -// 1, corresponding to `Code.CANCELLED`, and NasJob.state is set to -// `CANCELLED`. -// -// - name: The name of the NasJob to cancel. Format: -// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. -func (r *ProjectsLocationsNasJobsService) Cancel(name string, googlecloudaiplatformv1cancelnasjobrequest *GoogleCloudAiplatformV1CancelNasJobRequest) *ProjectsLocationsNasJobsCancelCall { - c := &ProjectsLocationsNasJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1cancelnasjobrequest = googlecloudaiplatformv1cancelnasjobrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNasJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsNasJobsCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNasJobsCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNasJobsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelnasjobrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.nasJobs.cancel" call. -// 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 *ProjectsLocationsNasJobsCancelCall) 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 -} - -type ProjectsLocationsNasJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1nasjob *GoogleCloudAiplatformV1NasJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a NasJob -// -// - parent: The resource name of the Location to create the NasJob in. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNasJobsService) Create(parent string, googlecloudaiplatformv1nasjob *GoogleCloudAiplatformV1NasJob) *ProjectsLocationsNasJobsCreateCall { - c := &ProjectsLocationsNasJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1nasjob = googlecloudaiplatformv1nasjob - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNasJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsNasJobsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNasJobsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNasJobsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1nasjob) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nasJobs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.nasJobs.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NasJob.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsNasJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasJob, 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 := &GoogleCloudAiplatformV1NasJob{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsNasJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimeTemplatesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a NasJob. +// Create: Creates a NotebookRuntimeTemplate. // -// - name: The name of the NasJob resource to be deleted. Format: -// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. -func (r *ProjectsLocationsNasJobsService) Delete(name string) *ProjectsLocationsNasJobsDeleteCall { - c := &ProjectsLocationsNasJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create the +// NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Create(parent string, googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1notebookruntimetemplate = googlecloudaiplatformv1notebookruntimetemplate + return c +} + +// NotebookRuntimeTemplateId sets the optional parameter +// "notebookRuntimeTemplateId": User specified ID for the notebook runtime +// template. +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) NotebookRuntimeTemplateId(notebookRuntimeTemplateId string) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { + c.urlParams_.Set("notebookRuntimeTemplateId", notebookRuntimeTemplateId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNasJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNasJobsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNasJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNasJobsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookruntimetemplate) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimeTemplates") 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 "aiplatform.projects.locations.nasJobs.delete" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.create" call. // 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 *ProjectsLocationsNasJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81210,21 +83970,22 @@ func (c *ProjectsLocationsNasJobsDeleteCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsNasJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimeTemplatesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a NasJob +// Delete: Deletes a NotebookRuntimeTemplate. // -// - name: The name of the NasJob resource. Format: -// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. -func (r *ProjectsLocationsNasJobsService) Get(name string) *ProjectsLocationsNasJobsGetCall { - c := &ProjectsLocationsNasJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NotebookRuntimeTemplate resource to be deleted. +// Format: +// `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook +// _runtime_template}`. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Delete(name string) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -81232,45 +83993,34 @@ func (r *ProjectsLocationsNasJobsService) Get(name string) *ProjectsLocationsNas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNasJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsNasJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsGetCall) Context(ctx context.Context) *ProjectsLocationsNasJobsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNasJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNasJobsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -81281,13 +84031,13 @@ func (c *ProjectsLocationsNasJobsGetCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.nasJobs.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NasJob.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsNasJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasJob, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81306,7 +84056,7 @@ func (c *ProjectsLocationsNasJobsGetCall) Do(opts ...googleapi.CallOption) (*Goo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NasJob{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81319,67 +84069,30 @@ func (c *ProjectsLocationsNasJobsGetCall) Do(opts ...googleapi.CallOption) (*Goo return ret, nil } -type ProjectsLocationsNasJobsListCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesGetCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists NasJobs in a Location. +// Get: Gets a NotebookRuntimeTemplate. // -// - parent: The resource name of the Location to list the NasJobs from. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNasJobsService) List(parent string) *ProjectsLocationsNasJobsListCall { - c := &ProjectsLocationsNasJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -// Supported fields: * `display_name` supports `=`, `!=` comparisons, and `:` -// wildcard. * `state` supports `=`, `!=` comparisons. * `create_time` supports -// `=`, `!=`,`<`, `<=`,`>`, `>=` comparisons. `create_time` must be in RFC 3339 -// format. * `labels` supports general map functions that is: -// `labels.key=value` - key:value equality `labels.key:* - key existence Some -// examples of using the filter are: * `state="JOB_STATE_SUCCEEDED" AND -// display_name:"my_job_*" * `state!="JOB_STATE_FAILED" OR -// display_name="my_job" * `NOT display_name="my_job" * -// `create_time>"2021-05-18T00:00:00Z" * `labels.keyA=valueA` * -// `labels.keyB:*` -func (c *ProjectsLocationsNasJobsListCall) Filter(filter string) *ProjectsLocationsNasJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsNasJobsListCall) PageSize(pageSize int64) *ProjectsLocationsNasJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListNasJobsResponse.next_page_token of the -// previous JobService.ListNasJobs call. -func (c *ProjectsLocationsNasJobsListCall) PageToken(pageToken string) *ProjectsLocationsNasJobsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsNasJobsListCall) ReadMask(readMask string) *ProjectsLocationsNasJobsListCall { - c.urlParams_.Set("readMask", readMask) +// - name: The name of the NotebookRuntimeTemplate resource. Format: +// `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook +// _runtime_template}`. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Get(name string) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNasJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -81387,27 +84100,27 @@ func (c *ProjectsLocationsNasJobsListCall) Fields(s ...googleapi.Field) *Project // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsNasJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsListCall) Context(ctx context.Context) *ProjectsLocationsNasJobsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNasJobsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNasJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -81415,7 +84128,7 @@ func (c *ProjectsLocationsNasJobsListCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/nasJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -81423,18 +84136,18 @@ func (c *ProjectsLocationsNasJobsListCall) doRequest(alt string) (*http.Response } 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 "aiplatform.projects.locations.nasJobs.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListNasJobsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1NotebookRuntimeTemplate.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsNasJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNasJobsResponse, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntimeTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81453,7 +84166,7 @@ func (c *ProjectsLocationsNasJobsListCall) Do(opts ...googleapi.CallOption) (*Go if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListNasJobsResponse{ + ret := &GoogleCloudAiplatformV1NotebookRuntimeTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81466,106 +84179,91 @@ func (c *ProjectsLocationsNasJobsListCall) Do(opts ...googleapi.CallOption) (*Go return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsNasJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNasJobsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } +type ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -type ProjectsLocationsNasJobsNasTrialDetailsGetCall struct { - s *Service - 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 *ProjectsLocationsNotebookRuntimeTemplatesService) GetIamPolicy(resource string) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + return c } -// Get: Gets a NasTrialDetail. -// -// - name: The name of the NasTrialDetail resource. Format: -// `projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/ -// {nas_trial_detail}`. -func (r *ProjectsLocationsNasJobsNasTrialDetailsService) Get(name string) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { - c := &ProjectsLocationsNasJobsNasTrialDetailsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// 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 *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Context(ctx context.Context) *ProjectsLocationsNasJobsNasTrialDetailsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") 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 "aiplatform.projects.locations.nasJobs.nasTrialDetails.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NasTrialDetail.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NasTrialDetail, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81584,7 +84282,7 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NasTrialDetail{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81597,7 +84295,7 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsGetCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsNasJobsNasTrialDetailsListCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -81606,35 +84304,73 @@ type ProjectsLocationsNasJobsNasTrialDetailsListCall struct { header_ http.Header } -// List: List top NasTrialDetails of a NasJob. +// List: Lists NotebookRuntimeTemplates in a Location. // -// - parent: The name of the NasJob resource. Format: -// `projects/{project}/locations/{location}/nasJobs/{nas_job}`. -func (r *ProjectsLocationsNasJobsNasTrialDetailsService) List(parent string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { - c := &ProjectsLocationsNasJobsNasTrialDetailsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location from which to list the +// NotebookRuntimeTemplates. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) List(parent string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } +// Filter sets the optional parameter "filter": An expression for filtering the +// results of the request. For field names both snake_case and camelCase are +// supported. * `notebookRuntimeTemplate` supports = and !=. +// `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. +// the last segment of the NotebookRuntimeTemplate's resource name. * +// `display_name` supports = and != * `labels` supports general map functions +// that is: * `labels.key=value` - key:value equality * `labels.key:* or +// labels:key - key existence * A key including a space must be quoted. +// `labels."a key". * `notebookRuntimeType` supports = and !=. +// notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` +// supports = and !=. * `acceleratorType` supports = and !=. Some examples: * +// `notebookRuntimeTemplate=notebookRuntimeTemplate123` * +// `displayName="myDisplayName" * `labels.myKey="myValue" * +// `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * +// `acceleratorType=NVIDIA_TESLA_T4` +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { + 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: * `display_name` * `create_time` * +// `update_time` Example: `display_name, create_time desc`. +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) PageSize(pageSize int64) *ProjectsLocationsNasJobsNasTrialDetailsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListNasTrialDetailsResponse.next_page_token of -// the previous JobService.ListNasTrialDetails call. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) PageToken(pageToken string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { +// token. Typically obtained via +// ListNotebookRuntimeTemplatesResponse.next_page_token of the previous +// NotebookService.ListNotebookRuntimeTemplates call. +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.urlParams_.Set("pageToken", pageToken) return c } +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) ReadMask(readMask string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { + c.urlParams_.Set("readMask", readMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNasJobsNasTrialDetailsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -81642,27 +84378,27 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Fields(s ...googleapi. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNasJobsNasTrialDetailsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Context(ctx context.Context) *ProjectsLocationsNasJobsNasTrialDetailsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -81670,7 +84406,7 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) 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/{+parent}/nasTrialDetails") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimeTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -81683,13 +84419,13 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.nasJobs.nasTrialDetails.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListNasTrialDetailsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNasTrialDetailsResponse, error) { +// *GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse.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 *ProjectsLocationsNotebookRuntimeTemplatesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81708,7 +84444,7 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListNasTrialDetailsResponse{ + ret := &GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81724,7 +84460,7 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Do(opts ...googleapi.C // 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 *ProjectsLocationsNasJobsNasTrialDetailsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNasTrialDetailsResponse) error) error { +func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -81742,164 +84478,69 @@ func (c *ProjectsLocationsNasJobsNasTrialDetailsListCall) Pages(ctx context.Cont } } -type ProjectsLocationsNotebookExecutionJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1notebookexecutionjob *GoogleCloudAiplatformV1NotebookExecutionJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimeTemplatesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a NotebookExecutionJob. +// Patch: Updates a NotebookRuntimeTemplate. // -// - parent: The resource name of the Location to create the -// NotebookExecutionJob. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookExecutionJobsService) Create(parent string, googlecloudaiplatformv1notebookexecutionjob *GoogleCloudAiplatformV1NotebookExecutionJob) *ProjectsLocationsNotebookExecutionJobsCreateCall { - c := &ProjectsLocationsNotebookExecutionJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1notebookexecutionjob = googlecloudaiplatformv1notebookexecutionjob +// - name: The resource name of the NotebookRuntimeTemplate. +func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Patch(name string, googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1notebookruntimetemplate = googlecloudaiplatformv1notebookruntimetemplate return c } -// NotebookExecutionJobId sets the optional parameter "notebookExecutionJobId": -// User specified ID for the NotebookExecutionJob. -func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) NotebookExecutionJobId(notebookExecutionJobId string) *ProjectsLocationsNotebookExecutionJobsCreateCall { - c.urlParams_.Set("notebookExecutionJobId", notebookExecutionJobId) +// UpdateMask sets the optional parameter "updateMask": Required. The update +// mask applies to the resource. For the `FieldMask` definition, see +// google.protobuf.FieldMask. Input format: `{paths: "${updated_filed}"}` +// Updatable fields: * `encryption_spec.kms_key_name` +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsCreateCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsCreateCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookexecutionjob) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookExecutionJobs") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.create" call. -// 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 *ProjectsLocationsNotebookExecutionJobsCreateCall) 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, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookruntimetemplate) 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 -} - -type ProjectsLocationsNotebookExecutionJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a NotebookExecutionJob. -// -// - name: The name of the NotebookExecutionJob resource to be deleted. -func (r *ProjectsLocationsNotebookExecutionJobsService) Delete(name string) *ProjectsLocationsNotebookExecutionJobsDeleteCall { - c := &ProjectsLocationsNotebookExecutionJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -81910,13 +84551,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.delete" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.patch" call. // 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 +// *GoogleCloudAiplatformV1NotebookRuntimeTemplate.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntimeTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -81935,7 +84576,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1NotebookRuntimeTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -81948,102 +84589,81 @@ func (c *ProjectsLocationsNotebookExecutionJobsDeleteCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsNotebookExecutionJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Gets a NotebookExecutionJob. -// -// - name: The name of the NotebookExecutionJob resource. -func (r *ProjectsLocationsNotebookExecutionJobsService) Get(name string) *ProjectsLocationsNotebookExecutionJobsGetCall { - c := &ProjectsLocationsNotebookExecutionJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c +type ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall struct { + s *Service + resource string + googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// View sets the optional parameter "view": The NotebookExecutionJob view. -// Defaults to BASIC. -// -// Possible values: -// -// "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED" - When unspecified, the API -// -// defaults to the BASIC view. -// -// "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC" - Includes all fields except for -// -// direct notebook inputs. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, +// and `PERMISSION_DENIED` errors. // -// "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" - Includes all fields. -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) View(view string) *ProjectsLocationsNotebookExecutionJobsGetCall { - c.urlParams_.Set("view", view) +// - 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 *ProjectsLocationsNotebookRuntimeTemplatesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := 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 "aiplatform.projects.locations.notebookExecutionJobs.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NotebookExecutionJob.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookExecutionJob, error) { +// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82062,7 +84682,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NotebookExecutionJob{ + ret := &GoogleIamV1Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -82075,141 +84695,87 @@ func (c *ProjectsLocationsNotebookExecutionJobsGetCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsNotebookExecutionJobsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall struct { + s *Service + resource string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists NotebookExecutionJobs in a Location. +// 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. // -// - parent: The resource name of the Location from which to list the -// NotebookExecutionJobs. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookExecutionJobsService) List(parent string) *ProjectsLocationsNotebookExecutionJobsListCall { - c := &ProjectsLocationsNotebookExecutionJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `notebookExecutionJob` supports = and !=. -// `notebookExecutionJob` represents the NotebookExecutionJob ID. * -// `displayName` supports = and != and regex. * `schedule` supports = and != -// and regex. Some examples: * `notebookExecutionJob="123" * -// `notebookExecutionJob="my-execution-job" * `displayName="myDisplayName" -// and `displayName=~"myDisplayNameRegex" -func (c *ProjectsLocationsNotebookExecutionJobsListCall) Filter(filter string) *ProjectsLocationsNotebookExecutionJobsListCall { - 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: * `display_name` * `create_time` * -// `update_time` Example: `display_name, create_time desc`. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookExecutionJobsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookExecutionJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via -// ListNotebookExecutionJobsResponse.next_page_token of the previous -// NotebookService.ListNotebookExecutionJobs call. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookExecutionJobsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - 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 *ProjectsLocationsNotebookRuntimeTemplatesService) TestIamPermissions(resource string) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// View sets the optional parameter "view": The NotebookExecutionJob view. -// Defaults to BASIC. -// -// Possible values: -// -// "NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED" - When unspecified, the API -// -// defaults to the BASIC view. -// -// "NOTEBOOK_EXECUTION_JOB_VIEW_BASIC" - Includes all fields except for -// -// direct notebook inputs. -// -// "NOTEBOOK_EXECUTION_JOB_VIEW_FULL" - Includes all fields. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) View(view string) *ProjectsLocationsNotebookExecutionJobsListCall { - c.urlParams_.Set("view", view) +// Permissions sets the optional parameter "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). +func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { + c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookExecutionJobs") + 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{ - "parent": c.parent, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse.ServerResponse.Head -// er or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse, error) { +// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82228,7 +84794,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsListCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse{ + ret := &GoogleIamV1TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -82241,28 +84807,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsListCall) Do(opts ...googleapi.Ca return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsNotebookExecutionJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookExecutionJobsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsNotebookExecutionJobsOperationsCancelCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -82281,8 +84826,8 @@ type ProjectsLocationsNotebookExecutionJobsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Cancel(name string) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { - c := &ProjectsLocationsNotebookExecutionJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Cancel(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -82290,27 +84835,27 @@ func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Cancel(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -82328,13 +84873,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.cancel" call. // 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 *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82366,7 +84911,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsCancelCall) Do(opts ... return ret, nil } -type ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -82380,8 +84925,8 @@ type ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Delete(name string) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { - c := &ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Delete(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -82389,27 +84934,27 @@ func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Delete(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -82427,13 +84972,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.delete" call. // 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 *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82465,7 +85010,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsDeleteCall) Do(opts ... return ret, nil } -type ProjectsLocationsNotebookExecutionJobsOperationsGetCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -82479,8 +85024,8 @@ type ProjectsLocationsNotebookExecutionJobsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Get(name string) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { - c := &ProjectsLocationsNotebookExecutionJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Get(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -82488,7 +85033,7 @@ func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Get(name strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82496,27 +85041,27 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Fields(s ...go // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -82537,13 +85082,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.get" call. // 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 *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82575,7 +85120,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsGetCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsNotebookExecutionJobsOperationsListCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -82588,28 +85133,28 @@ type ProjectsLocationsNotebookExecutionJobsOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) List(name string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { - c := &ProjectsLocationsNotebookExecutionJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) List(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -82617,7 +85162,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) PageToken(pag // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -82625,27 +85170,27 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Fields(s ...g // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -82666,13 +85211,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.list" call. // 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 *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82707,7 +85252,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) 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 *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -82725,7 +85270,7 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsListCall) Pages(ctx con } } -type ProjectsLocationsNotebookExecutionJobsOperationsWaitCall struct { +type ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -82744,8 +85289,8 @@ type ProjectsLocationsNotebookExecutionJobsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Wait(name string) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { - c := &ProjectsLocationsNotebookExecutionJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Wait(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { + c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -82754,7 +85299,7 @@ func (r *ProjectsLocationsNotebookExecutionJobsOperationsService) Wait(name stri // before timing out. If left blank, the wait will be at most the time // permitted by the underlying HTTP/RPC protocol. If RPC context deadline is // also specified, the shorter one will be used. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -82762,27 +85307,27 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Timeout(timeo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -82800,13 +85345,13 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookExecutionJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.wait" call. // 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 *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -82838,67 +85383,61 @@ func (c *ProjectsLocationsNotebookExecutionJobsOperationsWaitCall) Do(opts ...go return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesAssignCall struct { + s *Service + parent string + googlecloudaiplatformv1assignnotebookruntimerequest *GoogleCloudAiplatformV1AssignNotebookRuntimeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a NotebookRuntimeTemplate. +// Assign: Assigns a NotebookRuntime to a user for a particular Notebook file. +// This method will either returns an existing assignment or generates a new +// one. // -// - parent: The resource name of the Location to create the -// NotebookRuntimeTemplate. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Create(parent string, googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to get the NotebookRuntime +// assignment. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookRuntimesService) Assign(parent string, googlecloudaiplatformv1assignnotebookruntimerequest *GoogleCloudAiplatformV1AssignNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesAssignCall { + c := &ProjectsLocationsNotebookRuntimesAssignCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1notebookruntimetemplate = googlecloudaiplatformv1notebookruntimetemplate - return c -} - -// NotebookRuntimeTemplateId sets the optional parameter -// "notebookRuntimeTemplateId": User specified ID for the notebook runtime -// template. -func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) NotebookRuntimeTemplateId(notebookRuntimeTemplateId string) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { - c.urlParams_.Set("notebookRuntimeTemplateId", notebookRuntimeTemplateId) + c.googlecloudaiplatformv1assignnotebookruntimerequest = googlecloudaiplatformv1assignnotebookruntimerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { +func (c *ProjectsLocationsNotebookRuntimesAssignCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesAssignCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesCreateCall { +func (c *ProjectsLocationsNotebookRuntimesAssignCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesAssignCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesAssignCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesAssignCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookruntimetemplate) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1assignnotebookruntimerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimeTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimes:assign") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -82911,112 +85450,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.create" call. -// 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 *ProjectsLocationsNotebookRuntimeTemplatesCreateCall) 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 -} - -type ProjectsLocationsNotebookRuntimeTemplatesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a NotebookRuntimeTemplate. -// -// - name: The name of the NotebookRuntimeTemplate resource to be deleted. -// Format: -// `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook -// _runtime_template}`. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Delete(name string) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.delete" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.assign" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimesAssignCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83048,22 +85488,22 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesDeleteCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a NotebookRuntimeTemplate. +// Delete: Deletes a NotebookRuntime. // -// - name: The name of the NotebookRuntimeTemplate resource. Format: -// `projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook -// _runtime_template}`. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Get(name string) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NotebookRuntime resource to be deleted. Instead of +// checking whether the name is in valid NotebookRuntime resource name +// format, directly throw NotFound exception if there is no such +// NotebookRuntime in spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Delete(name string) *ProjectsLocationsNotebookRuntimesDeleteCall { + c := &ProjectsLocationsNotebookRuntimesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -83071,45 +85511,34 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Get(name string) *Pro // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { +func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesGetCall { +func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -83120,13 +85549,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NotebookRuntimeTemplate.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntimeTemplate, error) { +func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83145,7 +85574,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NotebookRuntimeTemplate{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83158,91 +85587,86 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesGetCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesGetCall struct { + s *Service + 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: Gets a NotebookRuntime. // -// - 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 *ProjectsLocationsNotebookRuntimeTemplatesService) GetIamPolicy(resource string) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall{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 *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The name of the NotebookRuntime resource. Instead of checking +// whether the name is in valid NotebookRuntime resource name format, +// directly throw NotFound exception if there is no such NotebookRuntime in +// spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Get(name string) *ProjectsLocationsNotebookRuntimesGetCall { + c := &ProjectsLocationsNotebookRuntimesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { +func (c *ProjectsLocationsNotebookRuntimesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsNotebookRuntimesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall { +func (c *ProjectsLocationsNotebookRuntimesGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy") + 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 "aiplatform.projects.locations.notebookRuntimeTemplates.getIamPolicy" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *GoogleCloudAiplatformV1NotebookRuntime.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNotebookRuntimesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntime, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83261,7 +85685,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleCloudAiplatformV1NotebookRuntime{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83274,7 +85698,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesGetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesListCall struct { +type ProjectsLocationsNotebookRuntimesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -83283,31 +85707,42 @@ type ProjectsLocationsNotebookRuntimeTemplatesListCall struct { header_ http.Header } -// List: Lists NotebookRuntimeTemplates in a Location. +// List: Lists NotebookRuntimes in a Location. // // - parent: The resource name of the Location from which to list the -// NotebookRuntimeTemplates. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) List(parent string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// NotebookRuntimes. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsNotebookRuntimesService) List(parent string) *ProjectsLocationsNotebookRuntimesListCall { + c := &ProjectsLocationsNotebookRuntimesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": An expression for filtering the // results of the request. For field names both snake_case and camelCase are -// supported. * `notebookRuntimeTemplate` supports = and !=. +// supported. * `notebookRuntime` supports = and !=. `notebookRuntime` +// represents the NotebookRuntime ID, i.e. the last segment of the +// NotebookRuntime's resource name. * `displayName` supports = and != and +// regex. * `notebookRuntimeTemplate` supports = and !=. // `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. // the last segment of the NotebookRuntimeTemplate's resource name. * -// `display_name` supports = and != * `labels` supports general map functions -// that is: * `labels.key=value` - key:value equality * `labels.key:* or -// labels:key - key existence * A key including a space must be quoted. -// `labels."a key". * `notebookRuntimeType` supports = and !=. -// notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * -// `notebookRuntimeTemplate=notebookRuntimeTemplate123` * -// `displayName="myDisplayName" * `labels.myKey="myValue" * -// `notebookRuntimeType=USER_DEFINED` -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +// `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, +// HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState +// enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, +// STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. +// * API version is UI only: `uiState` supports = and !=. uiState enum: +// [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, +// UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, +// UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and +// !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` +// supports = and !=. * `acceleratorType` supports = and !=. Some examples: * +// `notebookRuntime="notebookRuntime123" * `displayName="myDisplayName" and +// `displayName=~"myDisplayNameRegex" * +// `notebookRuntimeTemplate="notebookRuntimeTemplate321" * +// `healthState=HEALTHY` * `runtimeState=RUNNING` * +// `runtimeUser="test@google.com" * `uiState=UI_RESOURCE_STATE_BEING_DELETED` +// * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * +// `acceleratorType=NVIDIA_TESLA_T4` +func (c *ProjectsLocationsNotebookRuntimesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("filter", filter) return c } @@ -83316,30 +85751,29 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Filter(filter string // fields to order by, sorted in ascending order. Use "desc" after a field name // for descending. Supported fields: * `display_name` * `create_time` * // `update_time` Example: `display_name, create_time desc`. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via -// ListNotebookRuntimeTemplatesResponse.next_page_token of the previous -// NotebookService.ListNotebookRuntimeTemplates call. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +// token. Typically obtained via ListNotebookRuntimesResponse.next_page_token +// of the previous NotebookService.ListNotebookRuntimes call. +func (c *ProjectsLocationsNotebookRuntimesListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("pageToken", pageToken) return c } // ReadMask sets the optional parameter "readMask": Mask specifying which // fields to read. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) ReadMask(readMask string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) ReadMask(readMask string) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("readMask", readMask) return c } @@ -83347,7 +85781,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) ReadMask(readMask st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -83355,27 +85789,27 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Fields(s ...googleap // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesListCall { +func (c *ProjectsLocationsNotebookRuntimesListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -83383,7 +85817,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) 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/{+parent}/notebookRuntimeTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -83396,13 +85830,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse.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 *ProjectsLocationsNotebookRuntimeTemplatesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse, error) { +// *GoogleCloudAiplatformV1ListNotebookRuntimesResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsNotebookRuntimesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookRuntimesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83421,7 +85855,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse{ + ret := &GoogleCloudAiplatformV1ListNotebookRuntimesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83437,7 +85871,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Do(opts ...googleapi // 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 *ProjectsLocationsNotebookRuntimeTemplatesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookRuntimeTemplatesResponse) error) error { +func (c *ProjectsLocationsNotebookRuntimesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookRuntimesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -83455,69 +85889,63 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Pages(ctx context.Co } } -type ProjectsLocationsNotebookRuntimeTemplatesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesStartCall struct { + s *Service + name string + googlecloudaiplatformv1startnotebookruntimerequest *GoogleCloudAiplatformV1StartNotebookRuntimeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a NotebookRuntimeTemplate. +// Start: Starts a NotebookRuntime. // -// - name: The resource name of the NotebookRuntimeTemplate. -func (r *ProjectsLocationsNotebookRuntimeTemplatesService) Patch(name string, googlecloudaiplatformv1notebookruntimetemplate *GoogleCloudAiplatformV1NotebookRuntimeTemplate) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the NotebookRuntime resource to be started. Instead of +// checking whether the name is in valid NotebookRuntime resource name +// format, directly throw NotFound exception if there is no such +// NotebookRuntime in spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Start(name string, googlecloudaiplatformv1startnotebookruntimerequest *GoogleCloudAiplatformV1StartNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesStartCall { + c := &ProjectsLocationsNotebookRuntimesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1notebookruntimetemplate = googlecloudaiplatformv1notebookruntimetemplate - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. The update -// mask applies to the resource. For the `FieldMask` definition, see -// google.protobuf.FieldMask. Input format: `{paths: "${updated_filed}"}` -// Updatable fields: * `encryption_spec.kms_key_name` -func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { - c.urlParams_.Set("updateMask", updateMask) + c.googlecloudaiplatformv1startnotebookruntimerequest = googlecloudaiplatformv1startnotebookruntimerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { +func (c *ProjectsLocationsNotebookRuntimesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesStartCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesPatchCall { +func (c *ProjectsLocationsNotebookRuntimesStartCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesStartCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesStartCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesStartCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1notebookruntimetemplate) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1startnotebookruntimerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:start") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -83528,13 +85956,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.patch" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.start" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NotebookRuntimeTemplate.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntimeTemplate, error) { +func (c *ProjectsLocationsNotebookRuntimesStartCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83553,7 +85981,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NotebookRuntimeTemplate{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83566,62 +85994,61 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesPatchCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesStopCall struct { + s *Service + name string + googlecloudaiplatformv1stopnotebookruntimerequest *GoogleCloudAiplatformV1StopNotebookRuntimeRequest + 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. +// Stop: Stops a NotebookRuntime. // -// - 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 *ProjectsLocationsNotebookRuntimeTemplatesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest +// - name: The name of the NotebookRuntime resource to be stopped. Instead of +// checking whether the name is in valid NotebookRuntime resource name +// format, directly throw NotFound exception if there is no such +// NotebookRuntime in spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Stop(name string, googlecloudaiplatformv1stopnotebookruntimerequest *GoogleCloudAiplatformV1StopNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesStopCall { + c := &ProjectsLocationsNotebookRuntimesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1stopnotebookruntimerequest = googlecloudaiplatformv1stopnotebookruntimerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { +func (c *ProjectsLocationsNotebookRuntimesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesStopCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall { +func (c *ProjectsLocationsNotebookRuntimesStopCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesStopCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesStopCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesStopCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googleiamv1setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1stopnotebookruntimerequest) if err != nil { return nil, err } 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}:stop") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -83629,18 +86056,18 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) doRequest(al } 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 "aiplatform.projects.locations.notebookRuntimeTemplates.setIamPolicy" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.stop" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { +// *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 *ProjectsLocationsNotebookRuntimesStopCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83659,7 +86086,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1Policy{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83672,68 +86099,61 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesSetIamPolicyCall) Do(opts ...g return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsNotebookRuntimesUpgradeCall struct { + s *Service + name string + googlecloudaiplatformv1upgradenotebookruntimerequest *GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest + 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. +// Upgrade: Upgrades a NotebookRuntime. // -// - 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 *ProjectsLocationsNotebookRuntimeTemplatesService) TestIamPermissions(resource string) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - return c -} - -// Permissions sets the optional parameter "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). -func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Permissions(permissions ...string) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { - c.urlParams_.SetMulti("permissions", append([]string{}, permissions...)) +// - name: The name of the NotebookRuntime resource to be upgrade. Instead of +// checking whether the name is in valid NotebookRuntime resource name +// format, directly throw NotFound exception if there is no such +// NotebookRuntime in spanner. +func (r *ProjectsLocationsNotebookRuntimesService) Upgrade(name string, googlecloudaiplatformv1upgradenotebookruntimerequest *GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesUpgradeCall { + c := &ProjectsLocationsNotebookRuntimesUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1upgradenotebookruntimerequest = googlecloudaiplatformv1upgradenotebookruntimerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesUpgradeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall { +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesUpgradeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1upgradenotebookruntimerequest) + if err != nil { + return nil, err + } 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}:upgrade") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -83741,18 +86161,18 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) 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 "aiplatform.projects.locations.notebookRuntimeTemplates.testIamPermissions" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.upgrade" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { +func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83771,7 +86191,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Do(opt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleIamV1TestIamPermissionsResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -83784,7 +86204,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesTestIamPermissionsCall) Do(opt return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall struct { +type ProjectsLocationsNotebookRuntimesOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -83803,8 +86223,8 @@ type ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Cancel(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimesOperationsService) Cancel(name string) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { + c := &ProjectsLocationsNotebookRuntimesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -83812,27 +86232,27 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Cancel(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -83850,13 +86270,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.cancel" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83888,7 +86308,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsCancelCall) Do(opts return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall struct { +type ProjectsLocationsNotebookRuntimesOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -83902,8 +86322,8 @@ type ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Delete(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimesOperationsService) Delete(name string) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { + c := &ProjectsLocationsNotebookRuntimesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -83911,27 +86331,27 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Delete(name // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -83949,13 +86369,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) doReques return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.delete" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.delete" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -83987,7 +86407,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsDeleteCall) Do(opts return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall struct { +type ProjectsLocationsNotebookRuntimesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -84001,8 +86421,8 @@ type ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Get(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimesOperationsService) Get(name string) *ProjectsLocationsNotebookRuntimesOperationsGetCall { + c := &ProjectsLocationsNotebookRuntimesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -84010,7 +86430,7 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Get(name st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84018,27 +86438,27 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Fields(s .. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -84059,13 +86479,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) doRequest(a return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.get" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.get" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84097,7 +86517,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsGetCall) Do(opts ... return ret, nil } -type ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall struct { +type ProjectsLocationsNotebookRuntimesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -84110,28 +86530,28 @@ type ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) List(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimesOperationsService) List(name string) *ProjectsLocationsNotebookRuntimesOperationsListCall { + c := &ProjectsLocationsNotebookRuntimesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -84139,7 +86559,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) PageToken( // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84147,27 +86567,27 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Fields(s . // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -84188,13 +86608,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.list" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.list" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84229,7 +86649,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -84247,7 +86667,7 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsListCall) Pages(ctx } } -type ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall struct { +type ProjectsLocationsNotebookRuntimesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -84266,8 +86686,8 @@ type ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Wait(name string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { - c := &ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsNotebookRuntimesOperationsService) Wait(name string) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { + c := &ProjectsLocationsNotebookRuntimesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -84276,7 +86696,7 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesOperationsService) Wait(name s // before timing out. If left blank, the wait will be at most the time // permitted by the underlying HTTP/RPC protocol. If RPC context deadline is // also specified, the shorter one will be used. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -84284,27 +86704,27 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Timeout(ti // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -84322,13 +86742,13 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) doRequest( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimeTemplates.operations.wait" call. +// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.wait" call. // 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 *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84360,61 +86780,60 @@ func (c *ProjectsLocationsNotebookRuntimeTemplatesOperationsWaitCall) Do(opts .. return ret, nil } -type ProjectsLocationsNotebookRuntimesAssignCall struct { - s *Service - parent string - googlecloudaiplatformv1assignnotebookruntimerequest *GoogleCloudAiplatformV1AssignNotebookRuntimeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Assign: Assigns a NotebookRuntime to a user for a particular Notebook file. -// This method will either returns an existing assignment or generates a new -// one. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - parent: The resource name of the Location to get the NotebookRuntime -// assignment. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookRuntimesService) Assign(parent string, googlecloudaiplatformv1assignnotebookruntimerequest *GoogleCloudAiplatformV1AssignNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesAssignCall { - c := &ProjectsLocationsNotebookRuntimesAssignCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1assignnotebookruntimerequest = googlecloudaiplatformv1assignnotebookruntimerequest +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { + c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesAssignCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesAssignCall { +func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesAssignCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesAssignCall { +func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesAssignCall) Header() http.Header { +func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesAssignCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1assignnotebookruntimerequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimes:assign") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -84422,18 +86841,18 @@ func (c *ProjectsLocationsNotebookRuntimesAssignCall) doRequest(alt string) (*ht } 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 "aiplatform.projects.locations.notebookRuntimes.assign" call. +// Do executes the "aiplatform.projects.locations.operations.cancel" call. // 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 *ProjectsLocationsNotebookRuntimesAssignCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84452,7 +86871,7 @@ func (c *ProjectsLocationsNotebookRuntimesAssignCall) Do(opts ...googleapi.CallO 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, @@ -84465,7 +86884,7 @@ func (c *ProjectsLocationsNotebookRuntimesAssignCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsNotebookRuntimesDeleteCall struct { +type ProjectsLocationsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -84473,14 +86892,14 @@ type ProjectsLocationsNotebookRuntimesDeleteCall struct { header_ http.Header } -// Delete: Deletes a NotebookRuntime. +// 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 NotebookRuntime resource to be deleted. Instead of -// checking whether the name is in valid NotebookRuntime resource name -// format, directly throw NotFound exception if there is no such -// NotebookRuntime in spanner. -func (r *ProjectsLocationsNotebookRuntimesService) Delete(name string) *ProjectsLocationsNotebookRuntimesDeleteCall { - c := &ProjectsLocationsNotebookRuntimesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 } @@ -84488,27 +86907,27 @@ func (r *ProjectsLocationsNotebookRuntimesService) Delete(name string) *Projects // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesDeleteCall { +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. -func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesDeleteCall { +func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -84526,13 +86945,13 @@ func (c *ProjectsLocationsNotebookRuntimesDeleteCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.delete" call. +// Do executes the "aiplatform.projects.locations.operations.delete" call. // 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 *ProjectsLocationsNotebookRuntimesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84551,7 +86970,7 @@ func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Do(opts ...googleapi.CallO 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, @@ -84564,7 +86983,7 @@ func (c *ProjectsLocationsNotebookRuntimesDeleteCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsNotebookRuntimesGetCall struct { +type ProjectsLocationsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -84573,14 +86992,13 @@ type ProjectsLocationsNotebookRuntimesGetCall struct { header_ http.Header } -// Get: Gets a NotebookRuntime. +// 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 NotebookRuntime resource. Instead of checking -// whether the name is in valid NotebookRuntime resource name format, -// directly throw NotFound exception if there is no such NotebookRuntime in -// spanner. -func (r *ProjectsLocationsNotebookRuntimesService) Get(name string) *ProjectsLocationsNotebookRuntimesGetCall { - c := &ProjectsLocationsNotebookRuntimesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 } @@ -84588,7 +87006,7 @@ func (r *ProjectsLocationsNotebookRuntimesService) Get(name string) *ProjectsLoc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesGetCall { +func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -84596,27 +87014,27 @@ func (c *ProjectsLocationsNotebookRuntimesGetCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookRuntimesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesGetCall { +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. -func (c *ProjectsLocationsNotebookRuntimesGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesGetCall { +func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesGetCall) Header() http.Header { +func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -84637,13 +87055,13 @@ func (c *ProjectsLocationsNotebookRuntimesGetCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.get" call. +// Do executes the "aiplatform.projects.locations.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1NotebookRuntime.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsNotebookRuntimesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1NotebookRuntime, error) { +func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -84662,7 +87080,7 @@ func (c *ProjectsLocationsNotebookRuntimesGetCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1NotebookRuntime{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -84675,357 +87093,87 @@ func (c *ProjectsLocationsNotebookRuntimesGetCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsNotebookRuntimesListCall struct { +type ProjectsLocationsOperationsListCall struct { s *Service - parent string + name string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists NotebookRuntimes in a Location. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The resource name of the Location from which to list the -// NotebookRuntimes. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsNotebookRuntimesService) List(parent string) *ProjectsLocationsNotebookRuntimesListCall { - c := &ProjectsLocationsNotebookRuntimesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent +// - 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": An expression for filtering the -// results of the request. For field names both snake_case and camelCase are -// supported. * `notebookRuntime` supports = and !=. `notebookRuntime` -// represents the NotebookRuntime ID, i.e. the last segment of the -// NotebookRuntime's resource name. * `displayName` supports = and != and -// regex. * `notebookRuntimeTemplate` supports = and !=. -// `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. -// the last segment of the NotebookRuntimeTemplate's resource name. * -// `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, -// HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState -// enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, -// STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. -// * API version is UI only: `uiState` supports = and !=. uiState enum: -// [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, -// UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, -// UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and -// !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * -// `notebookRuntime="notebookRuntime123" * `displayName="myDisplayName" and -// `displayName=~"myDisplayNameRegex" * -// `notebookRuntimeTemplate="notebookRuntimeTemplate321" * -// `healthState=HEALTHY` * `runtimeState=RUNNING` * -// `runtimeUser="test@google.com" * `uiState=UI_RESOURCE_STATE_BEING_DELETED` -// * `notebookRuntimeType=USER_DEFINED` -func (c *ProjectsLocationsNotebookRuntimesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimesListCall { +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsOperationsListCall) Filter(filter string) *ProjectsLocationsOperationsListCall { 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: * `display_name` * `create_time` * -// `update_time` Example: `display_name, create_time desc`. -func (c *ProjectsLocationsNotebookRuntimesListCall) OrderBy(orderBy string) *ProjectsLocationsNotebookRuntimesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsNotebookRuntimesListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimesListCall { +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. Typically obtained via ListNotebookRuntimesResponse.next_page_token -// of the previous NotebookService.ListNotebookRuntimes call. -func (c *ProjectsLocationsNotebookRuntimesListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsNotebookRuntimesListCall) ReadMask(readMask string) *ProjectsLocationsNotebookRuntimesListCall { - c.urlParams_.Set("readMask", readMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNotebookRuntimesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookRuntimesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNotebookRuntimesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNotebookRuntimesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/notebookRuntimes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.notebookRuntimes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListNotebookRuntimesResponse.ServerResponse.Header -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// Use googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsNotebookRuntimesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListNotebookRuntimesResponse, 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 := &GoogleCloudAiplatformV1ListNotebookRuntimesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsNotebookRuntimesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListNotebookRuntimesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsNotebookRuntimesStartCall struct { - s *Service - name string - googlecloudaiplatformv1startnotebookruntimerequest *GoogleCloudAiplatformV1StartNotebookRuntimeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Start: Starts a NotebookRuntime. -// -// - name: The name of the NotebookRuntime resource to be started. Instead of -// checking whether the name is in valid NotebookRuntime resource name -// format, directly throw NotFound exception if there is no such -// NotebookRuntime in spanner. -func (r *ProjectsLocationsNotebookRuntimesService) Start(name string, googlecloudaiplatformv1startnotebookruntimerequest *GoogleCloudAiplatformV1StartNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesStartCall { - c := &ProjectsLocationsNotebookRuntimesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1startnotebookruntimerequest = googlecloudaiplatformv1startnotebookruntimerequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsNotebookRuntimesStartCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesStartCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesStartCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesStartCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsNotebookRuntimesStartCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsNotebookRuntimesStartCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1startnotebookruntimerequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:start") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.notebookRuntimes.start" call. -// 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 *ProjectsLocationsNotebookRuntimesStartCall) 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 -} - -type ProjectsLocationsNotebookRuntimesStopCall struct { - s *Service - name string - googlecloudaiplatformv1stopnotebookruntimerequest *GoogleCloudAiplatformV1StopNotebookRuntimeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Stop: Stops a NotebookRuntime. -// -// - name: The name of the NotebookRuntime resource to be stopped. Instead of -// checking whether the name is in valid NotebookRuntime resource name -// format, directly throw NotFound exception if there is no such -// NotebookRuntime in spanner. -func (r *ProjectsLocationsNotebookRuntimesService) Stop(name string, googlecloudaiplatformv1stopnotebookruntimerequest *GoogleCloudAiplatformV1StopNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesStopCall { - c := &ProjectsLocationsNotebookRuntimesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1stopnotebookruntimerequest = googlecloudaiplatformv1stopnotebookruntimerequest +// 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 // details. -func (c *ProjectsLocationsNotebookRuntimesStopCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesStopCall { +func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesStopCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesStopCall { +func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesStopCall) Header() http.Header { +func (c *ProjectsLocationsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesStopCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1stopnotebookruntimerequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:stop") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -85036,13 +87184,13 @@ func (c *ProjectsLocationsNotebookRuntimesStopCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.stop" call. +// Do executes the "aiplatform.projects.locations.operations.list" call. // 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 +// *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 *ProjectsLocationsNotebookRuntimesStopCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85061,7 +87209,7 @@ func (c *ProjectsLocationsNotebookRuntimesStopCall) Do(opts ...googleapi.CallOpt 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, @@ -85074,61 +87222,90 @@ func (c *ProjectsLocationsNotebookRuntimesStopCall) Do(opts ...googleapi.CallOpt return ret, nil } -type ProjectsLocationsNotebookRuntimesUpgradeCall struct { - s *Service - name string - googlecloudaiplatformv1upgradenotebookruntimerequest *GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest - 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 *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Upgrade: Upgrades a NotebookRuntime. +type ProjectsLocationsOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - name: The name of the NotebookRuntime resource to be upgrade. Instead of -// checking whether the name is in valid NotebookRuntime resource name -// format, directly throw NotFound exception if there is no such -// NotebookRuntime in spanner. -func (r *ProjectsLocationsNotebookRuntimesService) Upgrade(name string, googlecloudaiplatformv1upgradenotebookruntimerequest *GoogleCloudAiplatformV1UpgradeNotebookRuntimeRequest) *ProjectsLocationsNotebookRuntimesUpgradeCall { - c := &ProjectsLocationsNotebookRuntimesUpgradeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsOperationsService) Wait(name string) *ProjectsLocationsOperationsWaitCall { + c := &ProjectsLocationsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1upgradenotebookruntimerequest = googlecloudaiplatformv1upgradenotebookruntimerequest + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesUpgradeCall { +func (c *ProjectsLocationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesUpgradeCall { +func (c *ProjectsLocationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Header() http.Header { +func (c *ProjectsLocationsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1upgradenotebookruntimerequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:upgrade") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -85141,13 +87318,13 @@ func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.upgrade" call. +// Do executes the "aiplatform.projects.locations.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleLongrunningOperation.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85179,60 +87356,69 @@ func (c *ProjectsLocationsNotebookRuntimesUpgradeCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsNotebookRuntimesOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPersistentResourcesCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// Create: Creates a PersistentResource. // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsNotebookRuntimesOperationsService) Cancel(name string) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { - c := &ProjectsLocationsNotebookRuntimesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The resource name of the Location to create the PersistentResource +// in. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPersistentResourcesService) Create(parent string, googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource) *ProjectsLocationsPersistentResourcesCreateCall { + c := &ProjectsLocationsPersistentResourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1persistentresource = googlecloudaiplatformv1persistentresource + return c +} + +// PersistentResourceId sets the optional parameter "persistentResourceId": +// Required. The ID to use for the PersistentResource, which become the final +// component of the PersistentResource's resource name. The maximum length is +// 63 characters, and valid characters are `/^a-z +// ([a-z0-9-]{0,61}[a-z0-9])?$/`. +func (c *ProjectsLocationsPersistentResourcesCreateCall) PersistentResourceId(persistentResourceId string) *ProjectsLocationsPersistentResourcesCreateCall { + c.urlParams_.Set("persistentResourceId", persistentResourceId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { +func (c *ProjectsLocationsPersistentResourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsCancelCall { +func (c *ProjectsLocationsPersistentResourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPersistentResourcesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1persistentresource) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/persistentResources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -85240,18 +87426,18 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) doRequest(alt st } 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 "aiplatform.projects.locations.notebookRuntimes.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.persistentResources.create" call. // 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 *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsPersistentResourcesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85270,7 +87456,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Do(opts ...googl 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, @@ -85283,7 +87469,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsCancelCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsNotebookRuntimesOperationsDeleteCall struct { +type ProjectsLocationsPersistentResourcesDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -85291,14 +87477,13 @@ type ProjectsLocationsNotebookRuntimesOperationsDeleteCall struct { 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`. +// Delete: Deletes a PersistentResource. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsNotebookRuntimesOperationsService) Delete(name string) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { - c := &ProjectsLocationsNotebookRuntimesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the PersistentResource to be deleted. Format: +// `projects/{project}/locations/{location}/persistentResources/{persistent_re +// source}`. +func (r *ProjectsLocationsPersistentResourcesService) Delete(name string) *ProjectsLocationsPersistentResourcesDeleteCall { + c := &ProjectsLocationsPersistentResourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -85306,27 +87491,27 @@ func (r *ProjectsLocationsNotebookRuntimesOperationsService) Delete(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { +func (c *ProjectsLocationsPersistentResourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsDeleteCall { +func (c *ProjectsLocationsPersistentResourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -85344,13 +87529,13 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.delete" call. +// Do executes the "aiplatform.projects.locations.persistentResources.delete" call. // 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 *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsPersistentResourcesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85369,7 +87554,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Do(opts ...googl 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, @@ -85382,7 +87567,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsDeleteCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsNotebookRuntimesOperationsGetCall struct { +type ProjectsLocationsPersistentResourcesGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -85391,13 +87576,13 @@ type ProjectsLocationsNotebookRuntimesOperationsGetCall 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 PersistentResource. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsNotebookRuntimesOperationsService) Get(name string) *ProjectsLocationsNotebookRuntimesOperationsGetCall { - c := &ProjectsLocationsNotebookRuntimesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the PersistentResource resource. Format: +// `projects/{project_id_or_number}/locations/{location_id}/persistentResource +// s/{persistent_resource_id}`. +func (r *ProjectsLocationsPersistentResourcesService) Get(name string) *ProjectsLocationsPersistentResourcesGetCall { + c := &ProjectsLocationsPersistentResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -85405,7 +87590,7 @@ func (r *ProjectsLocationsNotebookRuntimesOperationsService) Get(name string) *P // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85413,27 +87598,27 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Fields(s ...googlea // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesGetCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -85454,13 +87639,13 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.get" call. +// Do executes the "aiplatform.projects.locations.persistentResources.get" call. // 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 +// *GoogleCloudAiplatformV1PersistentResource.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPersistentResourcesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PersistentResource, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85479,7 +87664,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1PersistentResource{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -85492,41 +87677,37 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsGetCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsNotebookRuntimesOperationsListCall struct { +type ProjectsLocationsPersistentResourcesListCall 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 PersistentResources in a Location. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsNotebookRuntimesOperationsService) List(name string) *ProjectsLocationsNotebookRuntimesOperationsListCall { - c := &ProjectsLocationsNotebookRuntimesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimesOperationsListCall { - c.urlParams_.Set("filter", filter) +// - parent: The resource name of the Location to list the PersistentResources +// from. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPersistentResourcesService) List(parent string) *ProjectsLocationsPersistentResourcesListCall { + c := &ProjectsLocationsPersistentResourcesListCall{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 *ProjectsLocationsNotebookRuntimesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsNotebookRuntimesOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesListCall) PageSize(pageSize int64) *ProjectsLocationsPersistentResourcesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsNotebookRuntimesOperationsListCall { +// token. Typically obtained via +// ListPersistentResourcesResponse.next_page_token of the previous +// PersistentResourceService.ListPersistentResource call. +func (c *ProjectsLocationsPersistentResourcesListCall) PageToken(pageToken string) *ProjectsLocationsPersistentResourcesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -85534,7 +87715,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) PageToken(pageToke // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85542,27 +87723,27 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Fields(s ...google // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsNotebookRuntimesOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesListCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -85570,7 +87751,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) doRequest(alt stri 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}/persistentResources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -85578,18 +87759,20 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) doRequest(alt stri } 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 "aiplatform.projects.locations.notebookRuntimes.operations.list" call. +// Do executes the "aiplatform.projects.locations.persistentResources.list" call. // 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 +// *GoogleCloudAiplatformV1ListPersistentResourcesResponse.ServerResponse.Header +// +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// +// Use googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsPersistentResourcesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListPersistentResourcesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85608,7 +87791,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1ListPersistentResourcesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -85624,7 +87807,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Do(opts ...googlea // 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 *ProjectsLocationsNotebookRuntimesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsPersistentResourcesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListPersistentResourcesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -85642,69 +87825,169 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsListCall) Pages(ctx context. } } -type ProjectsLocationsNotebookRuntimesOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPersistentResourcesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// Patch: Updates a PersistentResource. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsNotebookRuntimesOperationsService) Wait(name string) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { - c := &ProjectsLocationsNotebookRuntimesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Resource name of a PersistentResource. +func (r *ProjectsLocationsPersistentResourcesService) Patch(name string, googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource) *ProjectsLocationsPersistentResourcesPatchCall { + c := &ProjectsLocationsPersistentResourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1persistentresource = googlecloudaiplatformv1persistentresource return c } -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// UpdateMask sets the optional parameter "updateMask": Required. Specify the +// fields to be overwritten in the PersistentResource by the update method. +func (c *ProjectsLocationsPersistentResourcesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPersistentResourcesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { +func (c *ProjectsLocationsPersistentResourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsNotebookRuntimesOperationsWaitCall { +func (c *ProjectsLocationsPersistentResourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPersistentResourcesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1persistentresource) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.persistentResources.patch" call. +// 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 *ProjectsLocationsPersistentResourcesPatchCall) 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 +} + +type ProjectsLocationsPersistentResourcesRebootCall struct { + s *Service + name string + googlecloudaiplatformv1rebootpersistentresourcerequest *GoogleCloudAiplatformV1RebootPersistentResourceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Reboot: Reboots a PersistentResource. +// +// - name: The name of the PersistentResource resource. Format: +// `projects/{project_id_or_number}/locations/{location_id}/persistentResource +// s/{persistent_resource_id}`. +func (r *ProjectsLocationsPersistentResourcesService) Reboot(name string, googlecloudaiplatformv1rebootpersistentresourcerequest *GoogleCloudAiplatformV1RebootPersistentResourceRequest) *ProjectsLocationsPersistentResourcesRebootCall { + c := &ProjectsLocationsPersistentResourcesRebootCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1rebootpersistentresourcerequest = googlecloudaiplatformv1rebootpersistentresourcerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsPersistentResourcesRebootCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesRebootCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsPersistentResourcesRebootCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesRebootCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsPersistentResourcesRebootCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPersistentResourcesRebootCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rebootpersistentresourcerequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reboot") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -85717,13 +88000,13 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.notebookRuntimes.operations.wait" call. +// Do executes the "aiplatform.projects.locations.persistentResources.reboot" call. // 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 *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPersistentResourcesRebootCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85755,7 +88038,7 @@ func (c *ProjectsLocationsNotebookRuntimesOperationsWaitCall) Do(opts ...googlea return ret, nil } -type ProjectsLocationsOperationsCancelCall struct { +type ProjectsLocationsPersistentResourcesOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -85774,8 +88057,8 @@ type ProjectsLocationsOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocationsOperationsCancelCall { - c := &ProjectsLocationsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPersistentResourcesOperationsService) Cancel(name string) *ProjectsLocationsPersistentResourcesOperationsCancelCall { + c := &ProjectsLocationsPersistentResourcesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -85783,27 +88066,27 @@ func (r *ProjectsLocationsOperationsService) Cancel(name string) *ProjectsLocati // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsOperationsCancelCall { +func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -85821,13 +88104,13 @@ func (c *ProjectsLocationsOperationsCancelCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.persistentResources.operations.cancel" call. // 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 *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85859,7 +88142,7 @@ func (c *ProjectsLocationsOperationsCancelCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsOperationsDeleteCall struct { +type ProjectsLocationsPersistentResourcesOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -85873,8 +88156,8 @@ type ProjectsLocationsOperationsDeleteCall struct { // `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)} +func (r *ProjectsLocationsPersistentResourcesOperationsService) Delete(name string) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { + c := &ProjectsLocationsPersistentResourcesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -85882,27 +88165,27 @@ 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 // details. -func (c *ProjectsLocationsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsOperationsDeleteCall { +func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) 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 *ProjectsLocationsPersistentResourcesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -85920,13 +88203,13 @@ func (c *ProjectsLocationsOperationsDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.operations.delete" call. +// Do executes the "aiplatform.projects.locations.persistentResources.operations.delete" call. // 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 *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -85958,7 +88241,7 @@ func (c *ProjectsLocationsOperationsDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsOperationsGetCall struct { +type ProjectsLocationsPersistentResourcesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -85972,8 +88255,8 @@ type ProjectsLocationsOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocationsOperationsGetCall { - c := &ProjectsLocationsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPersistentResourcesOperationsService) Get(name string) *ProjectsLocationsPersistentResourcesOperationsGetCall { + c := &ProjectsLocationsPersistentResourcesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -85981,7 +88264,7 @@ func (r *ProjectsLocationsOperationsService) Get(name string) *ProjectsLocations // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -85989,27 +88272,27 @@ func (c *ProjectsLocationsOperationsGetCall) Fields(s ...googleapi.Field) *Proje // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsOperationsGetCall { +func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) 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 *ProjectsLocationsPersistentResourcesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -86030,13 +88313,13 @@ func (c *ProjectsLocationsOperationsGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.operations.get" call. +// Do executes the "aiplatform.projects.locations.persistentResources.operations.get" call. // 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 *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86068,7 +88351,7 @@ func (c *ProjectsLocationsOperationsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsOperationsListCall struct { +type ProjectsLocationsPersistentResourcesOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -86081,28 +88364,28 @@ type ProjectsLocationsOperationsListCall struct { // 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)} +func (r *ProjectsLocationsPersistentResourcesOperationsService) List(name string) *ProjectsLocationsPersistentResourcesOperationsListCall { + c := &ProjectsLocationsPersistentResourcesOperationsListCall{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 { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Filter(filter string) *ProjectsLocationsPersistentResourcesOperationsListCall { 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 { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsPersistentResourcesOperationsListCall { 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 { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsPersistentResourcesOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -86110,7 +88393,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 // details. -func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -86118,27 +88401,27 @@ func (c *ProjectsLocationsOperationsListCall) Fields(s ...googleapi.Field) *Proj // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsOperationsListCall { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) 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 *ProjectsLocationsPersistentResourcesOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -86159,13 +88442,13 @@ func (c *ProjectsLocationsOperationsListCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.operations.list" call. +// Do executes the "aiplatform.projects.locations.persistentResources.operations.list" call. // 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 *ProjectsLocationsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86200,7 +88483,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(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -86218,7 +88501,7 @@ func (c *ProjectsLocationsOperationsListCall) Pages(ctx context.Context, f func( } } -type ProjectsLocationsOperationsWaitCall struct { +type ProjectsLocationsPersistentResourcesOperationsWaitCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -86237,8 +88520,8 @@ type ProjectsLocationsOperationsWaitCall struct { // that the operation is done. // // - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsOperationsService) Wait(name string) *ProjectsLocationsOperationsWaitCall { - c := &ProjectsLocationsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPersistentResourcesOperationsService) Wait(name string) *ProjectsLocationsPersistentResourcesOperationsWaitCall { + c := &ProjectsLocationsPersistentResourcesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -86247,7 +88530,7 @@ func (r *ProjectsLocationsOperationsService) Wait(name string) *ProjectsLocation // before timing out. If left blank, the wait will be at most the time // permitted by the underlying HTTP/RPC protocol. If RPC context deadline is // also specified, the shorter one will be used. -func (c *ProjectsLocationsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsOperationsWaitCall { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsPersistentResourcesOperationsWaitCall { c.urlParams_.Set("timeout", timeout) return c } @@ -86255,27 +88538,27 @@ func (c *ProjectsLocationsOperationsWaitCall) Timeout(timeout string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsOperationsWaitCall { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsOperationsWaitCall { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -86293,13 +88576,13 @@ func (c *ProjectsLocationsOperationsWaitCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.operations.wait" call. +// Do executes the "aiplatform.projects.locations.persistentResources.operations.wait" call. // 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 *ProjectsLocationsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86331,69 +88614,64 @@ func (c *ProjectsLocationsOperationsWaitCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type ProjectsLocationsPersistentResourcesCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsBatchCancelCall struct { + s *Service + parent string + googlecloudaiplatformv1batchcancelpipelinejobsrequest *GoogleCloudAiplatformV1BatchCancelPipelineJobsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a PersistentResource. +// BatchCancel: Batch cancel PipelineJobs. Firstly the server will check if all +// the jobs are in non-terminal states, and skip the jobs that are already +// terminated. If the operation failed, none of the pipeline jobs are +// cancelled. The server will poll the states of all the pipeline jobs +// periodically to check the cancellation status. This operation will return an +// LRO. // -// - parent: The resource name of the Location to create the PersistentResource -// in. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPersistentResourcesService) Create(parent string, googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource) *ProjectsLocationsPersistentResourcesCreateCall { - c := &ProjectsLocationsPersistentResourcesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The name of the PipelineJobs' parent resource. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPipelineJobsService) BatchCancel(parent string, googlecloudaiplatformv1batchcancelpipelinejobsrequest *GoogleCloudAiplatformV1BatchCancelPipelineJobsRequest) *ProjectsLocationsPipelineJobsBatchCancelCall { + c := &ProjectsLocationsPipelineJobsBatchCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.googlecloudaiplatformv1persistentresource = googlecloudaiplatformv1persistentresource - return c -} - -// PersistentResourceId sets the optional parameter "persistentResourceId": -// Required. The ID to use for the PersistentResource, which become the final -// component of the PersistentResource's resource name. The maximum length is -// 63 characters, and valid characters are `/^a-z -// ([a-z0-9-]{0,61}[a-z0-9])?$/`. -func (c *ProjectsLocationsPersistentResourcesCreateCall) PersistentResourceId(persistentResourceId string) *ProjectsLocationsPersistentResourcesCreateCall { - c.urlParams_.Set("persistentResourceId", persistentResourceId) + c.googlecloudaiplatformv1batchcancelpipelinejobsrequest = googlecloudaiplatformv1batchcancelpipelinejobsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesCreateCall { +func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsBatchCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesCreateCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesCreateCall { +func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsBatchCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesCreateCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelineJobsBatchCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1persistentresource) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcancelpipelinejobsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/persistentResources") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs:batchCancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -86406,13 +88684,13 @@ func (c *ProjectsLocationsPersistentResourcesCreateCall) doRequest(alt string) ( return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.create" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.batchCancel" call. // 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 *ProjectsLocationsPersistentResourcesCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86444,73 +88722,80 @@ func (c *ProjectsLocationsPersistentResourcesCreateCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsPersistentResourcesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsBatchDeleteCall struct { + s *Service + parent string + googlecloudaiplatformv1batchdeletepipelinejobsrequest *GoogleCloudAiplatformV1BatchDeletePipelineJobsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a PersistentResource. +// BatchDelete: Batch deletes PipelineJobs The Operation is atomic. If it +// fails, none of the PipelineJobs are deleted. If it succeeds, all of the +// PipelineJobs are deleted. // -// - name: The name of the PersistentResource to be deleted. Format: -// `projects/{project}/locations/{location}/persistentResources/{persistent_re -// source}`. -func (r *ProjectsLocationsPersistentResourcesService) Delete(name string) *ProjectsLocationsPersistentResourcesDeleteCall { - c := &ProjectsLocationsPersistentResourcesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The name of the PipelineJobs' parent resource. Format: +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPipelineJobsService) BatchDelete(parent string, googlecloudaiplatformv1batchdeletepipelinejobsrequest *GoogleCloudAiplatformV1BatchDeletePipelineJobsRequest) *ProjectsLocationsPipelineJobsBatchDeleteCall { + c := &ProjectsLocationsPipelineJobsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1batchdeletepipelinejobsrequest = googlecloudaiplatformv1batchdeletepipelinejobsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesDeleteCall { +func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsBatchDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesDeleteCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesDeleteCall { +func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsBatchDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchdeletepipelinejobsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs:batchDelete") 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 "aiplatform.projects.locations.persistentResources.delete" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.batchDelete" call. // 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 *ProjectsLocationsPersistentResourcesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86542,68 +88827,68 @@ func (c *ProjectsLocationsPersistentResourcesDeleteCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsPersistentResourcesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsCancelCall struct { + s *Service + name string + googlecloudaiplatformv1cancelpipelinejobrequest *GoogleCloudAiplatformV1CancelPipelineJobRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a PersistentResource. +// Cancel: Cancels a PipelineJob. Starts asynchronous cancellation on the +// PipelineJob. The server makes a best effort to cancel the pipeline, but +// success is not guaranteed. Clients can use PipelineService.GetPipelineJob or +// other methods to check whether the cancellation succeeded or whether the +// pipeline completed despite cancellation. On successful cancellation, the +// PipelineJob is not deleted; instead it becomes a pipeline with a +// PipelineJob.error value with a google.rpc.Status.code of 1, corresponding to +// `Code.CANCELLED`, and PipelineJob.state is set to `CANCELLED`. // -// - name: The name of the PersistentResource resource. Format: -// `projects/{project_id_or_number}/locations/{location_id}/persistentResource -// s/{persistent_resource_id}`. -func (r *ProjectsLocationsPersistentResourcesService) Get(name string) *ProjectsLocationsPersistentResourcesGetCall { - c := &ProjectsLocationsPersistentResourcesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the PipelineJob to cancel. Format: +// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. +func (r *ProjectsLocationsPipelineJobsService) Cancel(name string, googlecloudaiplatformv1cancelpipelinejobrequest *GoogleCloudAiplatformV1CancelPipelineJobRequest) *ProjectsLocationsPipelineJobsCancelCall { + c := &ProjectsLocationsPipelineJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1cancelpipelinejobrequest = googlecloudaiplatformv1cancelpipelinejobrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesGetCall { +func (c *ProjectsLocationsPipelineJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsPersistentResourcesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesGetCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesGetCall { +func (c *ProjectsLocationsPipelineJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesGetCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPipelineJobsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelpipelinejobrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -86614,13 +88899,13 @@ func (c *ProjectsLocationsPersistentResourcesGetCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.get" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.cancel" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1PersistentResource.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsPersistentResourcesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PersistentResource, error) { +// *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 *ProjectsLocationsPipelineJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86639,7 +88924,7 @@ func (c *ProjectsLocationsPersistentResourcesGetCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1PersistentResource{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -86652,83 +88937,71 @@ func (c *ProjectsLocationsPersistentResourcesGetCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsPersistentResourcesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1pipelinejob *GoogleCloudAiplatformV1PipelineJob + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists PersistentResources in a Location. +// Create: Creates a PipelineJob. A PipelineJob will run immediately when +// created. // -// - parent: The resource name of the Location to list the PersistentResources -// from. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPersistentResourcesService) List(parent string) *ProjectsLocationsPersistentResourcesListCall { - c := &ProjectsLocationsPersistentResourcesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the Location to create the PipelineJob in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPipelineJobsService) Create(parent string, googlecloudaiplatformv1pipelinejob *GoogleCloudAiplatformV1PipelineJob) *ProjectsLocationsPipelineJobsCreateCall { + c := &ProjectsLocationsPipelineJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent + c.googlecloudaiplatformv1pipelinejob = googlecloudaiplatformv1pipelinejob return c } -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsPersistentResourcesListCall) PageSize(pageSize int64) *ProjectsLocationsPersistentResourcesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via -// ListPersistentResourcesResponse.next_page_token of the previous -// PersistentResourceService.ListPersistentResource call. -func (c *ProjectsLocationsPersistentResourcesListCall) PageToken(pageToken string) *ProjectsLocationsPersistentResourcesListCall { - c.urlParams_.Set("pageToken", pageToken) +// PipelineJobId sets the optional parameter "pipelineJobId": The ID to use for +// the PipelineJob, which will become the final component of the PipelineJob +// name. If not provided, an ID will be automatically generated. This value +// should be less than 128 characters, and valid characters are `/a-z-/`. +func (c *ProjectsLocationsPipelineJobsCreateCall) PipelineJobId(pipelineJobId string) *ProjectsLocationsPipelineJobsCreateCall { + c.urlParams_.Set("pipelineJobId", pipelineJobId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesListCall { +func (c *ProjectsLocationsPipelineJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsPersistentResourcesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesListCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesListCall { +func (c *ProjectsLocationsPipelineJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesListCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPipelineJobsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1pipelinejob) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/persistentResources") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -86739,15 +89012,13 @@ func (c *ProjectsLocationsPersistentResourcesListCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.list" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListPersistentResourcesResponse.ServerResponse.Header -// -// or (if a response was returned at all) in error.(*googleapi.Error).Header. -// -// Use googleapi.IsNotModified to check whether the returned error was because +// *GoogleCloudAiplatformV1PipelineJob.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPersistentResourcesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListPersistentResourcesResponse, error) { +func (c *ProjectsLocationsPipelineJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PipelineJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86766,7 +89037,7 @@ func (c *ProjectsLocationsPersistentResourcesListCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListPersistentResourcesResponse{ + ret := &GoogleCloudAiplatformV1PipelineJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -86779,88 +89050,164 @@ func (c *ProjectsLocationsPersistentResourcesListCall) Do(opts ...googleapi.Call return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsPersistentResourcesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListPersistentResourcesResponse) error) error { +type ProjectsLocationsPipelineJobsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a PipelineJob. +// +// - name: The name of the PipelineJob resource to be deleted. Format: +// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. +func (r *ProjectsLocationsPipelineJobsService) Delete(name string) *ProjectsLocationsPipelineJobsDeleteCall { + c := &ProjectsLocationsPipelineJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsPipelineJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsPipelineJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsDeleteCall { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsPipelineJobsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsPipelineJobsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.pipelineJobs.delete" call. +// 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 *ProjectsLocationsPipelineJobsDeleteCall) 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() } - c.PageToken(x.NextPageToken) + 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 } -type ProjectsLocationsPersistentResourcesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Updates a PersistentResource. +// Get: Gets a PipelineJob. // -// - name: Immutable. Resource name of a PersistentResource. -func (r *ProjectsLocationsPersistentResourcesService) Patch(name string, googlecloudaiplatformv1persistentresource *GoogleCloudAiplatformV1PersistentResource) *ProjectsLocationsPersistentResourcesPatchCall { - c := &ProjectsLocationsPersistentResourcesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the PipelineJob resource. Format: +// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. +func (r *ProjectsLocationsPipelineJobsService) Get(name string) *ProjectsLocationsPipelineJobsGetCall { + c := &ProjectsLocationsPipelineJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1persistentresource = googlecloudaiplatformv1persistentresource - return c -} - -// UpdateMask sets the optional parameter "updateMask": Required. Specify the -// fields to be overwritten in the PersistentResource by the update method. -func (c *ProjectsLocationsPersistentResourcesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsPersistentResourcesPatchCall { - c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesPatchCall { +func (c *ProjectsLocationsPipelineJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsPipelineJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesPatchCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesPatchCall { +func (c *ProjectsLocationsPipelineJobsGetCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesPatchCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1persistentresource) - if err != nil { - return nil, err +func (c *ProjectsLocationsPipelineJobsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -86871,13 +89218,13 @@ func (c *ProjectsLocationsPersistentResourcesPatchCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.patch" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.get" call. // 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 +// *GoogleCloudAiplatformV1PipelineJob.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPersistentResourcesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PipelineJob, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -86896,7 +89243,7 @@ func (c *ProjectsLocationsPersistentResourcesPatchCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1PipelineJob{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -86909,79 +89256,147 @@ func (c *ProjectsLocationsPersistentResourcesPatchCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsPersistentResourcesRebootCall struct { - s *Service - name string - googlecloudaiplatformv1rebootpersistentresourcerequest *GoogleCloudAiplatformV1RebootPersistentResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Reboot: Reboots a PersistentResource. +// List: Lists PipelineJobs in a Location. // -// - name: The name of the PersistentResource resource. Format: -// `projects/{project_id_or_number}/locations/{location_id}/persistentResource -// s/{persistent_resource_id}`. -func (r *ProjectsLocationsPersistentResourcesService) Reboot(name string, googlecloudaiplatformv1rebootpersistentresourcerequest *GoogleCloudAiplatformV1RebootPersistentResourceRequest) *ProjectsLocationsPersistentResourcesRebootCall { - c := &ProjectsLocationsPersistentResourcesRebootCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1rebootpersistentresourcerequest = googlecloudaiplatformv1rebootpersistentresourcerequest +// - parent: The resource name of the Location to list the PipelineJobs from. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsPipelineJobsService) List(parent string) *ProjectsLocationsPipelineJobsListCall { + c := &ProjectsLocationsPipelineJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Lists the PipelineJobs that +// match the filter expression. The following fields are supported: * +// `pipeline_name`: Supports `=` and `!=` comparisons. * `display_name`: +// Supports `=`, `!=` comparisons, and `:` wildcard. * `pipeline_job_user_id`: +// Supports `=`, `!=` comparisons, and `:` wildcard. for example, can check if +// pipeline's display_name contains *step* by doing display_name:\"*step*\" * +// `state`: Supports `=` and `!=` comparisons. * `create_time`: Supports `=`, +// `!=`, `<`, `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 +// format. * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` +// comparisons. Values must be in RFC 3339 format. * `end_time`: Supports `=`, +// `!=`, `<`, `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 +// format. * `labels`: Supports key-value equality and key presence. * +// `template_uri`: Supports `=`, `!=` comparisons, and `:` wildcard. * +// `template_metadata.version`: Supports `=`, `!=` comparisons, and `:` +// wildcard. Filter expressions can be combined together using logical +// operators (`AND` & `OR`). For example: `pipeline_name="test" AND +// create_time>"2020-05-18T13:30:00Z". The syntax to define filter expression +// is based on https://google.aip.dev/160. Examples: * +// `create_time>"2021-05-18T00:00:00Z" OR update_time>"2020-05-18T00:00:00Z" +// PipelineJobs created or updated after 2020-05-18 00:00:00 UTC. * `labels.env +// = "prod" PipelineJobs with label "env" set to "prod". +func (c *ProjectsLocationsPipelineJobsListCall) Filter(filter string) *ProjectsLocationsPipelineJobsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": A comma-separated list of +// fields to order by. The default sort order is in ascending order. Use "desc" +// after a field name for descending. You can have multiple order_by fields +// provided e.g. "create_time desc, end_time", "end_time, start_time, +// update_time" For example, using "create_time desc, end_time" will order +// results by create time in descending order, and if there are multiple jobs +// having the same create time, order them by the end time in ascending order. +// if order_by is not specified, it will order by default order is create time +// in descending order. Supported fields: * `create_time` * `update_time` * +// `end_time` * `start_time` +func (c *ProjectsLocationsPipelineJobsListCall) OrderBy(orderBy string) *ProjectsLocationsPipelineJobsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsPipelineJobsListCall) PageSize(pageSize int64) *ProjectsLocationsPipelineJobsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListPipelineJobsResponse.next_page_token of +// the previous PipelineService.ListPipelineJobs call. +func (c *ProjectsLocationsPipelineJobsListCall) PageToken(pageToken string) *ProjectsLocationsPipelineJobsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReadMask sets the optional parameter "readMask": Mask specifying which +// fields to read. +func (c *ProjectsLocationsPipelineJobsListCall) ReadMask(readMask string) *ProjectsLocationsPipelineJobsListCall { + c.urlParams_.Set("readMask", readMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesRebootCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesRebootCall { +func (c *ProjectsLocationsPipelineJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsPipelineJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesRebootCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesRebootCall { +func (c *ProjectsLocationsPipelineJobsListCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesRebootCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesRebootCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rebootpersistentresourcerequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsPipelineJobsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:reboot") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs") 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, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.reboot" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.list" call. // 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 +// *GoogleCloudAiplatformV1ListPipelineJobsResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPersistentResourcesRebootCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListPipelineJobsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87000,7 +89415,7 @@ func (c *ProjectsLocationsPersistentResourcesRebootCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1ListPipelineJobsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -87013,7 +89428,28 @@ func (c *ProjectsLocationsPersistentResourcesRebootCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsPersistentResourcesOperationsCancelCall struct { +// 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 *ProjectsLocationsPipelineJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListPipelineJobsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsPipelineJobsOperationsCancelCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -87032,8 +89468,8 @@ type ProjectsLocationsPersistentResourcesOperationsCancelCall struct { // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsPersistentResourcesOperationsService) Cancel(name string) *ProjectsLocationsPersistentResourcesOperationsCancelCall { - c := &ProjectsLocationsPersistentResourcesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPipelineJobsOperationsService) Cancel(name string) *ProjectsLocationsPipelineJobsOperationsCancelCall { + c := &ProjectsLocationsPipelineJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -87041,27 +89477,27 @@ func (r *ProjectsLocationsPersistentResourcesOperationsService) Cancel(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsCancelCall { +func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsCancelCall { +func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -87079,13 +89515,13 @@ func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.cancel" call. // 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 *ProjectsLocationsPersistentResourcesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87117,7 +89553,7 @@ func (c *ProjectsLocationsPersistentResourcesOperationsCancelCall) Do(opts ...go return ret, nil } -type ProjectsLocationsPersistentResourcesOperationsDeleteCall struct { +type ProjectsLocationsPipelineJobsOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -87131,8 +89567,8 @@ type ProjectsLocationsPersistentResourcesOperationsDeleteCall struct { // `google.rpc.Code.UNIMPLEMENTED`. // // - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsPersistentResourcesOperationsService) Delete(name string) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { - c := &ProjectsLocationsPersistentResourcesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPipelineJobsOperationsService) Delete(name string) *ProjectsLocationsPipelineJobsOperationsDeleteCall { + c := &ProjectsLocationsPipelineJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -87140,27 +89576,27 @@ func (r *ProjectsLocationsPersistentResourcesOperationsService) Delete(name stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { +func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsDeleteCall { +func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -87178,13 +89614,13 @@ func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.operations.delete" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.delete" call. // 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 *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87216,7 +89652,7 @@ func (c *ProjectsLocationsPersistentResourcesOperationsDeleteCall) Do(opts ...go return ret, nil } -type ProjectsLocationsPersistentResourcesOperationsGetCall struct { +type ProjectsLocationsPipelineJobsOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -87230,8 +89666,8 @@ type ProjectsLocationsPersistentResourcesOperationsGetCall struct { // service. // // - name: The name of the operation resource. -func (r *ProjectsLocationsPersistentResourcesOperationsService) Get(name string) *ProjectsLocationsPersistentResourcesOperationsGetCall { - c := &ProjectsLocationsPersistentResourcesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPipelineJobsOperationsService) Get(name string) *ProjectsLocationsPipelineJobsOperationsGetCall { + c := &ProjectsLocationsPipelineJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -87239,7 +89675,7 @@ func (r *ProjectsLocationsPersistentResourcesOperationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsGetCall { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -87247,27 +89683,27 @@ func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesOperationsGetCall { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsGetCall { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -87288,13 +89724,13 @@ func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.operations.get" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.get" call. // 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 *ProjectsLocationsPersistentResourcesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87326,7 +89762,7 @@ func (c *ProjectsLocationsPersistentResourcesOperationsGetCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsPersistentResourcesOperationsListCall struct { +type ProjectsLocationsPipelineJobsOperationsListCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -87339,28 +89775,28 @@ type ProjectsLocationsPersistentResourcesOperationsListCall struct { // the server doesn't support this method, it returns `UNIMPLEMENTED`. // // - name: The name of the operation's parent resource. -func (r *ProjectsLocationsPersistentResourcesOperationsService) List(name string) *ProjectsLocationsPersistentResourcesOperationsListCall { - c := &ProjectsLocationsPersistentResourcesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsPipelineJobsOperationsService) List(name string) *ProjectsLocationsPipelineJobsOperationsListCall { + c := &ProjectsLocationsPipelineJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } // Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Filter(filter string) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Filter(filter string) *ProjectsLocationsPipelineJobsOperationsListCall { c.urlParams_.Set("filter", filter) return c } // PageSize sets the optional parameter "pageSize": The standard list page // size. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsPipelineJobsOperationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page // token. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsPipelineJobsOperationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -87368,7 +89804,7 @@ func (c *ProjectsLocationsPersistentResourcesOperationsListCall) PageToken(pageT // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -87376,27 +89812,27 @@ func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Fields(s ...goo // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsOperationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsListCall { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPersistentResourcesOperationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -87417,13 +89853,13 @@ func (c *ProjectsLocationsPersistentResourcesOperationsListCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.persistentResources.operations.list" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.list" call. // 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 *ProjectsLocationsPersistentResourcesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87458,7 +89894,7 @@ func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Do(opts ...goog // 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 *ProjectsLocationsPersistentResourcesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { +func (c *ProjectsLocationsPipelineJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -87476,282 +89912,69 @@ func (c *ProjectsLocationsPersistentResourcesOperationsListCall) Pages(ctx conte } } -type ProjectsLocationsPersistentResourcesOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. -// -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsPersistentResourcesOperationsService) Wait(name string) *ProjectsLocationsPersistentResourcesOperationsWaitCall { - c := &ProjectsLocationsPersistentResourcesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsPersistentResourcesOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsPersistentResourcesOperationsWaitCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsPersistentResourcesOperationsWaitCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsPersistentResourcesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.persistentResources.operations.wait" call. -// 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 *ProjectsLocationsPersistentResourcesOperationsWaitCall) 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 -} - -type ProjectsLocationsPipelineJobsBatchCancelCall struct { - s *Service - parent string - googlecloudaiplatformv1batchcancelpipelinejobsrequest *GoogleCloudAiplatformV1BatchCancelPipelineJobsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// BatchCancel: Batch cancel PipelineJobs. Firstly the server will check if all -// the jobs are in non-terminal states, and skip the jobs that are already -// terminated. If the operation failed, none of the pipeline jobs are -// cancelled. The server will poll the states of all the pipeline jobs -// periodically to check the cancellation status. This operation will return an -// LRO. -// -// - parent: The name of the PipelineJobs' parent resource. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPipelineJobsService) BatchCancel(parent string, googlecloudaiplatformv1batchcancelpipelinejobsrequest *GoogleCloudAiplatformV1BatchCancelPipelineJobsRequest) *ProjectsLocationsPipelineJobsBatchCancelCall { - c := &ProjectsLocationsPipelineJobsBatchCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchcancelpipelinejobsrequest = googlecloudaiplatformv1batchcancelpipelinejobsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsBatchCancelCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsBatchCancelCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsPipelineJobsBatchCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchcancelpipelinejobsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs:batchCancel") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.pipelineJobs.batchCancel" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsPipelineJobsBatchCancelCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleLongrunningOperation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsPipelineJobsBatchDeleteCall struct { - s *Service - parent string - googlecloudaiplatformv1batchdeletepipelinejobsrequest *GoogleCloudAiplatformV1BatchDeletePipelineJobsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPipelineJobsOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BatchDelete: Batch deletes PipelineJobs The Operation is atomic. If it -// fails, none of the PipelineJobs are deleted. If it succeeds, all of the -// PipelineJobs are deleted. +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - parent: The name of the PipelineJobs' parent resource. Format: -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPipelineJobsService) BatchDelete(parent string, googlecloudaiplatformv1batchdeletepipelinejobsrequest *GoogleCloudAiplatformV1BatchDeletePipelineJobsRequest) *ProjectsLocationsPipelineJobsBatchDeleteCall { - c := &ProjectsLocationsPipelineJobsBatchDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1batchdeletepipelinejobsrequest = googlecloudaiplatformv1batchdeletepipelinejobsrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsPipelineJobsOperationsService) Wait(name string) *ProjectsLocationsPipelineJobsOperationsWaitCall { + c := &ProjectsLocationsPipelineJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsPipelineJobsOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsBatchDeleteCall { +func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsBatchDeleteCall { +func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1batchdeletepipelinejobsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs:batchDelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -87759,18 +89982,18 @@ func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) doRequest(alt string) (*h } 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 "aiplatform.projects.locations.pipelineJobs.batchDelete" call. +// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.wait" call. // 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 *ProjectsLocationsPipelineJobsBatchDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87802,66 +90025,59 @@ func (c *ProjectsLocationsPipelineJobsBatchDeleteCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsPipelineJobsCancelCall struct { - s *Service - name string - googlecloudaiplatformv1cancelpipelinejobrequest *GoogleCloudAiplatformV1CancelPipelineJobRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsComputeTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Cancels a PipelineJob. Starts asynchronous cancellation on the -// PipelineJob. The server makes a best effort to cancel the pipeline, but -// success is not guaranteed. Clients can use PipelineService.GetPipelineJob or -// other methods to check whether the cancellation succeeded or whether the -// pipeline completed despite cancellation. On successful cancellation, the -// PipelineJob is not deleted; instead it becomes a pipeline with a -// PipelineJob.error value with a google.rpc.Status.code of 1, corresponding to -// `Code.CANCELLED`, and PipelineJob.state is set to `CANCELLED`. +// ComputeTokens: Return a list of tokens based on the input text. // -// - name: The name of the PipelineJob to cancel. Format: -// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. -func (r *ProjectsLocationsPipelineJobsService) Cancel(name string, googlecloudaiplatformv1cancelpipelinejobrequest *GoogleCloudAiplatformV1CancelPipelineJobRequest) *ProjectsLocationsPipelineJobsCancelCall { - c := &ProjectsLocationsPipelineJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1cancelpipelinejobrequest = googlecloudaiplatformv1cancelpipelinejobrequest +// - endpoint: The name of the Endpoint requested to get lists of tokens and +// token ids. +func (r *ProjectsLocationsPublishersModelsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *ProjectsLocationsPublishersModelsComputeTokensCall { + c := &ProjectsLocationsPublishersModelsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsCancelCall { +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsComputeTokensCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsCancelCall { +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsComputeTokensCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsCancelCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsCancelCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1cancelpipelinejobrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -87869,18 +90085,18 @@ func (c *ProjectsLocationsPipelineJobsCancelCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.cancel" call. +// Do executes the "aiplatform.projects.locations.publishers.models.computeTokens" call. // 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 *ProjectsLocationsPipelineJobsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -87899,7 +90115,7 @@ func (c *ProjectsLocationsPipelineJobsCancelCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -87912,69 +90128,59 @@ func (c *ProjectsLocationsPipelineJobsCancelCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsPipelineJobsCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1pipelinejob *GoogleCloudAiplatformV1PipelineJob - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsCountTokensCall struct { + s *Service + endpoint string + googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a PipelineJob. A PipelineJob will run immediately when -// created. +// CountTokens: Perform a token counting. // -// - parent: The resource name of the Location to create the PipelineJob in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPipelineJobsService) Create(parent string, googlecloudaiplatformv1pipelinejob *GoogleCloudAiplatformV1PipelineJob) *ProjectsLocationsPipelineJobsCreateCall { - c := &ProjectsLocationsPipelineJobsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1pipelinejob = googlecloudaiplatformv1pipelinejob - return c -} - -// PipelineJobId sets the optional parameter "pipelineJobId": The ID to use for -// the PipelineJob, which will become the final component of the PipelineJob -// name. If not provided, an ID will be automatically generated. This value -// should be less than 128 characters, and valid characters are `/a-z-/`. -func (c *ProjectsLocationsPipelineJobsCreateCall) PipelineJobId(pipelineJobId string) *ProjectsLocationsPipelineJobsCreateCall { - c.urlParams_.Set("pipelineJobId", pipelineJobId) +// - endpoint: The name of the Endpoint requested to perform token counting. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *ProjectsLocationsPublishersModelsCountTokensCall { + c := &ProjectsLocationsPublishersModelsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsCreateCall { +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsCountTokensCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsCreateCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsCreateCall { +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsCountTokensCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsCreateCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsPublishersModelsCountTokensCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1pipelinejob) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -87982,18 +90188,18 @@ func (c *ProjectsLocationsPipelineJobsCreateCall) doRequest(alt string) (*http.R } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "parent": c.parent, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.create" call. +// Do executes the "aiplatform.projects.locations.publishers.models.countTokens" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1PipelineJob.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPipelineJobsCreateCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PipelineJob, error) { +func (c *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88012,7 +90218,7 @@ func (c *ProjectsLocationsPipelineJobsCreateCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1PipelineJob{ + ret := &GoogleCloudAiplatformV1CountTokensResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88025,72 +90231,80 @@ func (c *ProjectsLocationsPipelineJobsCreateCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsPipelineJobsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsFetchPredictOperationCall struct { + s *Service + endpoint string + googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a PipelineJob. +// FetchPredictOperation: Fetch an asynchronous online prediction operation. // -// - name: The name of the PipelineJob resource to be deleted. Format: -// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. -func (r *ProjectsLocationsPipelineJobsService) Delete(name string) *ProjectsLocationsPipelineJobsDeleteCall { - c := &ProjectsLocationsPipelineJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or +// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod +// el}`. +func (r *ProjectsLocationsPublishersModelsService) FetchPredictOperation(endpoint string, googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { + c := &ProjectsLocationsPublishersModelsFetchPredictOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1fetchpredictoperationrequest = googlecloudaiplatformv1fetchpredictoperationrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsDeleteCall { +func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsDeleteCall { +func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchpredictoperationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:fetchPredictOperation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.delete" call. +// Do executes the "aiplatform.projects.locations.publishers.models.fetchPredictOperation" call. // 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 *ProjectsLocationsPipelineJobsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88122,84 +90336,81 @@ func (c *ProjectsLocationsPipelineJobsDeleteCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsPipelineJobsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a PipelineJob. +// GenerateContent: Generate content with multimodal inputs. // -// - name: The name of the PipelineJob resource. Format: -// `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. -func (r *ProjectsLocationsPipelineJobsService) Get(name string) *ProjectsLocationsPipelineJobsGetCall { - c := &ProjectsLocationsPipelineJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsGenerateContentCall { + c := &ProjectsLocationsPublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsGetCall { +func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsGenerateContentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsPipelineJobsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsGetCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsGetCall { +func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsGenerateContentCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsGetCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPublishersModelsGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") 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, + "model": c.model, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.get" call. +// Do executes the "aiplatform.projects.locations.publishers.models.generateContent" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1PipelineJob.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPipelineJobsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PipelineJob, error) { +func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88218,7 +90429,7 @@ func (c *ProjectsLocationsPipelineJobsGetCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1PipelineJob{ + ret := &GoogleCloudAiplatformV1GenerateContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88231,147 +90442,78 @@ func (c *ProjectsLocationsPipelineJobsGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsPipelineJobsListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists PipelineJobs in a Location. +// Predict: Perform an online prediction. // -// - parent: The resource name of the Location to list the PipelineJobs from. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsPipelineJobsService) List(parent string) *ProjectsLocationsPipelineJobsListCall { - c := &ProjectsLocationsPipelineJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Lists the PipelineJobs that -// match the filter expression. The following fields are supported: * -// `pipeline_name`: Supports `=` and `!=` comparisons. * `display_name`: -// Supports `=`, `!=` comparisons, and `:` wildcard. * `pipeline_job_user_id`: -// Supports `=`, `!=` comparisons, and `:` wildcard. for example, can check if -// pipeline's display_name contains *step* by doing display_name:\"*step*\" * -// `state`: Supports `=` and `!=` comparisons. * `create_time`: Supports `=`, -// `!=`, `<`, `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 -// format. * `update_time`: Supports `=`, `!=`, `<`, `>`, `<=`, and `>=` -// comparisons. Values must be in RFC 3339 format. * `end_time`: Supports `=`, -// `!=`, `<`, `>`, `<=`, and `>=` comparisons. Values must be in RFC 3339 -// format. * `labels`: Supports key-value equality and key presence. * -// `template_uri`: Supports `=`, `!=` comparisons, and `:` wildcard. * -// `template_metadata.version`: Supports `=`, `!=` comparisons, and `:` -// wildcard. Filter expressions can be combined together using logical -// operators (`AND` & `OR`). For example: `pipeline_name="test" AND -// create_time>"2020-05-18T13:30:00Z". The syntax to define filter expression -// is based on https://google.aip.dev/160. Examples: * -// `create_time>"2021-05-18T00:00:00Z" OR update_time>"2020-05-18T00:00:00Z" -// PipelineJobs created or updated after 2020-05-18 00:00:00 UTC. * `labels.env -// = "prod" PipelineJobs with label "env" set to "prod". -func (c *ProjectsLocationsPipelineJobsListCall) Filter(filter string) *ProjectsLocationsPipelineJobsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": A comma-separated list of -// fields to order by. The default sort order is in ascending order. Use "desc" -// after a field name for descending. You can have multiple order_by fields -// provided e.g. "create_time desc, end_time", "end_time, start_time, -// update_time" For example, using "create_time desc, end_time" will order -// results by create time in descending order, and if there are multiple jobs -// having the same create time, order them by the end time in ascending order. -// if order_by is not specified, it will order by default order is create time -// in descending order. Supported fields: * `create_time` * `update_time` * -// `end_time` * `start_time` -func (c *ProjectsLocationsPipelineJobsListCall) OrderBy(orderBy string) *ProjectsLocationsPipelineJobsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsPipelineJobsListCall) PageSize(pageSize int64) *ProjectsLocationsPipelineJobsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListPipelineJobsResponse.next_page_token of -// the previous PipelineService.ListPipelineJobs call. -func (c *ProjectsLocationsPipelineJobsListCall) PageToken(pageToken string) *ProjectsLocationsPipelineJobsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReadMask sets the optional parameter "readMask": Mask specifying which -// fields to read. -func (c *ProjectsLocationsPipelineJobsListCall) ReadMask(readMask string) *ProjectsLocationsPipelineJobsListCall { - c.urlParams_.Set("readMask", readMask) +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) Predict(endpoint string, googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest) *ProjectsLocationsPublishersModelsPredictCall { + c := &ProjectsLocationsPublishersModelsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1predictrequest = googlecloudaiplatformv1predictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsListCall { +func (c *ProjectsLocationsPublishersModelsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsPipelineJobsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsListCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsListCall { +func (c *ProjectsLocationsPublishersModelsPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsListCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPublishersModelsPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/pipelineJobs") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predict") 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.list" call. +// Do executes the "aiplatform.projects.locations.publishers.models.predict" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListPipelineJobsResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1PredictResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPipelineJobsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListPipelineJobsResponse, error) { +func (c *ProjectsLocationsPublishersModelsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88390,7 +90532,7 @@ func (c *ProjectsLocationsPipelineJobsListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListPipelineJobsResponse{ + ret := &GoogleCloudAiplatformV1PredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88403,81 +90545,61 @@ func (c *ProjectsLocationsPipelineJobsListCall) Do(opts ...googleapi.CallOption) return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsPipelineJobsListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListPipelineJobsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsPipelineJobsOperationsCancelCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsPredictLongRunningCall struct { + s *Service + endpoint string + googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Cancel: Starts asynchronous cancellation on a long-running operation. The -// server makes a best effort to cancel the operation, but success is not -// guaranteed. If the server doesn't support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or -// other methods to check whether the cancellation succeeded or whether the -// operation completed despite cancellation. On successful cancellation, the -// operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of `1`, corresponding to -// `Code.CANCELLED`. +// PredictLongRunning: // -// - name: The name of the operation resource to be cancelled. -func (r *ProjectsLocationsPipelineJobsOperationsService) Cancel(name string) *ProjectsLocationsPipelineJobsOperationsCancelCall { - c := &ProjectsLocationsPipelineJobsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or +// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod +// el}`. +func (r *ProjectsLocationsPublishersModelsService) PredictLongRunning(endpoint string, googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest) *ProjectsLocationsPublishersModelsPredictLongRunningCall { + c := &ProjectsLocationsPublishersModelsPredictLongRunningCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1predictlongrunningrequest = googlecloudaiplatformv1predictlongrunningrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsCancelCall { +func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsPredictLongRunningCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsCancelCall { +func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsPredictLongRunningCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictlongrunningrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predictLongRunning") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -88485,18 +90607,18 @@ func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) doRequest(alt string } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.cancel" call. +// Do executes the "aiplatform.projects.locations.publishers.models.predictLongRunning" call. // 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 *ProjectsLocationsPipelineJobsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +// *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 *ProjectsLocationsPublishersModelsPredictLongRunningCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88515,7 +90637,7 @@ func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Do(opts ...googleapi 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, @@ -88528,74 +90650,82 @@ func (c *ProjectsLocationsPipelineJobsOperationsCancelCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsPipelineJobsOperationsDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest + 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`. +// RawPredict: Perform an online prediction with an arbitrary HTTP payload. The +// response includes the following HTTP headers: * `X-Vertex-AI-Endpoint-Id`: +// ID of the Endpoint that served this prediction. * +// `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's DeployedModel that +// served this prediction. // -// - name: The name of the operation resource to be deleted. -func (r *ProjectsLocationsPipelineJobsOperationsService) Delete(name string) *ProjectsLocationsPipelineJobsOperationsDeleteCall { - c := &ProjectsLocationsPipelineJobsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) RawPredict(endpoint string, googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest) *ProjectsLocationsPublishersModelsRawPredictCall { + c := &ProjectsLocationsPublishersModelsRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1rawpredictrequest = googlecloudaiplatformv1rawpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsDeleteCall { +func (c *ProjectsLocationsPublishersModelsRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsRawPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsDeleteCall { +func (c *ProjectsLocationsPublishersModelsRawPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsRawPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsRawPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPublishersModelsRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rawpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:rawPredict") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.delete" call. +// Do executes the "aiplatform.projects.locations.publishers.models.rawPredict" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleProtobufEmpty.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsPipelineJobsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { +func (c *ProjectsLocationsPublishersModelsRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88614,7 +90744,7 @@ func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Do(opts ...googleapi if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleProtobufEmpty{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88627,85 +90757,79 @@ func (c *ProjectsLocationsPipelineJobsOperationsDeleteCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsPipelineJobsOperationsGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsServerStreamingPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest + 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. +// ServerStreamingPredict: Perform a server-side streaming online prediction +// request for Vertex LLM streaming. // -// - name: The name of the operation resource. -func (r *ProjectsLocationsPipelineJobsOperationsService) Get(name string) *ProjectsLocationsPipelineJobsOperationsGetCall { - c := &ProjectsLocationsPipelineJobsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) ServerStreamingPredict(endpoint string, googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { + c := &ProjectsLocationsPublishersModelsServerStreamingPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1streamingpredictrequest = googlecloudaiplatformv1streamingpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsGetCall { +func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsPipelineJobsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsGetCall { +func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:serverStreamingPredict") 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, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.get" call. +// Do executes the "aiplatform.projects.locations.publishers.models.serverStreamingPredict" call. // 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 +// *GoogleCloudAiplatformV1StreamingPredictResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1StreamingPredictResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88724,7 +90848,7 @@ func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1StreamingPredictResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88737,104 +90861,82 @@ func (c *ProjectsLocationsPipelineJobsOperationsGetCall) Do(opts ...googleapi.Ca return ret, nil } -type ProjectsLocationsPipelineJobsOperationsListCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct { + s *Service + model string + googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest + 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`. +// StreamGenerateContent: Generate content with multimodal inputs with +// streaming support. // -// - name: The name of the operation's parent resource. -func (r *ProjectsLocationsPipelineJobsOperationsService) List(name string) *ProjectsLocationsPipelineJobsOperationsListCall { - c := &ProjectsLocationsPipelineJobsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) Filter(filter string) *ProjectsLocationsPipelineJobsOperationsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsPipelineJobsOperationsListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) PageToken(pageToken string) *ProjectsLocationsPipelineJobsOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) +// - model: The fully qualified name of the publisher model or tuned model +// endpoint to use. Publisher model format: +// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned +// model endpoint format: +// `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { + c := &ProjectsLocationsPublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.model = model + c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsListCall { +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsPipelineJobsOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsListCall { +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) + if err != nil { + return nil, err + } 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/{+model}:streamGenerateContent") 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, + "model": c.model, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.list" call. +// Do executes the "aiplatform.projects.locations.publishers.models.streamGenerateContent" call. // 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 +// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { +func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88853,7 +90955,7 @@ func (c *ProjectsLocationsPipelineJobsOperationsListCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningListOperationsResponse{ + ret := &GoogleCloudAiplatformV1GenerateContentResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -88866,90 +90968,60 @@ func (c *ProjectsLocationsPipelineJobsOperationsListCall) Do(opts ...googleapi.C return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsPipelineJobsOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsPipelineJobsOperationsWaitCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsPublishersModelsStreamRawPredictCall struct { + s *Service + endpoint string + googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Wait: Waits until the specified long-running operation is done or reaches at -// most a specified timeout, returning the latest state. If the operation is -// already done, the latest state is immediately returned. If the timeout -// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout -// is used. If the server does not support this method, it returns -// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort -// basis. It may return the latest state before the specified timeout -// (including immediately), meaning even an immediate response is no guarantee -// that the operation is done. +// StreamRawPredict: Perform a streaming online prediction with an arbitrary +// HTTP payload. // -// - name: The name of the operation resource to wait on. -func (r *ProjectsLocationsPipelineJobsOperationsService) Wait(name string) *ProjectsLocationsPipelineJobsOperationsWaitCall { - c := &ProjectsLocationsPipelineJobsOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Timeout sets the optional parameter "timeout": The maximum duration to wait -// before timing out. If left blank, the wait will be at most the time -// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is -// also specified, the shorter one will be used. -func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsPipelineJobsOperationsWaitCall { - c.urlParams_.Set("timeout", timeout) +// - endpoint: The name of the Endpoint requested to serve the prediction. +// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. +func (r *ProjectsLocationsPublishersModelsService) StreamRawPredict(endpoint string, googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest) *ProjectsLocationsPublishersModelsStreamRawPredictCall { + c := &ProjectsLocationsPublishersModelsStreamRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.endpoint = endpoint + c.googlecloudaiplatformv1streamrawpredictrequest = googlecloudaiplatformv1streamrawpredictrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsPipelineJobsOperationsWaitCall { +func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamRawPredictCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsPipelineJobsOperationsWaitCall { +func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamRawPredictCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Header() http.Header { +func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamrawpredictrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:streamRawPredict") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -88957,18 +91029,18 @@ func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "name": c.name, + "endpoint": c.endpoint, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.pipelineJobs.operations.wait" call. +// Do executes the "aiplatform.projects.locations.publishers.models.streamRawPredict" call. // 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 *ProjectsLocationsPipelineJobsOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsPublishersModelsStreamRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -88987,7 +91059,7 @@ func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Do(opts ...googleapi.C 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, @@ -89000,59 +91072,59 @@ func (c *ProjectsLocationsPipelineJobsOperationsWaitCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsPublishersModelsComputeTokensCall struct { - s *Service - endpoint string - googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaCreateCall struct { + s *Service + parent string + googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ComputeTokens: Return a list of tokens based on the input text. +// Create: Creates a RagCorpus. // -// - endpoint: The name of the Endpoint requested to get lists of tokens and -// token ids. -func (r *ProjectsLocationsPublishersModelsService) ComputeTokens(endpoint string, googlecloudaiplatformv1computetokensrequest *GoogleCloudAiplatformV1ComputeTokensRequest) *ProjectsLocationsPublishersModelsComputeTokensCall { - c := &ProjectsLocationsPublishersModelsComputeTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1computetokensrequest = googlecloudaiplatformv1computetokensrequest +// - parent: The resource name of the Location to create the RagCorpus in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsRagCorporaService) Create(parent string, googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus) *ProjectsLocationsRagCorporaCreateCall { + c := &ProjectsLocationsRagCorporaCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1ragcorpus = googlecloudaiplatformv1ragcorpus return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsComputeTokensCall { +func (c *ProjectsLocationsRagCorporaCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsComputeTokensCall { +func (c *ProjectsLocationsRagCorporaCreateCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsComputeTokensCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1computetokensrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1ragcorpus) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:computeTokens") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragCorpora") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -89060,18 +91132,18 @@ func (c *ProjectsLocationsPublishersModelsComputeTokensCall) doRequest(alt strin } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.computeTokens" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.create" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ComputeTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsPublishersModelsComputeTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ComputeTokensResponse, error) { +func (c *ProjectsLocationsRagCorporaCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89090,7 +91162,7 @@ func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ComputeTokensResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89103,78 +91175,80 @@ func (c *ProjectsLocationsPublishersModelsComputeTokensCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsPublishersModelsCountTokensCall struct { - s *Service - endpoint string - googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CountTokens: Perform a token counting. +// Delete: Deletes a RagCorpus. // -// - endpoint: The name of the Endpoint requested to perform token counting. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) CountTokens(endpoint string, googlecloudaiplatformv1counttokensrequest *GoogleCloudAiplatformV1CountTokensRequest) *ProjectsLocationsPublishersModelsCountTokensCall { - c := &ProjectsLocationsPublishersModelsCountTokensCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1counttokensrequest = googlecloudaiplatformv1counttokensrequest +// - name: The name of the RagCorpus resource to be deleted. Format: +// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. +func (r *ProjectsLocationsRagCorporaService) Delete(name string) *ProjectsLocationsRagCorporaDeleteCall { + c := &ProjectsLocationsRagCorporaDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Force sets the optional parameter "force": If set to true, any RagFiles in +// this RagCorpus will also be deleted. Otherwise, the request will only work +// if the RagCorpus has no RagFiles. +func (c *ProjectsLocationsRagCorporaDeleteCall) Force(force bool) *ProjectsLocationsRagCorporaDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsCountTokensCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsCountTokensCall { +func (c *ProjectsLocationsRagCorporaDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsCountTokensCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsCountTokensCall { +func (c *ProjectsLocationsRagCorporaDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsCountTokensCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsCountTokensCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1counttokensrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:countTokens") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.countTokens" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1CountTokensResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1CountTokensResponse, error) { +func (c *ProjectsLocationsRagCorporaDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89193,7 +91267,7 @@ func (c *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1CountTokensResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89206,80 +91280,84 @@ func (c *ProjectsLocationsPublishersModelsCountTokensCall) Do(opts ...googleapi. return ret, nil } -type ProjectsLocationsPublishersModelsFetchPredictOperationCall struct { - s *Service - endpoint string - googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// FetchPredictOperation: Fetch an asynchronous online prediction operation. +// Get: Gets a RagCorpus. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or -// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod -// el}`. -func (r *ProjectsLocationsPublishersModelsService) FetchPredictOperation(endpoint string, googlecloudaiplatformv1fetchpredictoperationrequest *GoogleCloudAiplatformV1FetchPredictOperationRequest) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { - c := &ProjectsLocationsPublishersModelsFetchPredictOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1fetchpredictoperationrequest = googlecloudaiplatformv1fetchpredictoperationrequest +// - name: The name of the RagCorpus resource. Format: +// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. +func (r *ProjectsLocationsRagCorporaService) Get(name string) *ProjectsLocationsRagCorporaGetCall { + c := &ProjectsLocationsRagCorporaGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { +func (c *ProjectsLocationsRagCorporaGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsRagCorporaGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsFetchPredictOperationCall { +func (c *ProjectsLocationsRagCorporaGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1fetchpredictoperationrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRagCorporaGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:fetchPredictOperation") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.fetchPredictOperation" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.get" call. // 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 +// *GoogleCloudAiplatformV1RagCorpus.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsRagCorporaGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RagCorpus, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89298,7 +91376,7 @@ func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1RagCorpus{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89311,81 +91389,99 @@ func (c *ProjectsLocationsPublishersModelsFetchPredictOperationCall) Do(opts ... return ret, nil } -type ProjectsLocationsPublishersModelsGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// GenerateContent: Generate content with multimodal inputs. +// List: Lists RagCorpora in a Location. // -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) GenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsGenerateContentCall { - c := &ProjectsLocationsPublishersModelsGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// - parent: The resource name of the Location from which to list the +// RagCorpora. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsRagCorporaService) List(parent string) *ProjectsLocationsRagCorporaListCall { + c := &ProjectsLocationsRagCorporaListCall{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 *ProjectsLocationsRagCorporaListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. Typically obtained via ListRagCorporaResponse.next_page_token of the +// previous VertexRagDataService.ListRagCorpora call. +func (c *ProjectsLocationsRagCorporaListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsGenerateContentCall { +func (c *ProjectsLocationsRagCorporaListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsRagCorporaListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsGenerateContentCall { +func (c *ProjectsLocationsRagCorporaListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRagCorporaListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:generateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragCorpora") 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{ - "model": c.model, + "parent": c.parent, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.generateContent" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if +// *GoogleCloudAiplatformV1ListRagCorporaResponse.ServerResponse.Header or (if // a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +func (c *ProjectsLocationsRagCorporaListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListRagCorporaResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89404,7 +91500,7 @@ func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleCloudAiplatformV1ListRagCorporaResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89417,78 +91513,98 @@ func (c *ProjectsLocationsPublishersModelsGenerateContentCall) Do(opts ...google return ret, nil } -type ProjectsLocationsPublishersModelsPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest - 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 *ProjectsLocationsRagCorporaListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListRagCorporaResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Predict: Perform an online prediction. +type ProjectsLocationsRagCorporaPatchCall struct { + s *Service + name string + googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a RagCorpus. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) Predict(endpoint string, googlecloudaiplatformv1predictrequest *GoogleCloudAiplatformV1PredictRequest) *ProjectsLocationsPublishersModelsPredictCall { - c := &ProjectsLocationsPublishersModelsPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1predictrequest = googlecloudaiplatformv1predictrequest +// - name: Output only. The resource name of the RagCorpus. +func (r *ProjectsLocationsRagCorporaService) Patch(name string, googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus) *ProjectsLocationsRagCorporaPatchCall { + c := &ProjectsLocationsRagCorporaPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1ragcorpus = googlecloudaiplatformv1ragcorpus return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsPredictCall { +func (c *ProjectsLocationsRagCorporaPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsPredictCall { +func (c *ProjectsLocationsRagCorporaPatchCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsPredictCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsPredictCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1ragcorpus) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predict") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.predict" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1PredictResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsPublishersModelsPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1PredictResponse, error) { +func (c *ProjectsLocationsRagCorporaPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89507,7 +91623,7 @@ func (c *ProjectsLocationsPublishersModelsPredictCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1PredictResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89520,61 +91636,60 @@ func (c *ProjectsLocationsPublishersModelsPredictCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsPublishersModelsPredictLongRunningCall struct { - s *Service - endpoint string - googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PredictLongRunning: +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` or -// `projects/{project}/locations/{location}/publishers/{publisher}/models/{mod -// el}`. -func (r *ProjectsLocationsPublishersModelsService) PredictLongRunning(endpoint string, googlecloudaiplatformv1predictlongrunningrequest *GoogleCloudAiplatformV1PredictLongRunningRequest) *ProjectsLocationsPublishersModelsPredictLongRunningCall { - c := &ProjectsLocationsPublishersModelsPredictLongRunningCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1predictlongrunningrequest = googlecloudaiplatformv1predictlongrunningrequest +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsRagCorporaOperationsService) Cancel(name string) *ProjectsLocationsRagCorporaOperationsCancelCall { + c := &ProjectsLocationsRagCorporaOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsPredictLongRunningCall { +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsPredictLongRunningCall { +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1predictlongrunningrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:predictLongRunning") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -89582,18 +91697,18 @@ func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) doRequest(alt } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.predictLongRunning" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.cancel" call. // 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 *ProjectsLocationsPublishersModelsPredictLongRunningCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsRagCorporaOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89612,7 +91727,7 @@ func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Do(opts ...goo 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, @@ -89625,82 +91740,74 @@ func (c *ProjectsLocationsPublishersModelsPredictLongRunningCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsPublishersModelsRawPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaOperationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RawPredict: Perform an online prediction with an arbitrary HTTP payload. The -// response includes the following HTTP headers: * `X-Vertex-AI-Endpoint-Id`: -// ID of the Endpoint that served this prediction. * -// `X-Vertex-AI-Deployed-Model-Id`: ID of the Endpoint's DeployedModel that -// served this prediction. +// 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`. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) RawPredict(endpoint string, googlecloudaiplatformv1rawpredictrequest *GoogleCloudAiplatformV1RawPredictRequest) *ProjectsLocationsPublishersModelsRawPredictCall { - c := &ProjectsLocationsPublishersModelsRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1rawpredictrequest = googlecloudaiplatformv1rawpredictrequest +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsRagCorporaOperationsService) Delete(name string) *ProjectsLocationsRagCorporaOperationsDeleteCall { + c := &ProjectsLocationsRagCorporaOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsRawPredictCall { +func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsRawPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsRawPredictCall { +func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsRawPredictCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsRawPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1rawpredictrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:rawPredict") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.rawPredict" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleApiHttpBody.ServerResponse.Header or (if a response was returned at +// *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 *ProjectsLocationsPublishersModelsRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +func (c *ProjectsLocationsRagCorporaOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89719,7 +91826,7 @@ func (c *ProjectsLocationsPublishersModelsRawPredictCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleProtobufEmpty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89732,79 +91839,85 @@ func (c *ProjectsLocationsPublishersModelsRawPredictCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsPublishersModelsServerStreamingPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaOperationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ServerStreamingPredict: Perform a server-side streaming online prediction -// request for Vertex LLM streaming. +// 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. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) ServerStreamingPredict(endpoint string, googlecloudaiplatformv1streamingpredictrequest *GoogleCloudAiplatformV1StreamingPredictRequest) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { - c := &ProjectsLocationsPublishersModelsServerStreamingPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1streamingpredictrequest = googlecloudaiplatformv1streamingpredictrequest +// - name: The name of the operation resource. +func (r *ProjectsLocationsRagCorporaOperationsService) Get(name string) *ProjectsLocationsRagCorporaOperationsGetCall { + c := &ProjectsLocationsRagCorporaOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsRagCorporaOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaOperationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsServerStreamingPredictCall { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamingpredictrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRagCorporaOperationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:serverStreamingPredict") + 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{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.serverStreamingPredict" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1StreamingPredictResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1StreamingPredictResponse, error) { +func (c *ProjectsLocationsRagCorporaOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89823,7 +91936,7 @@ func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1StreamingPredictResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89836,82 +91949,104 @@ func (c *ProjectsLocationsPublishersModelsServerStreamingPredictCall) Do(opts .. return ret, nil } -type ProjectsLocationsPublishersModelsStreamGenerateContentCall struct { - s *Service - model string - googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StreamGenerateContent: Generate content with multimodal inputs with -// streaming support. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - model: The fully qualified name of the publisher model or tuned model -// endpoint to use. Publisher model format: -// `projects/{project}/locations/{location}/publishers/*/models/*` Tuned -// model endpoint format: -// `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) StreamGenerateContent(model string, googlecloudaiplatformv1generatecontentrequest *GoogleCloudAiplatformV1GenerateContentRequest) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { - c := &ProjectsLocationsPublishersModelsStreamGenerateContentCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.model = model - c.googlecloudaiplatformv1generatecontentrequest = googlecloudaiplatformv1generatecontentrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsRagCorporaOperationsService) List(name string) *ProjectsLocationsRagCorporaOperationsListCall { + c := &ProjectsLocationsRagCorporaOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsRagCorporaOperationsListCall) Filter(filter string) *ProjectsLocationsRagCorporaOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsRagCorporaOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsRagCorporaOperationsListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { +func (c *ProjectsLocationsRagCorporaOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsRagCorporaOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamGenerateContentCall { +func (c *ProjectsLocationsRagCorporaOperationsListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1generatecontentrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRagCorporaOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+model}:streamGenerateContent") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 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{ - "model": c.model, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.streamGenerateContent" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1GenerateContentResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1GenerateContentResponse, error) { +func (c *ProjectsLocationsRagCorporaOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -89930,7 +92065,7 @@ func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ... if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1GenerateContentResponse{ + ret := &GoogleLongrunningListOperationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -89943,60 +92078,90 @@ func (c *ProjectsLocationsPublishersModelsStreamGenerateContentCall) Do(opts ... return ret, nil } -type ProjectsLocationsPublishersModelsStreamRawPredictCall struct { - s *Service - endpoint string - googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest - 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 *ProjectsLocationsRagCorporaOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// StreamRawPredict: Perform a streaming online prediction with an arbitrary -// HTTP payload. +type ProjectsLocationsRagCorporaOperationsWaitCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. // -// - endpoint: The name of the Endpoint requested to serve the prediction. -// Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. -func (r *ProjectsLocationsPublishersModelsService) StreamRawPredict(endpoint string, googlecloudaiplatformv1streamrawpredictrequest *GoogleCloudAiplatformV1StreamRawPredictRequest) *ProjectsLocationsPublishersModelsStreamRawPredictCall { - c := &ProjectsLocationsPublishersModelsStreamRawPredictCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.endpoint = endpoint - c.googlecloudaiplatformv1streamrawpredictrequest = googlecloudaiplatformv1streamrawpredictrequest +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsRagCorporaOperationsService) Wait(name string) *ProjectsLocationsRagCorporaOperationsWaitCall { + c := &ProjectsLocationsRagCorporaOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsRagCorporaOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Fields(s ...googleapi.Field) *ProjectsLocationsPublishersModelsStreamRawPredictCall { +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Context(ctx context.Context) *ProjectsLocationsPublishersModelsStreamRawPredictCall { +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaOperationsWaitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1streamrawpredictrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+endpoint}:streamRawPredict") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -90004,18 +92169,18 @@ func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) doRequest(alt st } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "endpoint": c.endpoint, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.publishers.models.streamRawPredict" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.operations.wait" call. // 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 *ProjectsLocationsPublishersModelsStreamRawPredictCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { +// *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 *ProjectsLocationsRagCorporaOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90034,7 +92199,7 @@ func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleApiHttpBody{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90047,78 +92212,73 @@ func (c *ProjectsLocationsPublishersModelsStreamRawPredictCall) Do(opts ...googl return ret, nil } -type ProjectsLocationsRagCorporaCreateCall struct { - s *Service - parent string - googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaRagFilesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a RagCorpus. +// Delete: Deletes a RagFile. // -// - parent: The resource name of the Location to create the RagCorpus in. -// Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsRagCorporaService) Create(parent string, googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus) *ProjectsLocationsRagCorporaCreateCall { - c := &ProjectsLocationsRagCorporaCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1ragcorpus = googlecloudaiplatformv1ragcorpus +// - name: The name of the RagFile resource to be deleted. Format: +// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{ +// rag_file}`. +func (r *ProjectsLocationsRagCorporaRagFilesService) Delete(name string) *ProjectsLocationsRagCorporaRagFilesDeleteCall { + c := &ProjectsLocationsRagCorporaRagFilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaCreateCall { +func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaCreateCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaCreateCall { +func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaCreateCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1ragcorpus) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragCorpora") + 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{ - "parent": c.parent, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.create" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.delete" call. // 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 *ProjectsLocationsRagCorporaCreateCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90150,63 +92310,68 @@ func (c *ProjectsLocationsRagCorporaCreateCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsRagCorporaDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaRagFilesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a RagCorpus. +// Get: Gets a RagFile. // -// - name: The name of the RagCorpus resource to be deleted. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *ProjectsLocationsRagCorporaService) Delete(name string) *ProjectsLocationsRagCorporaDeleteCall { - c := &ProjectsLocationsRagCorporaDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the RagFile resource. Format: +// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{ +// rag_file}`. +func (r *ProjectsLocationsRagCorporaRagFilesService) Get(name string) *ProjectsLocationsRagCorporaRagFilesGetCall { + c := &ProjectsLocationsRagCorporaRagFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": If set to true, any RagFiles in -// this RagCorpus will also be deleted. Otherwise, the request will only work -// if the RagCorpus has no RagFiles. -func (c *ProjectsLocationsRagCorporaDeleteCall) Force(force bool) *ProjectsLocationsRagCorporaDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaDeleteCall { +func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsRagCorporaRagFilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaRagFilesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaDeleteCall { +func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaDeleteCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaRagFilesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -90217,13 +92382,13 @@ func (c *ProjectsLocationsRagCorporaDeleteCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.delete" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleLongrunningOperation.ServerResponse.Header or (if a response was +// *GoogleCloudAiplatformV1RagFile.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsRagCorporaDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RagFile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90242,7 +92407,7 @@ func (c *ProjectsLocationsRagCorporaDeleteCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1RagFile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90255,84 +92420,79 @@ func (c *ProjectsLocationsRagCorporaDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsRagCorporaGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaRagFilesImportCall struct { + s *Service + parent string + googlecloudaiplatformv1importragfilesrequest *GoogleCloudAiplatformV1ImportRagFilesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a RagCorpus. +// Import: Import files from Google Cloud Storage or Google Drive into a +// RagCorpus. // -// - name: The name of the RagCorpus resource. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *ProjectsLocationsRagCorporaService) Get(name string) *ProjectsLocationsRagCorporaGetCall { - c := &ProjectsLocationsRagCorporaGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The name of the RagCorpus resource into which to import files. +// Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. +func (r *ProjectsLocationsRagCorporaRagFilesService) Import(parent string, googlecloudaiplatformv1importragfilesrequest *GoogleCloudAiplatformV1ImportRagFilesRequest) *ProjectsLocationsRagCorporaRagFilesImportCall { + c := &ProjectsLocationsRagCorporaRagFilesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudaiplatformv1importragfilesrequest = googlecloudaiplatformv1importragfilesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaGetCall { +func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesImportCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsRagCorporaGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaGetCall { +func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesImportCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaGetCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsRagCorporaRagFilesImportCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importragfilesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragFiles:import") 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 "aiplatform.projects.locations.ragCorpora.get" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.import" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1RagCorpus.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsRagCorporaGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RagCorpus, error) { +func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90351,7 +92511,7 @@ func (c *ProjectsLocationsRagCorporaGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1RagCorpus{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90364,7 +92524,7 @@ func (c *ProjectsLocationsRagCorporaGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsRagCorporaListCall struct { +type ProjectsLocationsRagCorporaRagFilesListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -90373,27 +92533,28 @@ type ProjectsLocationsRagCorporaListCall struct { header_ http.Header } -// List: Lists RagCorpora in a Location. +// List: Lists RagFiles in a RagCorpus. // -// - parent: The resource name of the Location from which to list the -// RagCorpora. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsRagCorporaService) List(parent string) *ProjectsLocationsRagCorporaListCall { - c := &ProjectsLocationsRagCorporaListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: The resource name of the RagCorpus from which to list the +// RagFiles. Format: +// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. +func (r *ProjectsLocationsRagCorporaRagFilesService) List(parent string) *ProjectsLocationsRagCorporaRagFilesListCall { + c := &ProjectsLocationsRagCorporaRagFilesListCall{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 *ProjectsLocationsRagCorporaListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaListCall { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaRagFilesListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListRagCorporaResponse.next_page_token of the -// previous VertexRagDataService.ListRagCorpora call. -func (c *ProjectsLocationsRagCorporaListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaListCall { +// token. Typically obtained via ListRagFilesResponse.next_page_token of the +// previous VertexRagDataService.ListRagFiles call. +func (c *ProjectsLocationsRagCorporaRagFilesListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaRagFilesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -90401,7 +92562,7 @@ func (c *ProjectsLocationsRagCorporaListCall) PageToken(pageToken string) *Proje // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaListCall { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -90409,27 +92570,27 @@ func (c *ProjectsLocationsRagCorporaListCall) Fields(s ...googleapi.Field) *Proj // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsRagCorporaListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaListCall { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaRagFilesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaListCall { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaListCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -90437,7 +92598,7 @@ func (c *ProjectsLocationsRagCorporaListCall) 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/{+parent}/ragCorpora") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragFiles") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -90450,13 +92611,13 @@ func (c *ProjectsLocationsRagCorporaListCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.list" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.list" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListRagCorporaResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use +// *GoogleCloudAiplatformV1ListRagFilesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsRagCorporaListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListRagCorporaResponse, error) { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListRagFilesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90475,7 +92636,7 @@ func (c *ProjectsLocationsRagCorporaListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListRagCorporaResponse{ + ret := &GoogleCloudAiplatformV1ListRagFilesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90491,7 +92652,7 @@ func (c *ProjectsLocationsRagCorporaListCall) 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 *ProjectsLocationsRagCorporaListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListRagCorporaResponse) error) error { +func (c *ProjectsLocationsRagCorporaRagFilesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListRagFilesResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -90509,60 +92670,62 @@ func (c *ProjectsLocationsRagCorporaListCall) Pages(ctx context.Context, f func( } } -type ProjectsLocationsRagCorporaPatchCall struct { - s *Service - name string - googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaRagFilesOperationsCancelCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a RagCorpus. +// Cancel: Starts asynchronous cancellation on a long-running operation. The +// server makes a best effort to cancel the operation, but success is not +// guaranteed. If the server doesn't support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or +// other methods to check whether the cancellation succeeded or whether the +// operation completed despite cancellation. On successful cancellation, the +// operation is not deleted; instead, it becomes an operation with an +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to +// `Code.CANCELLED`. // -// - name: Output only. The resource name of the RagCorpus. -func (r *ProjectsLocationsRagCorporaService) Patch(name string, googlecloudaiplatformv1ragcorpus *GoogleCloudAiplatformV1RagCorpus) *ProjectsLocationsRagCorporaPatchCall { - c := &ProjectsLocationsRagCorporaPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be cancelled. +func (r *ProjectsLocationsRagCorporaRagFilesOperationsService) Cancel(name string) *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall { + c := &ProjectsLocationsRagCorporaRagFilesOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1ragcorpus = googlecloudaiplatformv1ragcorpus return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaPatchCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaPatchCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaPatchCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaPatchCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1ragcorpus) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -90573,13 +92736,13 @@ func (c *ProjectsLocationsRagCorporaPatchCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.patch" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.operations.cancel" call. // 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 *ProjectsLocationsRagCorporaPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsRagCorporaRagFilesOperationsCancelCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90598,7 +92761,7 @@ func (c *ProjectsLocationsRagCorporaPatchCall) Do(opts ...googleapi.CallOption) 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, @@ -90611,7 +92774,7 @@ func (c *ProjectsLocationsRagCorporaPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsRagCorporaRagFilesDeleteCall struct { +type ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -90619,13 +92782,14 @@ type ProjectsLocationsRagCorporaRagFilesDeleteCall struct { header_ http.Header } -// Delete: Deletes a RagFile. +// 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 RagFile resource to be deleted. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{ -// rag_file}`. -func (r *ProjectsLocationsRagCorporaRagFilesService) Delete(name string) *ProjectsLocationsRagCorporaRagFilesDeleteCall { - c := &ProjectsLocationsRagCorporaRagFilesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource to be deleted. +func (r *ProjectsLocationsRagCorporaRagFilesOperationsService) Delete(name string) *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall { + c := &ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -90633,27 +92797,27 @@ func (r *ProjectsLocationsRagCorporaRagFilesService) Delete(name string) *Projec // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesDeleteCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesDeleteCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -90671,13 +92835,13 @@ func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.delete" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.operations.delete" call. // 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 *ProjectsLocationsRagCorporaRagFilesDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +// *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 *ProjectsLocationsRagCorporaRagFilesOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*GoogleProtobufEmpty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90696,7 +92860,7 @@ func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Do(opts ...googleapi.Cal 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, @@ -90709,7 +92873,7 @@ func (c *ProjectsLocationsRagCorporaRagFilesDeleteCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsRagCorporaRagFilesGetCall struct { +type ProjectsLocationsRagCorporaRagFilesOperationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -90718,13 +92882,13 @@ type ProjectsLocationsRagCorporaRagFilesGetCall struct { header_ http.Header } -// Get: Gets a RagFile. +// 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 RagFile resource. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{ -// rag_file}`. -func (r *ProjectsLocationsRagCorporaRagFilesService) Get(name string) *ProjectsLocationsRagCorporaRagFilesGetCall { - c := &ProjectsLocationsRagCorporaRagFilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: The name of the operation resource. +func (r *ProjectsLocationsRagCorporaRagFilesOperationsService) Get(name string) *ProjectsLocationsRagCorporaRagFilesOperationsGetCall { + c := &ProjectsLocationsRagCorporaRagFilesOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -90732,7 +92896,7 @@ func (r *ProjectsLocationsRagCorporaRagFilesService) Get(name string) *ProjectsL // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesGetCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesOperationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -90740,27 +92904,27 @@ func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Fields(s ...googleapi.Field // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsRagCorporaRagFilesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaRagFilesGetCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaRagFilesOperationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesGetCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesOperationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaRagFilesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -90781,13 +92945,13 @@ func (c *ProjectsLocationsRagCorporaRagFilesGetCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.get" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.operations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1RagFile.ServerResponse.Header or (if a response was +// *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 *ProjectsLocationsRagCorporaRagFilesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1RagFile, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsGetCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90806,7 +92970,7 @@ func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1RagFile{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -90819,79 +92983,104 @@ func (c *ProjectsLocationsRagCorporaRagFilesGetCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsRagCorporaRagFilesImportCall struct { - s *Service - parent string - googlecloudaiplatformv1importragfilesrequest *GoogleCloudAiplatformV1ImportRagFilesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRagCorporaRagFilesOperationsListCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Import: Import files from Google Cloud Storage or Google Drive into a -// RagCorpus. +// List: Lists operations that match the specified filter in the request. If +// the server doesn't support this method, it returns `UNIMPLEMENTED`. // -// - parent: The name of the RagCorpus resource into which to import files. -// Format: `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *ProjectsLocationsRagCorporaRagFilesService) Import(parent string, googlecloudaiplatformv1importragfilesrequest *GoogleCloudAiplatformV1ImportRagFilesRequest) *ProjectsLocationsRagCorporaRagFilesImportCall { - c := &ProjectsLocationsRagCorporaRagFilesImportCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.googlecloudaiplatformv1importragfilesrequest = googlecloudaiplatformv1importragfilesrequest +// - name: The name of the operation's parent resource. +func (r *ProjectsLocationsRagCorporaRagFilesOperationsService) List(name string) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { + c := &ProjectsLocationsRagCorporaRagFilesOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) Filter(filter string) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesImportCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesImportCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesOperationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaRagFilesImportCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1importragfilesrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragFiles:import") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}/operations") 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 "aiplatform.projects.locations.ragCorpora.ragFiles.import" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.operations.list" call. // 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 +// *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 *ProjectsLocationsRagCorporaRagFilesImportCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningListOperationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -90910,7 +93099,7 @@ func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Do(opts ...googleapi.Cal 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, @@ -90923,100 +93112,109 @@ func (c *ProjectsLocationsRagCorporaRagFilesImportCall) Do(opts ...googleapi.Cal return ret, nil } -type ProjectsLocationsRagCorporaRagFilesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsRagCorporaRagFilesOperationsListCall) Pages(ctx context.Context, f func(*GoogleLongrunningListOperationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// List: Lists RagFiles in a RagCorpus. -// -// - parent: The resource name of the RagCorpus from which to list the -// RagFiles. Format: -// `projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`. -func (r *ProjectsLocationsRagCorporaRagFilesService) List(parent string) *ProjectsLocationsRagCorporaRagFilesListCall { - c := &ProjectsLocationsRagCorporaRagFilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c +type ProjectsLocationsRagCorporaRagFilesOperationsWaitCall 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 *ProjectsLocationsRagCorporaRagFilesListCall) PageSize(pageSize int64) *ProjectsLocationsRagCorporaRagFilesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// Wait: Waits until the specified long-running operation is done or reaches at +// most a specified timeout, returning the latest state. If the operation is +// already done, the latest state is immediately returned. If the timeout +// specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout +// is used. If the server does not support this method, it returns +// `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort +// basis. It may return the latest state before the specified timeout +// (including immediately), meaning even an immediate response is no guarantee +// that the operation is done. +// +// - name: The name of the operation resource to wait on. +func (r *ProjectsLocationsRagCorporaRagFilesOperationsService) Wait(name string) *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall { + c := &ProjectsLocationsRagCorporaRagFilesOperationsWaitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } -// PageToken sets the optional parameter "pageToken": The standard list page -// token. Typically obtained via ListRagFilesResponse.next_page_token of the -// previous VertexRagDataService.ListRagFiles call. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) PageToken(pageToken string) *ProjectsLocationsRagCorporaRagFilesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Timeout sets the optional parameter "timeout": The maximum duration to wait +// before timing out. If left blank, the wait will be at most the time +// permitted by the underlying HTTP/RPC protocol. If RPC context deadline is +// also specified, the shorter one will be used. +func (c *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) Timeout(timeout string) *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall { + c.urlParams_.Set("timeout", timeout) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesListCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) Fields(s ...googleapi.Field) *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRagCorporaRagFilesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesListCall { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) Context(ctx context.Context) *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) Header() http.Header { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRagCorporaRagFilesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/ragFiles") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:wait") 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 "aiplatform.projects.locations.ragCorpora.ragFiles.list" call. +// Do executes the "aiplatform.projects.locations.ragCorpora.ragFiles.operations.wait" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1ListRagFilesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *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 *ProjectsLocationsRagCorporaRagFilesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1ListRagFilesResponse, error) { +func (c *ProjectsLocationsRagCorporaRagFilesOperationsWaitCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -91035,7 +93233,7 @@ func (c *ProjectsLocationsRagCorporaRagFilesListCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1ListRagFilesResponse{ + ret := &GoogleLongrunningOperation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -91048,27 +93246,6 @@ func (c *ProjectsLocationsRagCorporaRagFilesListCall) Do(opts ...googleapi.CallO return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsRagCorporaRagFilesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1ListRagFilesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - type ProjectsLocationsReasoningEnginesCreateCall struct { s *Service parent string diff --git a/aiplatform/v1beta1/aiplatform-api.json b/aiplatform/v1beta1/aiplatform-api.json index d01cbf1c8c5..0d357880a9f 100644 --- a/aiplatform/v1beta1/aiplatform-api.json +++ b/aiplatform/v1beta1/aiplatform-api.json @@ -950,6 +950,34 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "deploy": { + "description": "Deploys publisher models.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}:deploy", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.deploy", + "parameterOrder": [ + "destination" + ], + "parameters": { + "destination": { + "description": "Required. The resource name of the Location to deploy the model in. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+destination}:deploy", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1DeployPublisherModelRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "evaluateInstances": { "description": "Evaluates instances based on a given metric.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}:evaluateInstances", @@ -15126,7 +15154,7 @@ ], "parameters": { "filter": { - "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `display_name` supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * `notebookRuntimeTemplate=notebookRuntimeTemplate123` * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"` * `notebookRuntimeType=USER_DEFINED`", + "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `display_name` supports = and != * `labels` supports general map functions that is: * `labels.key=value` - key:value equality * `labels.key:* or labels:key - key existence * A key including a space must be quoted. `labels.\"a key\"`. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` supports = and !=. * `acceleratorType` supports = and !=. Some examples: * `notebookRuntimeTemplate=notebookRuntimeTemplate123` * `displayName=\"myDisplayName\"` * `labels.myKey=\"myValue\"` * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * `acceleratorType=NVIDIA_TESLA_T4`", "location": "query", "type": "string" }, @@ -15534,7 +15562,7 @@ ], "parameters": { "filter": { - "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntime` supports = and !=. `notebookRuntime` represents the NotebookRuntime ID, i.e. the last segment of the NotebookRuntime's resource name. * `displayName` supports = and != and regex. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. * API version is UI only: `uiState` supports = and !=. uiState enum: [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * `notebookRuntime=\"notebookRuntime123\"` * `displayName=\"myDisplayName\"` and `displayName=~\"myDisplayNameRegex\"` * `notebookRuntimeTemplate=\"notebookRuntimeTemplate321\"` * `healthState=HEALTHY` * `runtimeState=RUNNING` * `runtimeUser=\"test@google.com\"` * `uiState=UI_RESOURCE_STATE_BEING_DELETED` * `notebookRuntimeType=USER_DEFINED`", + "description": "Optional. An expression for filtering the results of the request. For field names both snake_case and camelCase are supported. * `notebookRuntime` supports = and !=. `notebookRuntime` represents the NotebookRuntime ID, i.e. the last segment of the NotebookRuntime's resource name. * `displayName` supports = and != and regex. * `notebookRuntimeTemplate` supports = and !=. `notebookRuntimeTemplate` represents the NotebookRuntimeTemplate ID, i.e. the last segment of the NotebookRuntimeTemplate's resource name. * `healthState` supports = and !=. healthState enum: [HEALTHY, UNHEALTHY, HEALTH_STATE_UNSPECIFIED]. * `runtimeState` supports = and !=. runtimeState enum: [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, BEING_STOPPED, STOPPED, BEING_UPGRADED, ERROR, INVALID]. * `runtimeUser` supports = and !=. * API version is UI only: `uiState` supports = and !=. uiState enum: [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` supports = and !=. * `acceleratorType` supports = and !=. Some examples: * `notebookRuntime=\"notebookRuntime123\"` * `displayName=\"myDisplayName\"` and `displayName=~\"myDisplayNameRegex\"` * `notebookRuntimeTemplate=\"notebookRuntimeTemplate321\"` * `healthState=HEALTHY` * `runtimeState=RUNNING` * `runtimeUser=\"test@google.com\"` * `uiState=UI_RESOURCE_STATE_BEING_DELETED` * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * `acceleratorType=NVIDIA_TESLA_T4`", "location": "query", "type": "string" }, @@ -17793,6 +17821,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "streamQuery": { + "description": "Streams queries using a reasoning engine.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reasoningEngines/{reasoningEnginesId}:streamQuery", + "httpMethod": "POST", + "id": "aiplatform.projects.locations.reasoningEngines.streamQuery", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the ReasoningEngine resource to use. Format: `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/reasoningEngines/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:streamQuery", + "request": { + "$ref": "GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest" + }, + "response": { + "$ref": "GoogleApiHttpBody" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } }, "resources": { @@ -21725,6 +21781,11 @@ "location": "query", "type": "string" }, + "listAllVersions": { + "description": "Optional. List all publisher model versions if the flag is set to true.", + "location": "query", + "type": "boolean" + }, "orderBy": { "description": "Optional. A comma-separated list of fields to order by, sorted in ascending order. Use \"desc\" after a field name for descending.", "location": "query", @@ -21808,7 +21869,7 @@ } } }, - "revision": "20241119", + "revision": "20241203", "rootUrl": "https://aiplatform.googleapis.com/", "schemas": { "CloudAiLargeModelsVisionGenerateVideoResponse": { @@ -22106,7 +22167,6 @@ "properties": { "encodedVideo": { "description": "Base 64 encoded video bytes.", - "format": "byte", "type": "string" }, "encoding": { @@ -25927,6 +25987,37 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1DeployPublisherModelRequest": { + "description": "Request message for ModelGardenService.DeployPublisherModel.", + "id": "GoogleCloudAiplatformV1beta1DeployPublisherModelRequest", + "properties": { + "acceptEula": { + "description": "Optional. Whether the user accepts the End User License Agreement (EULA) for the model.", + "type": "boolean" + }, + "dedicatedResources": { + "$ref": "GoogleCloudAiplatformV1beta1DedicatedResources", + "description": "Optional. The dedicated resources to use for the endpoint. If not set, the default resources will be used." + }, + "endpointDisplayName": { + "description": "Optional. The user-specified display name of the endpoint. If not set, a default name will be used.", + "type": "string" + }, + "huggingFaceAccessToken": { + "description": "Optional. The Hugging Face read access token used to access the model artifacts of gated models.", + "type": "string" + }, + "model": { + "description": "Required. The name of the PublisherModel resource. Format: `publishers/{publisher}/models/{publisher_model}@{version_id}`, or `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`", + "type": "string" + }, + "modelDisplayName": { + "description": "Optional. The user-specified display name of the uploaded model. If not set, a default name will be used.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1DeploySolverOperationMetadata": { "description": "Runtime operation information for SolverService.DeploySolver.", "id": "GoogleCloudAiplatformV1beta1DeploySolverOperationMetadata", @@ -26387,14 +26478,17 @@ "description": "Optional. Hyperparameters for Distillation." }, "pipelineRootDirectory": { - "description": "Required. A path in a Cloud Storage bucket, which will be treated as the root output directory of the distillation pipeline. It is used by the system to generate the paths of output artifacts.", + "deprecated": true, + "description": "Required. Deprecated. A path in a Cloud Storage bucket, which will be treated as the root output directory of the distillation pipeline. It is used by the system to generate the paths of output artifacts.", "type": "string" }, "studentModel": { - "description": "The student model that is being tuned, e.g., \"google/gemma-2b-1.1-it\".", + "deprecated": true, + "description": "The student model that is being tuned, e.g., \"google/gemma-2b-1.1-it\". Deprecated. Use base_model instead.", "type": "string" }, "trainingDatasetUri": { + "deprecated": true, "description": "Required. Cloud Storage path to file containing training dataset for tuning. The dataset must be formatted as a JSONL file.", "type": "string" }, @@ -26813,6 +26907,30 @@ "toolParameterKvMatchInput": { "$ref": "GoogleCloudAiplatformV1beta1ToolParameterKVMatchInput", "description": "Input for tool parameter key value match metric." + }, + "trajectoryAnyOrderMatchInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput", + "description": "Input for trajectory match any order metric." + }, + "trajectoryExactMatchInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput", + "description": "Input for trajectory exact match metric." + }, + "trajectoryInOrderMatchInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput", + "description": "Input for trajectory in order match metric." + }, + "trajectoryPrecisionInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput", + "description": "Input for trajectory precision metric." + }, + "trajectoryRecallInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryRecallInput", + "description": "Input for trajectory recall metric." + }, + "trajectorySingleToolUseInput": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput", + "description": "Input for trajectory single tool use metric." } }, "type": "object" @@ -26920,6 +27038,30 @@ "toolParameterKvMatchResults": { "$ref": "GoogleCloudAiplatformV1beta1ToolParameterKVMatchResults", "description": "Results for tool parameter key value match metric." + }, + "trajectoryAnyOrderMatchResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults", + "description": "Result for trajectory any order match metric." + }, + "trajectoryExactMatchResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults", + "description": "Result for trajectory exact match metric." + }, + "trajectoryInOrderMatchResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults", + "description": "Result for trajectory in order match metric." + }, + "trajectoryPrecisionResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults", + "description": "Result for trajectory precision metric." + }, + "trajectoryRecallResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryRecallResults", + "description": "Results for trajectory recall metric." + }, + "trajectorySingleToolUseResults": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults", + "description": "Results for trajectory single tool use metric." } }, "type": "object" @@ -28409,6 +28551,25 @@ "description": "Identifier. Name of the FeatureGroup. Format: `projects/{project}/locations/{location}/featureGroups/{featureGroup}`", "type": "string" }, + "serviceAccountEmail": { + "description": "Output only. A Service Account unique to this FeatureGroup. The role bigquery.dataViewer should be granted to this service account to allow Vertex AI Feature Store to access source data while running jobs under this FeatureGroup.", + "readOnly": true, + "type": "string" + }, + "serviceAgentType": { + "description": "Optional. Service agent type used during jobs under a FeatureGroup. By default, the Vertex AI Service Agent is used. When using an IAM Policy to isolate this FeatureGroup within a project, a separate service account should be provisioned by setting this field to `SERVICE_AGENT_TYPE_FEATURE_GROUP`. This will generate a separate service account to access the BigQuery source table.", + "enum": [ + "SERVICE_AGENT_TYPE_UNSPECIFIED", + "SERVICE_AGENT_TYPE_PROJECT", + "SERVICE_AGENT_TYPE_FEATURE_GROUP" + ], + "enumDescriptions": [ + "By default, the project-level Vertex AI Service Agent is enabled.", + "Specifies the project-level Vertex AI Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents).", + "Enable a FeatureGroup service account to be created by Vertex AI and output in the field `service_account_email`. This service account will be used to read from the source BigQuery table during jobs under a FeatureGroup." + ], + "type": "string" + }, "updateTime": { "description": "Output only. Timestamp when this FeatureGroup was last updated.", "format": "google-datetime", @@ -30463,6 +30624,25 @@ "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", "type": "string" }, + "responseModalities": { + "description": "Optional. The modalities of the response.", + "items": { + "enum": [ + "MODALITY_UNSPECIFIED", + "TEXT", + "IMAGE", + "AUDIO" + ], + "enumDescriptions": [ + "Unspecified modality. Will be processed as text.", + "Text modality.", + "Image modality.", + "Audio modality." + ], + "type": "string" + }, + "type": "array" + }, "responseSchema": { "$ref": "GoogleCloudAiplatformV1beta1Schema", "description": "Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response." @@ -30476,6 +30656,10 @@ "format": "int32", "type": "integer" }, + "speechConfig": { + "$ref": "GoogleCloudAiplatformV1beta1SpeechConfig", + "description": "Optional. The speech generation config." + }, "stopSequences": { "description": "Optional. Stop sequences.", "items": { @@ -30488,6 +30672,22 @@ "format": "float", "type": "number" }, + "tokenResolution": { + "description": "Optional. If specified, the token resolution specified will be used.", + "enum": [ + "TOKEN_RESOLUTION_UNSPECIFIED", + "TOKEN_RESOLUTION_LOW", + "TOKEN_RESOLUTION_MEDIUM", + "TOKEN_RESOLUTION_HIGH" + ], + "enumDescriptions": [ + "Token resolution has not been set.", + "Token resolution set to low (64 tokens).", + "Token resolution set to medium (256 tokens).", + "Token resolution set to high (P\u0026S with 256 tokens)." + ], + "type": "string" + }, "topK": { "description": "Optional. If specified, top-k sampling will be used.", "format": "float", @@ -32993,6 +33193,7 @@ "NVIDIA_A100_80GB", "NVIDIA_L4", "NVIDIA_H100_80GB", + "NVIDIA_H100_MEGA_80GB", "TPU_V2", "TPU_V3", "TPU_V4_POD", @@ -33012,6 +33213,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -33025,6 +33227,7 @@ "Nvidia A100 80GB GPU.", "Nvidia L4 GPU.", "Nvidia H100 80Gb GPU.", + "Nvidia H100 Mega 80Gb GPU.", "TPU v2.", "TPU v3.", "TPU v4.", @@ -36457,6 +36660,11 @@ "readOnly": true, "type": "string" }, + "dataPersistentDiskSpec": { + "$ref": "GoogleCloudAiplatformV1beta1PersistentDiskSpec", + "description": "Output only. The specification of persistent disk attached to the notebook runtime as data disk storage.", + "readOnly": true + }, "description": { "description": "The description of the NotebookRuntime.", "type": "string" @@ -36470,6 +36678,11 @@ "description": "Output only. Customer-managed encryption key spec for the notebook runtime.", "readOnly": true }, + "eucConfig": { + "$ref": "GoogleCloudAiplatformV1beta1NotebookEucConfig", + "description": "Output only. EUC configuration of the notebook runtime.", + "readOnly": true + }, "expirationTime": { "description": "Output only. Timestamp when this NotebookRuntime will be expired: 1. System Predefined NotebookRuntime: 24 hours after creation. After expiration, system predifined runtime will be deleted. 2. User created NotebookRuntime: 6 months after last upgrade. After expiration, user created runtime will be stopped and allowed for upgrade.", "format": "google-datetime", @@ -36508,11 +36721,21 @@ "description": "The labels with user-defined metadata to organize your NotebookRuntime. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one NotebookRuntime (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with \"aiplatform.googleapis.com/\" and are immutable. Following system labels exist for NotebookRuntime: * \"aiplatform.googleapis.com/notebook_runtime_gce_instance_id\": output only, its value is the Compute Engine instance id. * \"aiplatform.googleapis.com/colab_enterprise_entry_service\": its value is either \"bigquery\" or \"vertex\"; if absent, it should be \"vertex\". This is to describe the entry service, either BigQuery or Vertex.", "type": "object" }, + "machineSpec": { + "$ref": "GoogleCloudAiplatformV1beta1MachineSpec", + "description": "Output only. The specification of a single machine used by the notebook runtime.", + "readOnly": true + }, "name": { "description": "Output only. The resource name of the NotebookRuntime.", "readOnly": true, "type": "string" }, + "networkSpec": { + "$ref": "GoogleCloudAiplatformV1beta1NetworkSpec", + "description": "Output only. Network spec of the notebook runtime.", + "readOnly": true + }, "networkTags": { "description": "Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/vpc/docs/add-remove-network-tags)).", "items": { @@ -36585,10 +36808,15 @@ "type": "boolean" }, "serviceAccount": { - "description": "Output only. The service account that the NotebookRuntime workload runs as.", + "description": "Output only. Deprecated: This field is no longer used and the \"Vertex AI Notebook Service Account\" (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is used for the runtime workload identity. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account for more details. The service account that the NotebookRuntime workload runs as.", "readOnly": true, "type": "string" }, + "shieldedVmConfig": { + "$ref": "GoogleCloudAiplatformV1beta1ShieldedVmConfig", + "description": "Output only. Runtime Shielded VM spec.", + "readOnly": true + }, "updateTime": { "description": "Output only. Timestamp when this NotebookRuntime was most recently updated.", "format": "google-datetime", @@ -36642,7 +36870,8 @@ "description": "The idle shutdown configuration of NotebookRuntimeTemplate. This config will only be set when idle shutdown is enabled." }, "isDefault": { - "description": "Output only. The default template to use if not specified.", + "deprecated": true, + "description": "Output only. Deprecated: This field has no behavior. Use notebook_runtime_type = 'ONE_CLICK' instead. The default template to use if not specified.", "readOnly": true, "type": "boolean" }, @@ -36687,7 +36916,8 @@ "type": "string" }, "serviceAccount": { - "description": "The service account that the runtime workload runs as. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.", + "deprecated": true, + "description": "Deprecated: This field is ignored and the \"Vertex AI Notebook Service Account\" (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is used for the runtime workload identity. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account for more details. For NotebookExecutionJob, use NotebookExecutionJob.service_account instead. The service account that the runtime workload runs as. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.", "type": "string" }, "shieldedVmConfig": { @@ -37373,7 +37603,7 @@ "properties": { "defaultRuntime": { "$ref": "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime", - "description": "Optional. The default runtime for the PipelineJob. If not provided, Vertex Custom Job(on demand) is used as the runtime. For Vertex Custom Job, please refer to https://cloud.google.com/vertex-ai/docs/training/overview." + "description": "Optional. The default runtime for the PipelineJob. If not set, Standard Vertex Custom Job(https://cloud.google.com/vertex-ai/docs/training/overview) is used as the runtime. If set, all pipeline tasks will run on the default runtime unless a task is a GCPC custom job component (https://cloud.google.com/vertex-ai/docs/pipelines/customjob-component) based task. If the task is based on a GCPC custom job component, it runs solely according to the component's configuration." }, "failurePolicy": { "description": "Represents the failure policy of a pipeline. Currently, the default of a pipeline is that the pipeline will continue to run until no more tasks can be executed, also known as PIPELINE_FAILURE_POLICY_FAIL_SLOW. However, if a pipeline is set to PIPELINE_FAILURE_POLICY_FAIL_FAST, it will stop scheduling any new tasks when a task has failed. Any scheduled tasks will continue to completion.", @@ -37441,7 +37671,7 @@ "type": "object" }, "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail": { - "description": "Persistent resource based runtime detail. For more information, refer to https://cloud.google.com/vertex-ai/docs/training/persistent-resource-overview", + "description": "Persistent resource based runtime detail. For more information about persistent resource, refer to https://cloud.google.com/vertex-ai/docs/training/persistent-resource-overview", "id": "GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail", "properties": { "persistentResourceName": { @@ -37853,6 +38083,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig": { + "description": "The configuration for the prebuilt speaker to use.", + "id": "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig", + "properties": { + "voiceName": { + "description": "The name of the preset voice to use.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1PredefinedSplit": { "description": "Assigns input data to training, validation, and test sets based on the value of a provided key. Supported only for tabular Datasets.", "id": "GoogleCloudAiplatformV1beta1PredefinedSplit", @@ -46028,6 +46269,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1SpeechConfig": { + "description": "The speech generation config.", + "id": "GoogleCloudAiplatformV1beta1SpeechConfig", + "properties": { + "voiceConfig": { + "$ref": "GoogleCloudAiplatformV1beta1VoiceConfig", + "description": "The configuration for the speaker to use." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1StartNotebookRuntimeOperationMetadata": { "description": "Metadata information for NotebookService.StartNotebookRuntime.", "id": "GoogleCloudAiplatformV1beta1StartNotebookRuntimeOperationMetadata", @@ -46087,6 +46339,25 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest": { + "description": "Request message for ReasoningEngineExecutionService.StreamQuery.", + "id": "GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest", + "properties": { + "classMethod": { + "description": "Optional. Class method to be used for the stream query. It is optional and defaults to \"stream_query\" if unspecified.", + "type": "string" + }, + "input": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Input content provided by users in JSON object format. Examples include text query, function calling parameters, media bytes, etc.", + "type": "object" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1StreamRawPredictRequest": { "description": "Request message for PredictionService.StreamRawPredict.", "id": "GoogleCloudAiplatformV1beta1StreamRawPredictRequest", @@ -47928,6 +48199,10 @@ }, "type": "array" }, + "googleSearch": { + "$ref": "GoogleCloudAiplatformV1beta1ToolGoogleSearch", + "description": "Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google." + }, "googleSearchRetrieval": { "$ref": "GoogleCloudAiplatformV1beta1GoogleSearchRetrieval", "description": "Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search." @@ -47939,6 +48214,21 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ToolCall": { + "description": "Spec for tool call.", + "id": "GoogleCloudAiplatformV1beta1ToolCall", + "properties": { + "toolInput": { + "description": "Optional. Spec for tool input", + "type": "string" + }, + "toolName": { + "description": "Required. Spec for tool name", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1ToolCallValidInput": { "description": "Input for tool call valid metric.", "id": "GoogleCloudAiplatformV1beta1ToolCallValidInput", @@ -48023,6 +48313,12 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1ToolGoogleSearch": { + "description": "GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.", + "id": "GoogleCloudAiplatformV1beta1ToolGoogleSearch", + "properties": {}, + "type": "object" + }, "GoogleCloudAiplatformV1beta1ToolNameMatchInput": { "description": "Input for tool name match metric.", "id": "GoogleCloudAiplatformV1beta1ToolNameMatchInput", @@ -48411,6 +48707,423 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1Trajectory": { + "description": "Spec for trajectory.", + "id": "GoogleCloudAiplatformV1beta1Trajectory", + "properties": { + "toolCalls": { + "description": "Required. Tool calls in the trajectory.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1ToolCall" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput": { + "description": "Instances and metric spec for TrajectoryAnyOrderMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryAnyOrderMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec", + "description": "Required. Spec for TrajectoryAnyOrderMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance": { + "description": "Spec for TrajectoryAnyOrderMatch instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue": { + "description": "TrajectoryAnyOrderMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryAnyOrderMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults": { + "description": "Results for TrajectoryAnyOrderMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults", + "properties": { + "trajectoryAnyOrderMatchMetricValues": { + "description": "Output only. TrajectoryAnyOrderMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec": { + "description": "Spec for TrajectoryAnyOrderMatch metric - returns 1 if all tool calls in the reference trajectory appear in the predicted trajectory in any order, else 0.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput": { + "description": "Instances and metric spec for TrajectoryExactMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryExactMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec", + "description": "Required. Spec for TrajectoryExactMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance": { + "description": "Spec for TrajectoryExactMatch instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue": { + "description": "TrajectoryExactMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryExactMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults": { + "description": "Results for TrajectoryExactMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults", + "properties": { + "trajectoryExactMatchMetricValues": { + "description": "Output only. TrajectoryExactMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec": { + "description": "Spec for TrajectoryExactMatch metric - returns 1 if tool calls in the reference trajectory exactly match the predicted trajectory, else 0.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput": { + "description": "Instances and metric spec for TrajectoryInOrderMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryInOrderMatch instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec", + "description": "Required. Spec for TrajectoryInOrderMatch metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance": { + "description": "Spec for TrajectoryInOrderMatch instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue": { + "description": "TrajectoryInOrderMatch metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryInOrderMatch score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults": { + "description": "Results for TrajectoryInOrderMatch metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults", + "properties": { + "trajectoryInOrderMatchMetricValues": { + "description": "Output only. TrajectoryInOrderMatch metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec": { + "description": "Spec for TrajectoryInOrderMatch metric - returns 1 if tool calls in the reference trajectory appear in the predicted trajectory in the same order, else 0.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput": { + "description": "Instances and metric spec for TrajectoryPrecision metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryPrecision instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec", + "description": "Required. Spec for TrajectoryPrecision metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance": { + "description": "Spec for TrajectoryPrecision instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue": { + "description": "TrajectoryPrecision metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryPrecision score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults": { + "description": "Results for TrajectoryPrecision metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults", + "properties": { + "trajectoryPrecisionMetricValues": { + "description": "Output only. TrajectoryPrecision metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec": { + "description": "Spec for TrajectoryPrecision metric - returns a float score based on average precision of individual tool calls.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryRecallInput": { + "description": "Instances and metric spec for TrajectoryRecall metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryRecallInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectoryRecall instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryRecallInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryRecallSpec", + "description": "Required. Spec for TrajectoryRecall metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryRecallInstance": { + "description": "Spec for TrajectoryRecall instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryRecallInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + }, + "referenceTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for reference tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue": { + "description": "TrajectoryRecall metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectoryRecall score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryRecallResults": { + "description": "Results for TrajectoryRecall metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryRecallResults", + "properties": { + "trajectoryRecallMetricValues": { + "description": "Output only. TrajectoryRecall metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectoryRecallSpec": { + "description": "Spec for TrajectoryRecall metric - returns a float score based on average recall of individual tool calls.", + "id": "GoogleCloudAiplatformV1beta1TrajectoryRecallSpec", + "properties": {}, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput": { + "description": "Instances and metric spec for TrajectorySingleToolUse metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput", + "properties": { + "instances": { + "description": "Required. Repeated TrajectorySingleToolUse instance.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance" + }, + "type": "array" + }, + "metricSpec": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec", + "description": "Required. Spec for TrajectorySingleToolUse metric." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance": { + "description": "Spec for TrajectorySingleToolUse instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance", + "properties": { + "predictedTrajectory": { + "$ref": "GoogleCloudAiplatformV1beta1Trajectory", + "description": "Required. Spec for predicted tool call trajectory." + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue": { + "description": "TrajectorySingleToolUse metric value for an instance.", + "id": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue", + "properties": { + "score": { + "description": "Output only. TrajectorySingleToolUse score.", + "format": "float", + "readOnly": true, + "type": "number" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults": { + "description": "Results for TrajectorySingleToolUse metric.", + "id": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults", + "properties": { + "trajectorySingleToolUseMetricValues": { + "description": "Output only. TrajectorySingleToolUse metric values.", + "items": { + "$ref": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec": { + "description": "Spec for TrajectorySingleToolUse metric - returns 1 if tool is present in the predicted trajectory, else 0.", + "id": "GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec", + "properties": { + "toolName": { + "description": "Required. Spec for tool name to be checked for in the predicted trajectory.", + "type": "string" + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1Trial": { "description": "A message representing a Trial. A Trial contains a unique set of Parameters that has been or will be evaluated, along with the objective metrics got by running the Trial.", "id": "GoogleCloudAiplatformV1beta1Trial", @@ -49279,6 +49992,17 @@ }, "type": "object" }, + "GoogleCloudAiplatformV1beta1VoiceConfig": { + "description": "The configuration for the voice to use.", + "id": "GoogleCloudAiplatformV1beta1VoiceConfig", + "properties": { + "prebuiltVoiceConfig": { + "$ref": "GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig", + "description": "The configuration for the prebuilt voice to use." + } + }, + "type": "object" + }, "GoogleCloudAiplatformV1beta1WorkerPoolSpec": { "description": "Represents the spec of a worker pool in a job.", "id": "GoogleCloudAiplatformV1beta1WorkerPoolSpec", diff --git a/aiplatform/v1beta1/aiplatform-gen.go b/aiplatform/v1beta1/aiplatform-gen.go index 8902468f349..02af4f316af 100644 --- a/aiplatform/v1beta1/aiplatform-gen.go +++ b/aiplatform/v1beta1/aiplatform-gen.go @@ -7707,6 +7707,46 @@ func (s GoogleCloudAiplatformV1beta1DeployModelResponse) MarshalJSON() ([]byte, return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1DeployPublisherModelRequest: Request message for +// ModelGardenService.DeployPublisherModel. +type GoogleCloudAiplatformV1beta1DeployPublisherModelRequest struct { + // AcceptEula: Optional. Whether the user accepts the End User License + // Agreement (EULA) for the model. + AcceptEula bool `json:"acceptEula,omitempty"` + // DedicatedResources: Optional. The dedicated resources to use for the + // endpoint. If not set, the default resources will be used. + DedicatedResources *GoogleCloudAiplatformV1beta1DedicatedResources `json:"dedicatedResources,omitempty"` + // EndpointDisplayName: Optional. The user-specified display name of the + // endpoint. If not set, a default name will be used. + EndpointDisplayName string `json:"endpointDisplayName,omitempty"` + // HuggingFaceAccessToken: Optional. The Hugging Face read access token used to + // access the model artifacts of gated models. + HuggingFaceAccessToken string `json:"huggingFaceAccessToken,omitempty"` + // Model: Required. The name of the PublisherModel resource. Format: + // `publishers/{publisher}/models/{publisher_model}@{version_id}`, or + // `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001` + Model string `json:"model,omitempty"` + // ModelDisplayName: Optional. The user-specified display name of the uploaded + // model. If not set, a default name will be used. + ModelDisplayName string `json:"modelDisplayName,omitempty"` + // ForceSendFields is a list of field names (e.g. "AcceptEula") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AcceptEula") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1DeployPublisherModelRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1DeployPublisherModelRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1DeploySolverOperationMetadata: Runtime operation // information for SolverService.DeploySolver. type GoogleCloudAiplatformV1beta1DeploySolverOperationMetadata struct { @@ -8363,12 +8403,13 @@ type GoogleCloudAiplatformV1beta1DistillationSpec struct { BaseTeacherModel string `json:"baseTeacherModel,omitempty"` // HyperParameters: Optional. Hyperparameters for Distillation. HyperParameters *GoogleCloudAiplatformV1beta1DistillationHyperParameters `json:"hyperParameters,omitempty"` - // PipelineRootDirectory: Required. A path in a Cloud Storage bucket, which - // will be treated as the root output directory of the distillation pipeline. - // It is used by the system to generate the paths of output artifacts. + // PipelineRootDirectory: Required. Deprecated. A path in a Cloud Storage + // bucket, which will be treated as the root output directory of the + // distillation pipeline. It is used by the system to generate the paths of + // output artifacts. PipelineRootDirectory string `json:"pipelineRootDirectory,omitempty"` // StudentModel: The student model that is being tuned, e.g., - // "google/gemma-2b-1.1-it". + // "google/gemma-2b-1.1-it". Deprecated. Use base_model instead. StudentModel string `json:"studentModel,omitempty"` // TrainingDatasetUri: Required. Cloud Storage path to file containing training // dataset for tuning. The dataset must be formatted as a JSONL file. @@ -8896,6 +8937,18 @@ type GoogleCloudAiplatformV1beta1EvaluateInstancesRequest struct { ToolParameterKeyMatchInput *GoogleCloudAiplatformV1beta1ToolParameterKeyMatchInput `json:"toolParameterKeyMatchInput,omitempty"` // ToolParameterKvMatchInput: Input for tool parameter key value match metric. ToolParameterKvMatchInput *GoogleCloudAiplatformV1beta1ToolParameterKVMatchInput `json:"toolParameterKvMatchInput,omitempty"` + // TrajectoryAnyOrderMatchInput: Input for trajectory match any order metric. + TrajectoryAnyOrderMatchInput *GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput `json:"trajectoryAnyOrderMatchInput,omitempty"` + // TrajectoryExactMatchInput: Input for trajectory exact match metric. + TrajectoryExactMatchInput *GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput `json:"trajectoryExactMatchInput,omitempty"` + // TrajectoryInOrderMatchInput: Input for trajectory in order match metric. + TrajectoryInOrderMatchInput *GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput `json:"trajectoryInOrderMatchInput,omitempty"` + // TrajectoryPrecisionInput: Input for trajectory precision metric. + TrajectoryPrecisionInput *GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput `json:"trajectoryPrecisionInput,omitempty"` + // TrajectoryRecallInput: Input for trajectory recall metric. + TrajectoryRecallInput *GoogleCloudAiplatformV1beta1TrajectoryRecallInput `json:"trajectoryRecallInput,omitempty"` + // TrajectorySingleToolUseInput: Input for trajectory single tool use metric. + TrajectorySingleToolUseInput *GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput `json:"trajectorySingleToolUseInput,omitempty"` // ForceSendFields is a list of field names (e.g. "BleuInput") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -8977,6 +9030,20 @@ type GoogleCloudAiplatformV1beta1EvaluateInstancesResponse struct { // ToolParameterKvMatchResults: Results for tool parameter key value match // metric. ToolParameterKvMatchResults *GoogleCloudAiplatformV1beta1ToolParameterKVMatchResults `json:"toolParameterKvMatchResults,omitempty"` + // TrajectoryAnyOrderMatchResults: Result for trajectory any order match + // metric. + TrajectoryAnyOrderMatchResults *GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults `json:"trajectoryAnyOrderMatchResults,omitempty"` + // TrajectoryExactMatchResults: Result for trajectory exact match metric. + TrajectoryExactMatchResults *GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults `json:"trajectoryExactMatchResults,omitempty"` + // TrajectoryInOrderMatchResults: Result for trajectory in order match metric. + TrajectoryInOrderMatchResults *GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults `json:"trajectoryInOrderMatchResults,omitempty"` + // TrajectoryPrecisionResults: Result for trajectory precision metric. + TrajectoryPrecisionResults *GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults `json:"trajectoryPrecisionResults,omitempty"` + // TrajectoryRecallResults: Results for trajectory recall metric. + TrajectoryRecallResults *GoogleCloudAiplatformV1beta1TrajectoryRecallResults `json:"trajectoryRecallResults,omitempty"` + // TrajectorySingleToolUseResults: Results for trajectory single tool use + // metric. + TrajectorySingleToolUseResults *GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults `json:"trajectorySingleToolUseResults,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -11082,6 +11149,29 @@ type GoogleCloudAiplatformV1beta1FeatureGroup struct { // Name: Identifier. Name of the FeatureGroup. Format: // `projects/{project}/locations/{location}/featureGroups/{featureGroup}` Name string `json:"name,omitempty"` + // ServiceAccountEmail: Output only. A Service Account unique to this + // FeatureGroup. The role bigquery.dataViewer should be granted to this service + // account to allow Vertex AI Feature Store to access source data while running + // jobs under this FeatureGroup. + ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"` + // ServiceAgentType: Optional. Service agent type used during jobs under a + // FeatureGroup. By default, the Vertex AI Service Agent is used. When using an + // IAM Policy to isolate this FeatureGroup within a project, a separate service + // account should be provisioned by setting this field to + // `SERVICE_AGENT_TYPE_FEATURE_GROUP`. This will generate a separate service + // account to access the BigQuery source table. + // + // Possible values: + // "SERVICE_AGENT_TYPE_UNSPECIFIED" - By default, the project-level Vertex AI + // Service Agent is enabled. + // "SERVICE_AGENT_TYPE_PROJECT" - Specifies the project-level Vertex AI + // Service Agent + // (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). + // "SERVICE_AGENT_TYPE_FEATURE_GROUP" - Enable a FeatureGroup service account + // to be created by Vertex AI and output in the field `service_account_email`. + // This service account will be used to read from the source BigQuery table + // during jobs under a FeatureGroup. + ServiceAgentType string `json:"serviceAgentType,omitempty"` // UpdateTime: Output only. Timestamp when this FeatureGroup was last updated. UpdateTime string `json:"updateTime,omitempty"` @@ -14106,6 +14196,14 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { // prompted to output the appropriate response type, otherwise the behavior is // undefined. This is a preview feature. ResponseMimeType string `json:"responseMimeType,omitempty"` + // ResponseModalities: Optional. The modalities of the response. + // + // Possible values: + // "MODALITY_UNSPECIFIED" - Unspecified modality. Will be processed as text. + // "TEXT" - Text modality. + // "IMAGE" - Image modality. + // "AUDIO" - Audio modality. + ResponseModalities []string `json:"responseModalities,omitempty"` // ResponseSchema: Optional. The `Schema` object allows the definition of input // and output data types. These types can be objects, but also primitives and // arrays. Represents a select subset of an OpenAPI 3.0 schema object @@ -14117,10 +14215,22 @@ type GoogleCloudAiplatformV1beta1GenerationConfig struct { RoutingConfig *GoogleCloudAiplatformV1beta1GenerationConfigRoutingConfig `json:"routingConfig,omitempty"` // Seed: Optional. Seed. Seed int64 `json:"seed,omitempty"` + // SpeechConfig: Optional. The speech generation config. + SpeechConfig *GoogleCloudAiplatformV1beta1SpeechConfig `json:"speechConfig,omitempty"` // StopSequences: Optional. Stop sequences. StopSequences []string `json:"stopSequences,omitempty"` // Temperature: Optional. Controls the randomness of predictions. Temperature float64 `json:"temperature,omitempty"` + // TokenResolution: Optional. If specified, the token resolution specified will + // be used. + // + // Possible values: + // "TOKEN_RESOLUTION_UNSPECIFIED" - Token resolution has not been set. + // "TOKEN_RESOLUTION_LOW" - Token resolution set to low (64 tokens). + // "TOKEN_RESOLUTION_MEDIUM" - Token resolution set to medium (256 tokens). + // "TOKEN_RESOLUTION_HIGH" - Token resolution set to high (P&S with 256 + // tokens). + TokenResolution string `json:"tokenResolution,omitempty"` // TopK: Optional. If specified, top-k sampling will be used. TopK float64 `json:"topK,omitempty"` // TopP: Optional. If specified, nucleus sampling will be used. @@ -17769,6 +17879,7 @@ type GoogleCloudAiplatformV1beta1MachineSpec struct { // "NVIDIA_A100_80GB" - Nvidia A100 80GB GPU. // "NVIDIA_L4" - Nvidia L4 GPU. // "NVIDIA_H100_80GB" - Nvidia H100 80Gb GPU. + // "NVIDIA_H100_MEGA_80GB" - Nvidia H100 Mega 80Gb GPU. // "TPU_V2" - TPU v2. // "TPU_V3" - TPU v3. // "TPU_V4_POD" - TPU v4. @@ -22568,6 +22679,9 @@ func (s GoogleCloudAiplatformV1beta1NotebookIdleShutdownConfig) MarshalJSON() ([ type GoogleCloudAiplatformV1beta1NotebookRuntime struct { // CreateTime: Output only. Timestamp when this NotebookRuntime was created. CreateTime string `json:"createTime,omitempty"` + // DataPersistentDiskSpec: Output only. The specification of persistent disk + // attached to the notebook runtime as data disk storage. + DataPersistentDiskSpec *GoogleCloudAiplatformV1beta1PersistentDiskSpec `json:"dataPersistentDiskSpec,omitempty"` // Description: The description of the NotebookRuntime. Description string `json:"description,omitempty"` // DisplayName: Required. The display name of the NotebookRuntime. The name can @@ -22576,6 +22690,8 @@ type GoogleCloudAiplatformV1beta1NotebookRuntime struct { // EncryptionSpec: Output only. Customer-managed encryption key spec for the // notebook runtime. EncryptionSpec *GoogleCloudAiplatformV1beta1EncryptionSpec `json:"encryptionSpec,omitempty"` + // EucConfig: Output only. EUC configuration of the notebook runtime. + EucConfig *GoogleCloudAiplatformV1beta1NotebookEucConfig `json:"eucConfig,omitempty"` // ExpirationTime: Output only. Timestamp when this NotebookRuntime will be // expired: 1. System Predefined NotebookRuntime: 24 hours after creation. // After expiration, system predifined runtime will be deleted. 2. User created @@ -22610,8 +22726,13 @@ type GoogleCloudAiplatformV1beta1NotebookRuntime struct { // either "bigquery" or "vertex"; if absent, it should be "vertex". This is to // describe the entry service, either BigQuery or Vertex. Labels map[string]string `json:"labels,omitempty"` + // MachineSpec: Output only. The specification of a single machine used by the + // notebook runtime. + MachineSpec *GoogleCloudAiplatformV1beta1MachineSpec `json:"machineSpec,omitempty"` // Name: Output only. The resource name of the NotebookRuntime. Name string `json:"name,omitempty"` + // NetworkSpec: Output only. Network spec of the notebook runtime. + NetworkSpec *GoogleCloudAiplatformV1beta1NetworkSpec `json:"networkSpec,omitempty"` // NetworkTags: Optional. The Compute Engine tags to add to runtime (see // Tagging instances // (https://cloud.google.com/vpc/docs/add-remove-network-tags)). @@ -22651,9 +22772,16 @@ type GoogleCloudAiplatformV1beta1NotebookRuntime struct { SatisfiesPzi bool `json:"satisfiesPzi,omitempty"` // SatisfiesPzs: Output only. Reserved for future use. SatisfiesPzs bool `json:"satisfiesPzs,omitempty"` - // ServiceAccount: Output only. The service account that the NotebookRuntime - // workload runs as. + // ServiceAccount: Output only. Deprecated: This field is no longer used and + // the "Vertex AI Notebook Service Account" + // (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is + // used for the runtime workload identity. See + // https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account + // for more details. The service account that the NotebookRuntime workload runs + // as. ServiceAccount string `json:"serviceAccount,omitempty"` + // ShieldedVmConfig: Output only. Runtime Shielded VM spec. + ShieldedVmConfig *GoogleCloudAiplatformV1beta1ShieldedVmConfig `json:"shieldedVmConfig,omitempty"` // UpdateTime: Output only. Timestamp when this NotebookRuntime was most // recently updated. UpdateTime string `json:"updateTime,omitempty"` @@ -22709,7 +22837,9 @@ type GoogleCloudAiplatformV1beta1NotebookRuntimeTemplate struct { // NotebookRuntimeTemplate. This config will only be set when idle shutdown is // enabled. IdleShutdownConfig *GoogleCloudAiplatformV1beta1NotebookIdleShutdownConfig `json:"idleShutdownConfig,omitempty"` - // IsDefault: Output only. The default template to use if not specified. + // IsDefault: Output only. Deprecated: This field has no behavior. Use + // notebook_runtime_type = 'ONE_CLICK' instead. The default template to use if + // not specified. IsDefault bool `json:"isDefault,omitempty"` // Labels: The labels with user-defined metadata to organize the // NotebookRuntimeTemplates. Label keys and values can be no longer than 64 @@ -22738,10 +22868,16 @@ type GoogleCloudAiplatformV1beta1NotebookRuntimeTemplate struct { // user. // "ONE_CLICK" - runtime or template with system defined configurations. NotebookRuntimeType string `json:"notebookRuntimeType,omitempty"` - // ServiceAccount: The service account that the runtime workload runs as. You - // can use any service account within the same project, but you must have the - // service account user permission to use the instance. If not specified, the - // Compute Engine default service account + // ServiceAccount: Deprecated: This field is ignored and the "Vertex AI + // Notebook Service Account" + // (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) is + // used for the runtime workload identity. See + // https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account + // for more details. For NotebookExecutionJob, use + // NotebookExecutionJob.service_account instead. The service account that the + // runtime workload runs as. You can use any service account within the same + // project, but you must have the service account user permission to use the + // instance. If not specified, the Compute Engine default service account // (https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) // is used. ServiceAccount string `json:"serviceAccount,omitempty"` @@ -23571,9 +23707,13 @@ func (s GoogleCloudAiplatformV1beta1PipelineJobDetail) MarshalJSON() ([]byte, er // a PipelineJob. type GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfig struct { // DefaultRuntime: Optional. The default runtime for the PipelineJob. If not - // provided, Vertex Custom Job(on demand) is used as the runtime. For Vertex - // Custom Job, please refer to - // https://cloud.google.com/vertex-ai/docs/training/overview. + // set, Standard Vertex Custom + // Job(https://cloud.google.com/vertex-ai/docs/training/overview) is used as + // the runtime. If set, all pipeline tasks will run on the default runtime + // unless a task is a GCPC custom job component + // (https://cloud.google.com/vertex-ai/docs/pipelines/customjob-component) + // based task. If the task is based on a GCPC custom job component, it runs + // solely according to the component's configuration. DefaultRuntime *GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigDefaultRuntime `json:"defaultRuntime,omitempty"` // FailurePolicy: Represents the failure policy of a pipeline. Currently, the // default of a pipeline is that the pipeline will continue to run until no @@ -23684,8 +23824,8 @@ func (s GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigInputArtifact) Marsh } // GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntime -// Detail: Persistent resource based runtime detail. For more information, -// refer to +// Detail: Persistent resource based runtime detail. For more information about +// persistent resource, refer to // https://cloud.google.com/vertex-ai/docs/training/persistent-resource-overview type GoogleCloudAiplatformV1beta1PipelineJobRuntimeConfigPersistentResourceRuntimeDetail struct { // PersistentResourceName: Persistent resource name. Format: @@ -24191,6 +24331,29 @@ func (s GoogleCloudAiplatformV1beta1Port) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig: The configuration for the +// prebuilt speaker to use. +type GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig struct { + // VoiceName: The name of the preset voice to use. + VoiceName string `json:"voiceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "VoiceName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VoiceName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1PredefinedSplit: Assigns input data to training, // validation, and test sets based on the value of a provided key. Supported // only for tabular Datasets. @@ -36811,6 +36974,28 @@ func (s GoogleCloudAiplatformV1beta1SpecialistPool) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1SpeechConfig: The speech generation config. +type GoogleCloudAiplatformV1beta1SpeechConfig struct { + // VoiceConfig: The configuration for the speaker to use. + VoiceConfig *GoogleCloudAiplatformV1beta1VoiceConfig `json:"voiceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "VoiceConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "VoiceConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1SpeechConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1SpeechConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1StartNotebookRuntimeOperationMetadata: Metadata // information for NotebookService.StartNotebookRuntime. type GoogleCloudAiplatformV1beta1StartNotebookRuntimeOperationMetadata struct { @@ -36914,6 +37099,33 @@ func (s *GoogleCloudAiplatformV1beta1StratifiedSplit) UnmarshalJSON(data []byte) return nil } +// GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest: Request +// message for ReasoningEngineExecutionService.StreamQuery. +type GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest struct { + // ClassMethod: Optional. Class method to be used for the stream query. It is + // optional and defaults to "stream_query" if unspecified. + ClassMethod string `json:"classMethod,omitempty"` + // Input: Optional. Input content provided by users in JSON object format. + // Examples include text query, function calling parameters, media bytes, etc. + Input googleapi.RawMessage `json:"input,omitempty"` + // ForceSendFields is a list of field names (e.g. "ClassMethod") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ClassMethod") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1StreamRawPredictRequest: Request message for // PredictionService.StreamRawPredict. type GoogleCloudAiplatformV1beta1StreamRawPredictRequest struct { @@ -39434,6 +39646,9 @@ type GoogleCloudAiplatformV1beta1Tool struct { // will generate the final response back to the user. Maximum 128 function // declarations can be provided. FunctionDeclarations []*GoogleCloudAiplatformV1beta1FunctionDeclaration `json:"functionDeclarations,omitempty"` + // GoogleSearch: Optional. GoogleSearch tool type. Tool to support Google + // Search in Model. Powered by Google. + GoogleSearch *GoogleCloudAiplatformV1beta1ToolGoogleSearch `json:"googleSearch,omitempty"` // GoogleSearchRetrieval: Optional. GoogleSearchRetrieval tool type. // Specialized retrieval tool that is powered by Google search. GoogleSearchRetrieval *GoogleCloudAiplatformV1beta1GoogleSearchRetrieval `json:"googleSearchRetrieval,omitempty"` @@ -39459,6 +39674,30 @@ func (s GoogleCloudAiplatformV1beta1Tool) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ToolCall: Spec for tool call. +type GoogleCloudAiplatformV1beta1ToolCall struct { + // ToolInput: Optional. Spec for tool input + ToolInput string `json:"toolInput,omitempty"` + // ToolName: Required. Spec for tool name + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolInput") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ToolInput") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1ToolCall) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1ToolCall + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1ToolCallValidInput: Input for tool call valid // metric. type GoogleCloudAiplatformV1beta1ToolCallValidInput struct { @@ -39604,6 +39843,11 @@ func (s GoogleCloudAiplatformV1beta1ToolConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1ToolGoogleSearch: GoogleSearch tool type. Tool +// to support Google Search in Model. Powered by Google. +type GoogleCloudAiplatformV1beta1ToolGoogleSearch struct { +} + // GoogleCloudAiplatformV1beta1ToolNameMatchInput: Input for tool name match // metric. type GoogleCloudAiplatformV1beta1ToolNameMatchInput struct { @@ -40182,6 +40426,756 @@ func (s GoogleCloudAiplatformV1beta1TrainingPipeline) MarshalJSON() ([]byte, err return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1Trajectory: Spec for trajectory. +type GoogleCloudAiplatformV1beta1Trajectory struct { + // ToolCalls: Required. Tool calls in the trajectory. + ToolCalls []*GoogleCloudAiplatformV1beta1ToolCall `json:"toolCalls,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolCalls") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ToolCalls") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1Trajectory) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1Trajectory + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput: Instances and +// metric spec for TrajectoryAnyOrderMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput struct { + // Instances: Required. Repeated TrajectoryAnyOrderMatch instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryAnyOrderMatch metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance: Spec for +// TrajectoryAnyOrderMatch instance. +type GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue: +// TrajectoryAnyOrderMatch metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue struct { + // Score: Output only. TrajectoryAnyOrderMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults: Results for +// TrajectoryAnyOrderMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults struct { + // TrajectoryAnyOrderMatchMetricValues: Output only. TrajectoryAnyOrderMatch + // metric values. + TrajectoryAnyOrderMatchMetricValues []*GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchMetricValue `json:"trajectoryAnyOrderMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryAnyOrderMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "TrajectoryAnyOrderMatchMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec: Spec for +// TrajectoryAnyOrderMatch metric - returns 1 if all tool calls in the +// reference trajectory appear in the predicted trajectory in any order, else +// 0. +type GoogleCloudAiplatformV1beta1TrajectoryAnyOrderMatchSpec struct { +} + +// GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput: Instances and metric +// spec for TrajectoryExactMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput struct { + // Instances: Required. Repeated TrajectoryExactMatch instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryExactMatch metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryExactMatchInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance: Spec for +// TrajectoryExactMatch instance. +type GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryExactMatchInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue: +// TrajectoryExactMatch metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue struct { + // Score: Output only. TrajectoryExactMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults: Results for +// TrajectoryExactMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults struct { + // TrajectoryExactMatchMetricValues: Output only. TrajectoryExactMatch metric + // values. + TrajectoryExactMatchMetricValues []*GoogleCloudAiplatformV1beta1TrajectoryExactMatchMetricValue `json:"trajectoryExactMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryExactMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "TrajectoryExactMatchMetricValues") to include in API requests with the JSON + // null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryExactMatchResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec: Spec for +// TrajectoryExactMatch metric - returns 1 if tool calls in the reference +// trajectory exactly match the predicted trajectory, else 0. +type GoogleCloudAiplatformV1beta1TrajectoryExactMatchSpec struct { +} + +// GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput: Instances and +// metric spec for TrajectoryInOrderMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput struct { + // Instances: Required. Repeated TrajectoryInOrderMatch instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryInOrderMatch metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance: Spec for +// TrajectoryInOrderMatch instance. +type GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue: +// TrajectoryInOrderMatch metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue struct { + // Score: Output only. TrajectoryInOrderMatch score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults: Results for +// TrajectoryInOrderMatch metric. +type GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults struct { + // TrajectoryInOrderMatchMetricValues: Output only. TrajectoryInOrderMatch + // metric values. + TrajectoryInOrderMatchMetricValues []*GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchMetricValue `json:"trajectoryInOrderMatchMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryInOrderMatchMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "TrajectoryInOrderMatchMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec: Spec for +// TrajectoryInOrderMatch metric - returns 1 if tool calls in the reference +// trajectory appear in the predicted trajectory in the same order, else 0. +type GoogleCloudAiplatformV1beta1TrajectoryInOrderMatchSpec struct { +} + +// GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput: Instances and metric +// spec for TrajectoryPrecision metric. +type GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput struct { + // Instances: Required. Repeated TrajectoryPrecision instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryPrecision metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryPrecisionInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance: Spec for +// TrajectoryPrecision instance. +type GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryPrecisionInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue: +// TrajectoryPrecision metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue struct { + // Score: Output only. TrajectoryPrecision score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults: Results for +// TrajectoryPrecision metric. +type GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults struct { + // TrajectoryPrecisionMetricValues: Output only. TrajectoryPrecision metric + // values. + TrajectoryPrecisionMetricValues []*GoogleCloudAiplatformV1beta1TrajectoryPrecisionMetricValue `json:"trajectoryPrecisionMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryPrecisionMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TrajectoryPrecisionMetricValues") + // to include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryPrecisionResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec: Spec for +// TrajectoryPrecision metric - returns a float score based on average +// precision of individual tool calls. +type GoogleCloudAiplatformV1beta1TrajectoryPrecisionSpec struct { +} + +// GoogleCloudAiplatformV1beta1TrajectoryRecallInput: Instances and metric spec +// for TrajectoryRecall metric. +type GoogleCloudAiplatformV1beta1TrajectoryRecallInput struct { + // Instances: Required. Repeated TrajectoryRecall instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectoryRecallInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectoryRecall metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectoryRecallSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryRecallInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryRecallInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryRecallInstance: Spec for +// TrajectoryRecall instance. +type GoogleCloudAiplatformV1beta1TrajectoryRecallInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ReferenceTrajectory: Required. Spec for reference tool call trajectory. + ReferenceTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"referenceTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryRecallInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryRecallInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue: TrajectoryRecall +// metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue struct { + // Score: Output only. TrajectoryRecall score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectoryRecallResults: Results for +// TrajectoryRecall metric. +type GoogleCloudAiplatformV1beta1TrajectoryRecallResults struct { + // TrajectoryRecallMetricValues: Output only. TrajectoryRecall metric values. + TrajectoryRecallMetricValues []*GoogleCloudAiplatformV1beta1TrajectoryRecallMetricValue `json:"trajectoryRecallMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectoryRecallMetricValues") to unconditionally include in API requests. + // By default, fields with empty or default values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields + // for more details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "TrajectoryRecallMetricValues") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectoryRecallResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectoryRecallResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectoryRecallSpec: Spec for TrajectoryRecall +// metric - returns a float score based on average recall of individual tool +// calls. +type GoogleCloudAiplatformV1beta1TrajectoryRecallSpec struct { +} + +// GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput: Instances and +// metric spec for TrajectorySingleToolUse metric. +type GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput struct { + // Instances: Required. Repeated TrajectorySingleToolUse instance. + Instances []*GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance `json:"instances,omitempty"` + // MetricSpec: Required. Spec for TrajectorySingleToolUse metric. + MetricSpec *GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec `json:"metricSpec,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInput + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance: Spec for +// TrajectorySingleToolUse instance. +type GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance struct { + // PredictedTrajectory: Required. Spec for predicted tool call trajectory. + PredictedTrajectory *GoogleCloudAiplatformV1beta1Trajectory `json:"predictedTrajectory,omitempty"` + // ForceSendFields is a list of field names (e.g. "PredictedTrajectory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PredictedTrajectory") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseInstance + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue: +// TrajectorySingleToolUse metric value for an instance. +type GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue struct { + // Score: Output only. TrajectorySingleToolUse score. + Score float64 `json:"score,omitempty"` + // ForceSendFields is a list of field names (e.g. "Score") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Score") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue + var s1 struct { + Score gensupport.JSONFloat64 `json:"score"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.Score = float64(s1.Score) + return nil +} + +// GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults: Results for +// TrajectorySingleToolUse metric. +type GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults struct { + // TrajectorySingleToolUseMetricValues: Output only. TrajectorySingleToolUse + // metric values. + TrajectorySingleToolUseMetricValues []*GoogleCloudAiplatformV1beta1TrajectorySingleToolUseMetricValue `json:"trajectorySingleToolUseMetricValues,omitempty"` + // ForceSendFields is a list of field names (e.g. + // "TrajectorySingleToolUseMetricValues") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "TrajectorySingleToolUseMetricValues") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseResults + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec: Spec for +// TrajectorySingleToolUse metric - returns 1 if tool is present in the +// predicted trajectory, else 0. +type GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec struct { + // ToolName: Required. Spec for tool name to be checked for in the predicted + // trajectory. + ToolName string `json:"toolName,omitempty"` + // ForceSendFields is a list of field names (e.g. "ToolName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ToolName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1TrajectorySingleToolUseSpec + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1Trial: A message representing a Trial. A Trial // contains a unique set of Parameters that has been or will be evaluated, // along with the objective metrics got by running the Trial. @@ -41507,6 +42501,29 @@ func (s GoogleCloudAiplatformV1beta1VideoMetadata) MarshalJSON() ([]byte, error) return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudAiplatformV1beta1VoiceConfig: The configuration for the voice to +// use. +type GoogleCloudAiplatformV1beta1VoiceConfig struct { + // PrebuiltVoiceConfig: The configuration for the prebuilt voice to use. + PrebuiltVoiceConfig *GoogleCloudAiplatformV1beta1PrebuiltVoiceConfig `json:"prebuiltVoiceConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "PrebuiltVoiceConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "PrebuiltVoiceConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudAiplatformV1beta1VoiceConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudAiplatformV1beta1VoiceConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudAiplatformV1beta1WorkerPoolSpec: Represents the spec of a worker // pool in a job. type GoogleCloudAiplatformV1beta1WorkerPoolSpec struct { @@ -44785,6 +45802,109 @@ func (c *ProjectsLocationsCorroborateContentCall) Do(opts ...googleapi.CallOptio return ret, nil } +type ProjectsLocationsDeployCall struct { + s *Service + destination string + googlecloudaiplatformv1beta1deploypublishermodelrequest *GoogleCloudAiplatformV1beta1DeployPublisherModelRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Deploy: Deploys publisher models. +// +// - destination: The resource name of the Location to deploy the model in. +// Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsService) Deploy(destination string, googlecloudaiplatformv1beta1deploypublishermodelrequest *GoogleCloudAiplatformV1beta1DeployPublisherModelRequest) *ProjectsLocationsDeployCall { + c := &ProjectsLocationsDeployCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.destination = destination + c.googlecloudaiplatformv1beta1deploypublishermodelrequest = googlecloudaiplatformv1beta1deploypublishermodelrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsDeployCall) Fields(s ...googleapi.Field) *ProjectsLocationsDeployCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsDeployCall) Context(ctx context.Context) *ProjectsLocationsDeployCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsDeployCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsDeployCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1deploypublishermodelrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+destination}:deploy") + 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{ + "destination": c.destination, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.deploy" call. +// 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 *ProjectsLocationsDeployCall) 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 +} + type ProjectsLocationsEvaluateInstancesCall struct { s *Service location string @@ -96906,10 +98026,12 @@ func (r *ProjectsLocationsNotebookRuntimeTemplatesService) List(parent string) * // that is: * `labels.key=value` - key:value equality * `labels.key:* or // labels:key - key existence * A key including a space must be quoted. // `labels."a key". * `notebookRuntimeType` supports = and !=. -// notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * +// notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` +// supports = and !=. * `acceleratorType` supports = and !=. Some examples: * // `notebookRuntimeTemplate=notebookRuntimeTemplate123` * // `displayName="myDisplayName" * `labels.myKey="myValue" * -// `notebookRuntimeType=USER_DEFINED` +// `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * +// `acceleratorType=NVIDIA_TESLA_T4` func (c *ProjectsLocationsNotebookRuntimeTemplatesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimeTemplatesListCall { c.urlParams_.Set("filter", filter) return c @@ -98421,13 +99543,15 @@ func (r *ProjectsLocationsNotebookRuntimesService) List(parent string) *Projects // [UI_RESOURCE_STATE_UNSPECIFIED, UI_RESOURCE_STATE_BEING_CREATED, // UI_RESOURCE_STATE_ACTIVE, UI_RESOURCE_STATE_BEING_DELETED, // UI_RESOURCE_STATE_CREATION_FAILED]. * `notebookRuntimeType` supports = and -// !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. Some examples: * +// !=. notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. * `machineType` +// supports = and !=. * `acceleratorType` supports = and !=. Some examples: * // `notebookRuntime="notebookRuntime123" * `displayName="myDisplayName" and // `displayName=~"myDisplayNameRegex" * // `notebookRuntimeTemplate="notebookRuntimeTemplate321" * // `healthState=HEALTHY` * `runtimeState=RUNNING` * // `runtimeUser="test@google.com" * `uiState=UI_RESOURCE_STATE_BEING_DELETED` -// * `notebookRuntimeType=USER_DEFINED` +// * `notebookRuntimeType=USER_DEFINED` * `machineType=e2-standard-4` * +// `acceleratorType=NVIDIA_TESLA_T4` func (c *ProjectsLocationsNotebookRuntimesListCall) Filter(filter string) *ProjectsLocationsNotebookRuntimesListCall { c.urlParams_.Set("filter", filter) return c @@ -106353,345 +107477,449 @@ func (c *ProjectsLocationsReasoningEnginesDeleteCall) Do(opts ...googleapi.CallO return ret, nil } -type ProjectsLocationsReasoningEnginesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsReasoningEnginesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets a reasoning engine. +// +// - name: The name of the ReasoningEngine resource. Format: +// `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine +// }`. +func (r *ProjectsLocationsReasoningEnginesService) Get(name string) *ProjectsLocationsReasoningEnginesGetCall { + c := &ProjectsLocationsReasoningEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsReasoningEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsReasoningEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReasoningEnginesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReasoningEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReasoningEnginesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReasoningEnginesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.reasoningEngines.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ReasoningEngine.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsReasoningEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ReasoningEngine, 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 := &GoogleCloudAiplatformV1beta1ReasoningEngine{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsReasoningEnginesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists reasoning engines in a location. +// +// - parent: The resource name of the Location to list the ReasoningEngines +// from. Format: `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsReasoningEnginesService) List(parent string) *ProjectsLocationsReasoningEnginesListCall { + c := &ProjectsLocationsReasoningEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The standard list filter. More +// detail in AIP-160 (https://google.aip.dev/160). +func (c *ProjectsLocationsReasoningEnginesListCall) Filter(filter string) *ProjectsLocationsReasoningEnginesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The standard list page +// size. +func (c *ProjectsLocationsReasoningEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsReasoningEnginesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The standard list page +// token. +func (c *ProjectsLocationsReasoningEnginesListCall) PageToken(pageToken string) *ProjectsLocationsReasoningEnginesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsReasoningEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsReasoningEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReasoningEnginesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReasoningEnginesListCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReasoningEnginesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReasoningEnginesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/reasoningEngines") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "parent": c.parent, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.reasoningEngines.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse.ServerResponse.Head +// er or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsReasoningEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse, 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 := &GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsReasoningEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsReasoningEnginesPatchCall struct { + s *Service + name string + googlecloudaiplatformv1beta1reasoningengine *GoogleCloudAiplatformV1beta1ReasoningEngine + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a reasoning engine. +// +// - name: Identifier. The resource name of the ReasoningEngine. +func (r *ProjectsLocationsReasoningEnginesService) Patch(name string, googlecloudaiplatformv1beta1reasoningengine *GoogleCloudAiplatformV1beta1ReasoningEngine) *ProjectsLocationsReasoningEnginesPatchCall { + c := &ProjectsLocationsReasoningEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudaiplatformv1beta1reasoningengine = googlecloudaiplatformv1beta1reasoningengine + return c +} + +// UpdateMask sets the optional parameter "updateMask": Mask specifying which +// fields to update. +func (c *ProjectsLocationsReasoningEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsReasoningEnginesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsReasoningEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsReasoningEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsReasoningEnginesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsReasoningEnginesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1reasoningengine) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "aiplatform.projects.locations.reasoningEngines.patch" call. +// 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 *ProjectsLocationsReasoningEnginesPatchCall) 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 +} + +type ProjectsLocationsReasoningEnginesQueryCall struct { + s *Service + name string + googlecloudaiplatformv1beta1queryreasoningenginerequest *GoogleCloudAiplatformV1beta1QueryReasoningEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Gets a reasoning engine. +// Query: Queries using a reasoning engine. // -// - name: The name of the ReasoningEngine resource. Format: +// - name: The name of the ReasoningEngine resource to use. Format: // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine // }`. -func (r *ProjectsLocationsReasoningEnginesService) Get(name string) *ProjectsLocationsReasoningEnginesGetCall { - c := &ProjectsLocationsReasoningEnginesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsReasoningEnginesService) Query(name string, googlecloudaiplatformv1beta1queryreasoningenginerequest *GoogleCloudAiplatformV1beta1QueryReasoningEngineRequest) *ProjectsLocationsReasoningEnginesQueryCall { + c := &ProjectsLocationsReasoningEnginesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.googlecloudaiplatformv1beta1queryreasoningenginerequest = googlecloudaiplatformv1beta1queryreasoningenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsReasoningEnginesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesGetCall { +func (c *ProjectsLocationsReasoningEnginesQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsReasoningEnginesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsReasoningEnginesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsReasoningEnginesGetCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesGetCall { +func (c *ProjectsLocationsReasoningEnginesQueryCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesQueryCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsReasoningEnginesGetCall) Header() http.Header { +func (c *ProjectsLocationsReasoningEnginesQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReasoningEnginesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsReasoningEnginesQueryCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.reasoningEngines.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1beta1ReasoningEngine.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsReasoningEnginesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ReasoningEngine, 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, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1queryreasoningenginerequest) if err != nil { return nil, err } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleCloudAiplatformV1beta1ReasoningEngine{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsReasoningEnginesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists reasoning engines in a location. -// -// - parent: The resource name of the Location to list the ReasoningEngines -// from. Format: `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsReasoningEnginesService) List(parent string) *ProjectsLocationsReasoningEnginesListCall { - c := &ProjectsLocationsReasoningEnginesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": The standard list filter. More -// detail in AIP-160 (https://google.aip.dev/160). -func (c *ProjectsLocationsReasoningEnginesListCall) Filter(filter string) *ProjectsLocationsReasoningEnginesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// PageSize sets the optional parameter "pageSize": The standard list page -// size. -func (c *ProjectsLocationsReasoningEnginesListCall) PageSize(pageSize int64) *ProjectsLocationsReasoningEnginesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": The standard list page -// token. -func (c *ProjectsLocationsReasoningEnginesListCall) PageToken(pageToken string) *ProjectsLocationsReasoningEnginesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsReasoningEnginesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsReasoningEnginesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsReasoningEnginesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsReasoningEnginesListCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsReasoningEnginesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsReasoningEnginesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/reasoningEngines") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:query") 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 "aiplatform.projects.locations.reasoningEngines.list" call. +// Do executes the "aiplatform.projects.locations.reasoningEngines.query" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse.ServerResponse.Head +// *GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse.ServerResponse.Head // er or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsReasoningEnginesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse, 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 := &GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsReasoningEnginesListCall) Pages(ctx context.Context, f func(*GoogleCloudAiplatformV1beta1ListReasoningEnginesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsReasoningEnginesPatchCall struct { - s *Service - name string - googlecloudaiplatformv1beta1reasoningengine *GoogleCloudAiplatformV1beta1ReasoningEngine - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a reasoning engine. -// -// - name: Identifier. The resource name of the ReasoningEngine. -func (r *ProjectsLocationsReasoningEnginesService) Patch(name string, googlecloudaiplatformv1beta1reasoningengine *GoogleCloudAiplatformV1beta1ReasoningEngine) *ProjectsLocationsReasoningEnginesPatchCall { - c := &ProjectsLocationsReasoningEnginesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.googlecloudaiplatformv1beta1reasoningengine = googlecloudaiplatformv1beta1reasoningengine - return c -} - -// UpdateMask sets the optional parameter "updateMask": Mask specifying which -// fields to update. -func (c *ProjectsLocationsReasoningEnginesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsReasoningEnginesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsReasoningEnginesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsReasoningEnginesPatchCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsReasoningEnginesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsReasoningEnginesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1reasoningengine) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "aiplatform.projects.locations.reasoningEngines.patch" call. -// 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 *ProjectsLocationsReasoningEnginesPatchCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsReasoningEnginesQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -106710,7 +107938,7 @@ func (c *ProjectsLocationsReasoningEnginesPatchCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleLongrunningOperation{ + ret := &GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -106723,60 +107951,60 @@ func (c *ProjectsLocationsReasoningEnginesPatchCall) Do(opts ...googleapi.CallOp return ret, nil } -type ProjectsLocationsReasoningEnginesQueryCall struct { - s *Service - name string - googlecloudaiplatformv1beta1queryreasoningenginerequest *GoogleCloudAiplatformV1beta1QueryReasoningEngineRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsReasoningEnginesStreamQueryCall struct { + s *Service + name string + googlecloudaiplatformv1beta1streamqueryreasoningenginerequest *GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Query: Queries using a reasoning engine. +// StreamQuery: Streams queries using a reasoning engine. // // - name: The name of the ReasoningEngine resource to use. Format: // `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine // }`. -func (r *ProjectsLocationsReasoningEnginesService) Query(name string, googlecloudaiplatformv1beta1queryreasoningenginerequest *GoogleCloudAiplatformV1beta1QueryReasoningEngineRequest) *ProjectsLocationsReasoningEnginesQueryCall { - c := &ProjectsLocationsReasoningEnginesQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsReasoningEnginesService) StreamQuery(name string, googlecloudaiplatformv1beta1streamqueryreasoningenginerequest *GoogleCloudAiplatformV1beta1StreamQueryReasoningEngineRequest) *ProjectsLocationsReasoningEnginesStreamQueryCall { + c := &ProjectsLocationsReasoningEnginesStreamQueryCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.googlecloudaiplatformv1beta1queryreasoningenginerequest = googlecloudaiplatformv1beta1queryreasoningenginerequest + c.googlecloudaiplatformv1beta1streamqueryreasoningenginerequest = googlecloudaiplatformv1beta1streamqueryreasoningenginerequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsReasoningEnginesQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesQueryCall { +func (c *ProjectsLocationsReasoningEnginesStreamQueryCall) Fields(s ...googleapi.Field) *ProjectsLocationsReasoningEnginesStreamQueryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsReasoningEnginesQueryCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesQueryCall { +func (c *ProjectsLocationsReasoningEnginesStreamQueryCall) Context(ctx context.Context) *ProjectsLocationsReasoningEnginesStreamQueryCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsReasoningEnginesQueryCall) Header() http.Header { +func (c *ProjectsLocationsReasoningEnginesStreamQueryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsReasoningEnginesQueryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsReasoningEnginesStreamQueryCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1queryreasoningenginerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudaiplatformv1beta1streamqueryreasoningenginerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:query") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:streamQuery") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -106789,13 +108017,13 @@ func (c *ProjectsLocationsReasoningEnginesQueryCall) doRequest(alt string) (*htt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "aiplatform.projects.locations.reasoningEngines.query" call. +// Do executes the "aiplatform.projects.locations.reasoningEngines.streamQuery" call. // Any non-2xx status code is an error. Response headers are in either -// *GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse.ServerResponse.Head -// er or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsReasoningEnginesQueryCall) Do(opts ...googleapi.CallOption) (*GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse, error) { +// *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 *ProjectsLocationsReasoningEnginesStreamQueryCall) Do(opts ...googleapi.CallOption) (*GoogleApiHttpBody, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -106814,7 +108042,7 @@ func (c *ProjectsLocationsReasoningEnginesQueryCall) Do(opts ...googleapi.CallOp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GoogleCloudAiplatformV1beta1QueryReasoningEngineResponse{ + ret := &GoogleApiHttpBody{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -121314,6 +122542,13 @@ func (c *PublishersModelsListCall) LanguageCode(languageCode string) *Publishers return c } +// ListAllVersions sets the optional parameter "listAllVersions": List all +// publisher model versions if the flag is set to true. +func (c *PublishersModelsListCall) ListAllVersions(listAllVersions bool) *PublishersModelsListCall { + c.urlParams_.Set("listAllVersions", fmt.Sprint(listAllVersions)) + 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. diff --git a/contactcenterinsights/v1/contactcenterinsights-api.json b/contactcenterinsights/v1/contactcenterinsights-api.json index cd4665040f8..32418fc8944 100644 --- a/contactcenterinsights/v1/contactcenterinsights-api.json +++ b/contactcenterinsights/v1/contactcenterinsights-api.json @@ -472,15 +472,15 @@ } } }, - "authorizedViewSet": { + "authorizedViewSets": { "resources": { - "authorizedView": { + "authorizedViews": { "methods": { "calculateStats": { "description": "Gets conversation statistics.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizedViewSet/{authorizedViewSetId}/authorizedView/{authorizedViewId}:calculateStats", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizedViewSets/{authorizedViewSetsId}/authorizedViews/{authorizedViewsId}:calculateStats", "httpMethod": "GET", - "id": "contactcenterinsights.projects.locations.authorizedViewSet.authorizedView.calculateStats", + "id": "contactcenterinsights.projects.locations.authorizedViewSets.authorizedViews.calculateStats", "parameterOrder": [ "location" ], @@ -493,7 +493,7 @@ "location": { "description": "Required. The location of the conversations.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/authorizedViewSet/[^/]+/authorizedView/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/authorizedViewSets/[^/]+/authorizedViews/[^/]+$", "required": true, "type": "string" } @@ -508,9 +508,9 @@ }, "queryMetrics": { "description": "Query metrics.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizedViewSet/{authorizedViewSetId}/authorizedView/{authorizedViewId}:queryMetrics", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizedViewSets/{authorizedViewSetsId}/authorizedViews/{authorizedViewsId}:queryMetrics", "httpMethod": "POST", - "id": "contactcenterinsights.projects.locations.authorizedViewSet.authorizedView.queryMetrics", + "id": "contactcenterinsights.projects.locations.authorizedViewSets.authorizedViews.queryMetrics", "parameterOrder": [ "location" ], @@ -518,7 +518,7 @@ "location": { "description": "Required. The location of the data. \"projects/{project}/locations/{location}\"", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/authorizedViewSet/[^/]+/authorizedView/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/authorizedViewSets/[^/]+/authorizedViews/[^/]+$", "required": true, "type": "string" } @@ -2575,7 +2575,7 @@ } } }, - "revision": "20241119", + "revision": "20241204", "rootUrl": "https://contactcenterinsights.googleapis.com/", "schemas": { "GoogleCloudContactcenterinsightsV1Analysis": { @@ -3723,9 +3723,21 @@ "description": "A user-provided string indicating the outcome of the agent's segment of the call.", "type": "string" }, + "location": { + "description": "The agent's location.", + "type": "string" + }, "team": { - "description": "A user-specified string representing the agent's team.", + "deprecated": true, + "description": "A user-specified string representing the agent's team. Deprecated in favor of the `teams` field.", "type": "string" + }, + "teams": { + "description": "User-specified strings representing the agent's teams.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -7359,9 +7371,21 @@ "description": "A user-provided string indicating the outcome of the agent's segment of the call.", "type": "string" }, + "location": { + "description": "The agent's location.", + "type": "string" + }, "team": { - "description": "A user-specified string representing the agent's team.", + "deprecated": true, + "description": "A user-specified string representing the agent's team. Deprecated in favor of the `teams` field.", "type": "string" + }, + "teams": { + "description": "User-specified strings representing the agent's teams.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" diff --git a/contactcenterinsights/v1/contactcenterinsights-gen.go b/contactcenterinsights/v1/contactcenterinsights-gen.go index 756b11427ac..a2096a7471d 100644 --- a/contactcenterinsights/v1/contactcenterinsights-gen.go +++ b/contactcenterinsights/v1/contactcenterinsights-gen.go @@ -169,7 +169,7 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} rs.AnalysisRules = NewProjectsLocationsAnalysisRulesService(s) - rs.AuthorizedViewSet = NewProjectsLocationsAuthorizedViewSetService(s) + rs.AuthorizedViewSets = NewProjectsLocationsAuthorizedViewSetsService(s) rs.Conversations = NewProjectsLocationsConversationsService(s) rs.EncryptionSpec = NewProjectsLocationsEncryptionSpecService(s) rs.Insightsdata = NewProjectsLocationsInsightsdataService(s) @@ -186,7 +186,7 @@ type ProjectsLocationsService struct { AnalysisRules *ProjectsLocationsAnalysisRulesService - AuthorizedViewSet *ProjectsLocationsAuthorizedViewSetService + AuthorizedViewSets *ProjectsLocationsAuthorizedViewSetsService Conversations *ProjectsLocationsConversationsService @@ -214,24 +214,24 @@ type ProjectsLocationsAnalysisRulesService struct { s *Service } -func NewProjectsLocationsAuthorizedViewSetService(s *Service) *ProjectsLocationsAuthorizedViewSetService { - rs := &ProjectsLocationsAuthorizedViewSetService{s: s} - rs.AuthorizedView = NewProjectsLocationsAuthorizedViewSetAuthorizedViewService(s) +func NewProjectsLocationsAuthorizedViewSetsService(s *Service) *ProjectsLocationsAuthorizedViewSetsService { + rs := &ProjectsLocationsAuthorizedViewSetsService{s: s} + rs.AuthorizedViews = NewProjectsLocationsAuthorizedViewSetsAuthorizedViewsService(s) return rs } -type ProjectsLocationsAuthorizedViewSetService struct { +type ProjectsLocationsAuthorizedViewSetsService struct { s *Service - AuthorizedView *ProjectsLocationsAuthorizedViewSetAuthorizedViewService + AuthorizedViews *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService } -func NewProjectsLocationsAuthorizedViewSetAuthorizedViewService(s *Service) *ProjectsLocationsAuthorizedViewSetAuthorizedViewService { - rs := &ProjectsLocationsAuthorizedViewSetAuthorizedViewService{s: s} +func NewProjectsLocationsAuthorizedViewSetsAuthorizedViewsService(s *Service) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService { + rs := &ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService{s: s} return rs } -type ProjectsLocationsAuthorizedViewSetAuthorizedViewService struct { +type ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService struct { s *Service } @@ -1665,8 +1665,13 @@ type GoogleCloudContactcenterinsightsV1ConversationQualityMetadataAgentInfo stru // DispositionCode: A user-provided string indicating the outcome of the // agent's segment of the call. DispositionCode string `json:"dispositionCode,omitempty"` - // Team: A user-specified string representing the agent's team. + // Location: The agent's location. + Location string `json:"location,omitempty"` + // Team: A user-specified string representing the agent's team. Deprecated in + // favor of the `teams` field. Team string `json:"team,omitempty"` + // Teams: User-specified strings representing the agent's teams. + Teams []string `json:"teams,omitempty"` // ForceSendFields is a list of field names (e.g. "AgentId") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -6414,8 +6419,13 @@ type GoogleCloudContactcenterinsightsV1alpha1ConversationQualityMetadataAgentInf // DispositionCode: A user-provided string indicating the outcome of the // agent's segment of the call. DispositionCode string `json:"dispositionCode,omitempty"` - // Team: A user-specified string representing the agent's team. + // Location: The agent's location. + Location string `json:"location,omitempty"` + // Team: A user-specified string representing the agent's team. Deprecated in + // favor of the `teams` field. Team string `json:"team,omitempty"` + // Teams: User-specified strings representing the agent's teams. + Teams []string `json:"teams,omitempty"` // ForceSendFields is a list of field names (e.g. "AgentId") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See @@ -10754,7 +10764,7 @@ func (c *ProjectsLocationsAnalysisRulesPatchCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall struct { +type ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall struct { s *Service location string urlParams_ gensupport.URLParams @@ -10766,8 +10776,8 @@ type ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall struct { // CalculateStats: Gets conversation statistics. // // - location: The location of the conversations. -func (r *ProjectsLocationsAuthorizedViewSetAuthorizedViewService) CalculateStats(location string) *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall { - c := &ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService) CalculateStats(location string) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall { + c := &ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.location = location return c } @@ -10775,7 +10785,7 @@ func (r *ProjectsLocationsAuthorizedViewSetAuthorizedViewService) CalculateStats // Filter sets the optional parameter "filter": A filter to reduce results to a // specific subset. This field is useful for getting statistics about // conversations with specific properties. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Filter(filter string) *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) Filter(filter string) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall { c.urlParams_.Set("filter", filter) return c } @@ -10783,7 +10793,7 @@ func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Fil // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -10791,27 +10801,27 @@ func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Fie // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) IfNoneMatch(entityTag string) *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) IfNoneMatch(entityTag string) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Context(ctx context.Context) *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) Context(ctx context.Context) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Header() http.Header { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -10832,13 +10842,13 @@ func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) doR return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "contactcenterinsights.projects.locations.authorizedViewSet.authorizedView.calculateStats" call. +// Do executes the "contactcenterinsights.projects.locations.authorizedViewSets.authorizedViews.calculateStats" call. // Any non-2xx status code is an error. Response headers are in either // *GoogleCloudContactcenterinsightsV1CalculateStatsResponse.ServerResponse.Head // er or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContactcenterinsightsV1CalculateStatsResponse, error) { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsCalculateStatsCall) Do(opts ...googleapi.CallOption) (*GoogleCloudContactcenterinsightsV1CalculateStatsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -10870,7 +10880,7 @@ func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewCalculateStatsCall) Do( return ret, nil } -type ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall struct { +type ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall struct { s *Service location string googlecloudcontactcenterinsightsv1querymetricsrequest *GoogleCloudContactcenterinsightsV1QueryMetricsRequest @@ -10883,8 +10893,8 @@ type ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall struct { // // - location: The location of the data. // "projects/{project}/locations/{location}". -func (r *ProjectsLocationsAuthorizedViewSetAuthorizedViewService) QueryMetrics(location string, googlecloudcontactcenterinsightsv1querymetricsrequest *GoogleCloudContactcenterinsightsV1QueryMetricsRequest) *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall { - c := &ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsService) QueryMetrics(location string, googlecloudcontactcenterinsightsv1querymetricsrequest *GoogleCloudContactcenterinsightsV1QueryMetricsRequest) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall { + c := &ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.location = location c.googlecloudcontactcenterinsightsv1querymetricsrequest = googlecloudcontactcenterinsightsv1querymetricsrequest return c @@ -10893,27 +10903,27 @@ func (r *ProjectsLocationsAuthorizedViewSetAuthorizedViewService) QueryMetrics(l // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) Context(ctx context.Context) *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall) Context(ctx context.Context) *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) Header() http.Header { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudcontactcenterinsightsv1querymetricsrequest) @@ -10935,13 +10945,13 @@ func (c *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) doReq return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "contactcenterinsights.projects.locations.authorizedViewSet.authorizedView.queryMetrics" call. +// Do executes the "contactcenterinsights.projects.locations.authorizedViewSets.authorizedViews.queryMetrics" call. // 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 *ProjectsLocationsAuthorizedViewSetAuthorizedViewQueryMetricsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { +func (c *ProjectsLocationsAuthorizedViewSetsAuthorizedViewsQueryMetricsCall) Do(opts ...googleapi.CallOption) (*GoogleLongrunningOperation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { diff --git a/datacatalog/v1/datacatalog-api.json b/datacatalog/v1/datacatalog-api.json index dc2ca82ebe4..1bc3c2ec9e6 100644 --- a/datacatalog/v1/datacatalog-api.json +++ b/datacatalog/v1/datacatalog-api.json @@ -1217,7 +1217,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "datacatalog.projects.locations.operations.cancel", @@ -2285,7 +2285,7 @@ } } }, - "revision": "20241021", + "revision": "20241202", "rootUrl": "https://datacatalog.googleapis.com/", "schemas": { "Binding": { diff --git a/datacatalog/v1/datacatalog-gen.go b/datacatalog/v1/datacatalog-gen.go index f15f336768e..ea93a6fa04a 100644 --- a/datacatalog/v1/datacatalog-gen.go +++ b/datacatalog/v1/datacatalog-gen.go @@ -8314,7 +8314,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/datamigration/v1/datamigration-api.json b/datamigration/v1/datamigration-api.json index 2e5c4853dcd..135bba9ba8f 100644 --- a/datamigration/v1/datamigration-api.json +++ b/datamigration/v1/datamigration-api.json @@ -1339,6 +1339,31 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "fetchSourceObjects": { + "description": "Retrieves objects from the source database that can be selected for data migration. This is applicable for the following migrations: 1. PostgreSQL to Cloud SQL for PostgreSQL 2. PostgreSQL to AlloyDB for PostgreSQL.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:fetchSourceObjects", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.fetchSourceObjects", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name for the migration job for which source objects should be returned.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:fetchSourceObjects", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, "generateSshScript": { "description": "Generate a SSH configuration script to configure the reverse SSH connectivity.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}:generateSshScript", @@ -1764,6 +1789,31 @@ "resources": { "objects": { "methods": { + "get": { + "description": "Use this method to get details about a migration job object.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}/objects/{objectsId}", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.objects.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the migration job object resource to get.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+/objects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "MigrationJobObject" + }, + "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}/migrationJobs/{migrationJobsId}/objects/{objectsId}:getIamPolicy", @@ -1795,6 +1845,70 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, + "list": { + "description": "Use this method to list the objects of a specific migration job.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}/objects", + "httpMethod": "GET", + "id": "datamigration.projects.locations.migrationJobs.objects.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of objects to return. Default is 50. The maximum value is 1000; values above 1000 will be coerced to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Page token received from a previous `ListMigrationJObObjectsRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMigrationJobObjectsRequest` must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent migration job that owns the collection of objects.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/objects", + "response": { + "$ref": "ListMigrationJobObjectsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "lookup": { + "description": "Use this method to look up a migration job object by its source object identifier.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/migrationJobs/{migrationJobsId}/objects:lookup", + "httpMethod": "POST", + "id": "datamigration.projects.locations.migrationJobs.objects.lookup", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent migration job that owns the collection of objects.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/migrationJobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/objects:lookup", + "request": { + "$ref": "LookupMigrationJobObjectRequest" + }, + "response": { + "$ref": "MigrationJobObject" + }, + "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}/migrationJobs/{migrationJobsId}/objects/{objectsId}:setIamPolicy", @@ -1858,7 +1972,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "datamigration.projects.locations.operations.cancel", @@ -2218,7 +2332,7 @@ } } }, - "revision": "20241109", + "revision": "20241202", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AlloyDbConnectionProfile": { @@ -3986,7 +4100,7 @@ "type": "string" }, "requestedCancellation": { - "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", "readOnly": true, "type": "boolean" }, @@ -4249,6 +4363,24 @@ }, "type": "object" }, + "ListMigrationJobObjectsResponse": { + "description": "Response containing the objects for a migration job.", + "id": "ListMigrationJobObjectsResponse", + "properties": { + "migrationJobObjects": { + "description": "List of migration job objects.", + "items": { + "$ref": "MigrationJobObject" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page.", + "type": "string" + } + }, + "type": "object" + }, "ListMigrationJobsResponse": { "description": "Response message for 'ListMigrationJobs' request.", "id": "ListMigrationJobsResponse", @@ -4372,6 +4504,17 @@ "properties": {}, "type": "object" }, + "LookupMigrationJobObjectRequest": { + "description": "Request for looking up a specific migration job object by its source object identifier.", + "id": "LookupMigrationJobObjectRequest", + "properties": { + "sourceObjectIdentifier": { + "$ref": "SourceObjectIdentifier", + "description": "Required. The source object identifier which maps to the migration job object." + } + }, + "type": "object" + }, "MachineConfig": { "description": "MachineConfig describes the configuration of a machine.", "id": "MachineConfig", @@ -4561,6 +4704,13 @@ "description": "Custom engine specific features.", "type": "object" }, + "indices": { + "description": "View indices.", + "items": { + "$ref": "IndexEntity" + }, + "type": "array" + }, "sqlCode": { "description": "The SQL code which creates the view.", "type": "string" @@ -4652,6 +4802,10 @@ "description": "The name (URI) of this migration job resource, in the form of: projects/{project}/locations/{location}/migrationJobs/{migrationJob}.", "type": "string" }, + "objectsConfig": { + "$ref": "MigrationJobObjectsConfig", + "description": "Optional. The objects that need to be migrated." + }, "oracleToPostgresConfig": { "$ref": "OracleToPostgresConfig", "description": "Configuration for heterogeneous **Oracle to Cloud SQL for PostgreSQL** and **Oracle to AlloyDB for PostgreSQL** migrations." @@ -4770,6 +4924,100 @@ }, "type": "object" }, + "MigrationJobObject": { + "description": "A specific Migration Job Object (e.g. a specifc DB Table)", + "id": "MigrationJobObject", + "properties": { + "createTime": { + "description": "Output only. The creation time of the migration job object.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "error": { + "$ref": "Status", + "description": "Output only. The error details in case of failure.", + "readOnly": true + }, + "name": { + "description": "The object's name.", + "type": "string" + }, + "phase": { + "description": "Output only. The phase of the migration job object.", + "enum": [ + "PHASE_UNSPECIFIED", + "FULL_DUMP", + "CDC", + "READY_FOR_PROMOTE", + "PROMOTE_IN_PROGRESS", + "PROMOTED", + "DIFF_BACKUP" + ], + "enumDescriptions": [ + "The phase of the migration job is unknown.", + "The migration job object is in the full dump phase.", + "The migration job object is in CDC phase.", + "The migration job object is ready to be promoted.", + "The migration job object is in running the promote phase.", + "The migration job is promoted.", + "The migration job object is in the differential backup phase." + ], + "readOnly": true, + "type": "string" + }, + "sourceObject": { + "$ref": "SourceObjectIdentifier", + "description": "The object identifier in the data source." + }, + "state": { + "description": "The state of the migration job object.", + "enum": [ + "STATE_UNSPECIFIED", + "NOT_STARTED", + "RUNNING", + "STOPPING", + "STOPPED", + "RESTARTING", + "FAILED", + "REMOVING", + "NOT_SELECTED", + "COMPLETED" + ], + "enumDescriptions": [ + "The state of the migration job object is unknown.", + "The migration job object is not started.", + "The migration job object is running.", + "The migration job object is being stopped.", + "The migration job object is currently stopped.", + "The migration job object is restarting.", + "The migration job object failed.", + "The migration job object is deleting.", + "The migration job object is not selected for migration.", + "The migration job object is completed." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The last update time of the migration job object.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "MigrationJobObjectsConfig": { + "description": "Configuration for the objects to be migrated.", + "id": "MigrationJobObjectsConfig", + "properties": { + "sourceObjectsConfig": { + "$ref": "SourceObjectsConfig", + "description": "The list of the migration job objects." + } + }, + "type": "object" + }, "MigrationJobVerificationError": { "description": "Error message of a verification Migration job.", "id": "MigrationJobVerificationError", @@ -5479,13 +5727,22 @@ "PromoteMigrationJobRequest": { "description": "Request message for 'PromoteMigrationJob' request.", "id": "PromoteMigrationJobRequest", - "properties": {}, + "properties": { + "objectsFilter": { + "$ref": "MigrationJobObjectsConfig", + "description": "Optional. The object filter to apply to the migration job." + } + }, "type": "object" }, "RestartMigrationJobRequest": { "description": "Request message for 'RestartMigrationJob' request.", "id": "RestartMigrationJobRequest", "properties": { + "objectsFilter": { + "$ref": "MigrationJobObjectsConfig", + "description": "Optional. The object filter to apply to the migration job." + }, "skipValidation": { "description": "Optional. Restart the migration job without running prior configuration verification. Defaults to `false`.", "type": "boolean" @@ -5847,6 +6104,68 @@ }, "type": "object" }, + "SourceObjectConfig": { + "description": "Config for a single migration job object.", + "id": "SourceObjectConfig", + "properties": { + "objectIdentifier": { + "$ref": "SourceObjectIdentifier", + "description": "The object identifier." + } + }, + "type": "object" + }, + "SourceObjectIdentifier": { + "description": "An identifier for the Migration Job Object.", + "id": "SourceObjectIdentifier", + "properties": { + "database": { + "description": "The database name. This will be required only if the object uses a database name as part of its unique identifier.", + "type": "string" + }, + "type": { + "description": "Required. The type of the migration job object.", + "enum": [ + "MIGRATION_JOB_OBJECT_TYPE_UNSPECIFIED", + "DATABASE" + ], + "enumDescriptions": [ + "The type of the migration job object is unknown.", + "The migration job object is a database." + ], + "type": "string" + } + }, + "type": "object" + }, + "SourceObjectsConfig": { + "description": "List of configurations for the source objects to be migrated.", + "id": "SourceObjectsConfig", + "properties": { + "objectConfigs": { + "description": "The list of the objects to be migrated.", + "items": { + "$ref": "SourceObjectConfig" + }, + "type": "array" + }, + "objectsSelectionType": { + "description": "Optional. The objects selection type of the migration job.", + "enum": [ + "OBJECTS_SELECTION_TYPE_UNSPECIFIED", + "ALL_OBJECTS", + "SPECIFIED_OBJECTS" + ], + "enumDescriptions": [ + "The type of the objects selection is unknown, indicating that the migration job is at instance level.", + "Migrate all of the objects.", + "Migrate specific objects." + ], + "type": "string" + } + }, + "type": "object" + }, "SourceSqlChange": { "description": "Options to configure rule type SourceSqlChange. The rule is used to alter the sql code for database entities. The rule filter field can refer to one entity. The rule scope can be: StoredProcedure, Function, Trigger, View", "id": "SourceSqlChange", @@ -6022,15 +6341,15 @@ "id": "SqlServerEncryptionOptions", "properties": { "certPath": { - "description": "Required. Path to certificate.", + "description": "Required. Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.", "type": "string" }, "pvkPassword": { - "description": "Required. Input only. Private key password.", + "description": "Required. Input only. Password that encrypts the private key.", "type": "string" }, "pvkPath": { - "description": "Required. Path to certificate private key.", + "description": "Required. Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.", "type": "string" } }, diff --git a/datamigration/v1/datamigration-gen.go b/datamigration/v1/datamigration-gen.go index 9ba428f5ed2..d603a2a8153 100644 --- a/datamigration/v1/datamigration-gen.go +++ b/datamigration/v1/datamigration-gen.go @@ -2202,8 +2202,8 @@ type GoogleCloudClouddmsV1OperationMetadata struct { EndTime string `json:"endTime,omitempty"` // RequestedCancellation: Output only. Identifies whether the user has // requested cancellation of the operation. Operations that have successfully - // been cancelled have Operation.error value with a google.rpc.Status.code of - // 1, corresponding to `Code.CANCELLED`. + // been cancelled have google.longrunning.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"` @@ -2517,6 +2517,35 @@ func (s ListMappingRulesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ListMigrationJobObjectsResponse: Response containing the objects for a +// migration job. +type ListMigrationJobObjectsResponse struct { + // MigrationJobObjects: List of migration job objects. + MigrationJobObjects []*MigrationJobObject `json:"migrationJobObjects,omitempty"` + // NextPageToken: A token, which can be sent as `page_token` to retrieve the + // next 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. "MigrationJobObjects") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationJobObjects") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListMigrationJobObjectsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMigrationJobObjectsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // ListMigrationJobsResponse: Response message for 'ListMigrationJobs' request. type ListMigrationJobsResponse struct { // MigrationJobs: The list of migration jobs objects. @@ -2673,6 +2702,30 @@ func (s LogFileDirectories) MarshalJSON() ([]byte, error) { type LogMiner struct { } +// LookupMigrationJobObjectRequest: Request for looking up a specific migration +// job object by its source object identifier. +type LookupMigrationJobObjectRequest struct { + // SourceObjectIdentifier: Required. The source object identifier which maps to + // the migration job object. + SourceObjectIdentifier *SourceObjectIdentifier `json:"sourceObjectIdentifier,omitempty"` + // ForceSendFields is a list of field names (e.g. "SourceObjectIdentifier") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SourceObjectIdentifier") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s LookupMigrationJobObjectRequest) MarshalJSON() ([]byte, error) { + type NoMethod LookupMigrationJobObjectRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // MachineConfig: MachineConfig describes the configuration of a machine. type MachineConfig struct { // CpuCount: The number of CPU's in the VM instance. @@ -2845,6 +2898,8 @@ func (s MappingRuleFilter) MarshalJSON() ([]byte, error) { type MaterializedViewEntity struct { // CustomFeatures: Custom engine specific features. CustomFeatures googleapi.RawMessage `json:"customFeatures,omitempty"` + // Indices: View indices. + Indices []*IndexEntity `json:"indices,omitempty"` // SqlCode: The SQL code which creates the view. SqlCode string `json:"sqlCode,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomFeatures") to @@ -2929,6 +2984,8 @@ type MigrationJob struct { // Name: The name (URI) of this migration job resource, in the form of: // projects/{project}/locations/{location}/migrationJobs/{migrationJob}. Name string `json:"name,omitempty"` + // ObjectsConfig: Optional. The objects that need to be migrated. + ObjectsConfig *MigrationJobObjectsConfig `json:"objectsConfig,omitempty"` // OracleToPostgresConfig: Configuration for heterogeneous **Oracle to Cloud // SQL for PostgreSQL** and **Oracle to AlloyDB for PostgreSQL** migrations. OracleToPostgresConfig *OracleToPostgresConfig `json:"oracleToPostgresConfig,omitempty"` @@ -3016,6 +3073,89 @@ func (s MigrationJob) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// MigrationJobObject: A specific Migration Job Object (e.g. a specifc DB +// Table) +type MigrationJobObject struct { + // CreateTime: Output only. The creation time of the migration job object. + CreateTime string `json:"createTime,omitempty"` + // Error: Output only. The error details in case of failure. + Error *Status `json:"error,omitempty"` + // Name: The object's name. + Name string `json:"name,omitempty"` + // Phase: Output only. The phase of the migration job object. + // + // Possible values: + // "PHASE_UNSPECIFIED" - The phase of the migration job is unknown. + // "FULL_DUMP" - The migration job object is in the full dump phase. + // "CDC" - The migration job object is in CDC phase. + // "READY_FOR_PROMOTE" - The migration job object is ready to be promoted. + // "PROMOTE_IN_PROGRESS" - The migration job object is in running the promote + // phase. + // "PROMOTED" - The migration job is promoted. + // "DIFF_BACKUP" - The migration job object is in the differential backup + // phase. + Phase string `json:"phase,omitempty"` + // SourceObject: The object identifier in the data source. + SourceObject *SourceObjectIdentifier `json:"sourceObject,omitempty"` + // State: The state of the migration job object. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the migration job object is unknown. + // "NOT_STARTED" - The migration job object is not started. + // "RUNNING" - The migration job object is running. + // "STOPPING" - The migration job object is being stopped. + // "STOPPED" - The migration job object is currently stopped. + // "RESTARTING" - The migration job object is restarting. + // "FAILED" - The migration job object failed. + // "REMOVING" - The migration job object is deleting. + // "NOT_SELECTED" - The migration job object is not selected for migration. + // "COMPLETED" - The migration job object is completed. + State string `json:"state,omitempty"` + // UpdateTime: Output only. The last update time of the migration job object. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MigrationJobObject) MarshalJSON() ([]byte, error) { + type NoMethod MigrationJobObject + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// MigrationJobObjectsConfig: Configuration for the objects to be migrated. +type MigrationJobObjectsConfig struct { + // SourceObjectsConfig: The list of the migration job objects. + SourceObjectsConfig *SourceObjectsConfig `json:"sourceObjectsConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "SourceObjectsConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SourceObjectsConfig") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s MigrationJobObjectsConfig) MarshalJSON() ([]byte, error) { + type NoMethod MigrationJobObjectsConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // MigrationJobVerificationError: Error message of a verification Migration // job. type MigrationJobVerificationError struct { @@ -3857,23 +3997,43 @@ func (s PrivateServiceConnectConnectivity) MarshalJSON() ([]byte, error) { // PromoteMigrationJobRequest: Request message for 'PromoteMigrationJob' // request. type PromoteMigrationJobRequest struct { + // ObjectsFilter: Optional. The object filter to apply to the migration job. + ObjectsFilter *MigrationJobObjectsConfig `json:"objectsFilter,omitempty"` + // ForceSendFields is a list of field names (e.g. "ObjectsFilter") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ObjectsFilter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PromoteMigrationJobRequest) MarshalJSON() ([]byte, error) { + type NoMethod PromoteMigrationJobRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } // RestartMigrationJobRequest: Request message for 'RestartMigrationJob' // request. type RestartMigrationJobRequest struct { + // ObjectsFilter: Optional. The object filter to apply to the migration job. + ObjectsFilter *MigrationJobObjectsConfig `json:"objectsFilter,omitempty"` // SkipValidation: Optional. Restart the migration job without running prior // configuration verification. Defaults to `false`. SkipValidation bool `json:"skipValidation,omitempty"` - // ForceSendFields is a list of field names (e.g. "SkipValidation") to + // ForceSendFields is a list of field names (e.g. "ObjectsFilter") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "SkipValidation") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ObjectsFilter") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -4353,6 +4513,90 @@ func (s SourceNumericFilter) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SourceObjectConfig: Config for a single migration job object. +type SourceObjectConfig struct { + // ObjectIdentifier: The object identifier. + ObjectIdentifier *SourceObjectIdentifier `json:"objectIdentifier,omitempty"` + // ForceSendFields is a list of field names (e.g. "ObjectIdentifier") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ObjectIdentifier") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SourceObjectConfig) MarshalJSON() ([]byte, error) { + type NoMethod SourceObjectConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SourceObjectIdentifier: An identifier for the Migration Job Object. +type SourceObjectIdentifier struct { + // Database: The database name. This will be required only if the object uses a + // database name as part of its unique identifier. + Database string `json:"database,omitempty"` + // Type: Required. The type of the migration job object. + // + // Possible values: + // "MIGRATION_JOB_OBJECT_TYPE_UNSPECIFIED" - The type of the migration job + // object is unknown. + // "DATABASE" - The migration job object is a database. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "Database") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Database") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SourceObjectIdentifier) MarshalJSON() ([]byte, error) { + type NoMethod SourceObjectIdentifier + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// SourceObjectsConfig: List of configurations for the source objects to be +// migrated. +type SourceObjectsConfig struct { + // ObjectConfigs: The list of the objects to be migrated. + ObjectConfigs []*SourceObjectConfig `json:"objectConfigs,omitempty"` + // ObjectsSelectionType: Optional. The objects selection type of the migration + // job. + // + // Possible values: + // "OBJECTS_SELECTION_TYPE_UNSPECIFIED" - The type of the objects selection + // is unknown, indicating that the migration job is at instance level. + // "ALL_OBJECTS" - Migrate all of the objects. + // "SPECIFIED_OBJECTS" - Migrate specific objects. + ObjectsSelectionType string `json:"objectsSelectionType,omitempty"` + // ForceSendFields is a list of field names (e.g. "ObjectConfigs") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ObjectConfigs") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SourceObjectsConfig) MarshalJSON() ([]byte, error) { + type NoMethod SourceObjectsConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SourceSqlChange: Options to configure rule type SourceSqlChange. The rule is // used to alter the sql code for database entities. The rule filter field can // refer to one entity. The rule scope can be: StoredProcedure, Function, @@ -4588,11 +4832,15 @@ func (s SqlServerDatabaseBackup) MarshalJSON() ([]byte, error) { // SqlServerEncryptionOptions: Encryption settings for the SQL Server database. type SqlServerEncryptionOptions struct { - // CertPath: Required. Path to certificate. + // CertPath: Required. Path to the Certificate (.cer) in Cloud Storage, in the + // form `gs://bucketName/fileName`. The instance must have write permissions to + // the bucket and read access to the file. CertPath string `json:"certPath,omitempty"` - // PvkPassword: Required. Input only. Private key password. + // PvkPassword: Required. Input only. Password that encrypts the private key. PvkPassword string `json:"pvkPassword,omitempty"` - // PvkPath: Required. Path to certificate private key. + // PvkPath: Required. Path to the Certificate Private Key (.pvk) in Cloud + // Storage, in the form `gs://bucketName/fileName`. The instance must have + // write permissions to the bucket and read access to the file. PvkPath string `json:"pvkPath,omitempty"` // ForceSendFields is a list of field names (e.g. "CertPath") to // unconditionally include in API requests. By default, fields with empty or @@ -9573,6 +9821,117 @@ func (c *ProjectsLocationsMigrationJobsDemoteDestinationCall) Do(opts ...googlea return ret, nil } +type ProjectsLocationsMigrationJobsFetchSourceObjectsCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// FetchSourceObjects: Retrieves objects from the source database that can be +// selected for data migration. This is applicable for the following +// migrations: 1. PostgreSQL to Cloud SQL for PostgreSQL 2. PostgreSQL to +// AlloyDB for PostgreSQL. +// +// - name: The resource name for the migration job for which source objects +// should be returned. +func (r *ProjectsLocationsMigrationJobsService) FetchSourceObjects(name string) *ProjectsLocationsMigrationJobsFetchSourceObjectsCall { + c := &ProjectsLocationsMigrationJobsFetchSourceObjectsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsFetchSourceObjectsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsFetchSourceObjectsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsFetchSourceObjectsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:fetchSourceObjects") + 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 "datamigration.projects.locations.migrationJobs.fetchSourceObjects" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsMigrationJobsFetchSourceObjectsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsMigrationJobsGenerateSshScriptCall struct { s *Service migrationJob string @@ -11128,32 +11487,140 @@ func (c *ProjectsLocationsMigrationJobsVerifyCall) Do(opts ...googleapi.CallOpti return ret, nil } -type ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall struct { +type ProjectsLocationsMigrationJobsObjectsGetCall 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: Use this method to get details about a migration job object. // -// - 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 *ProjectsLocationsMigrationJobsObjectsService) GetIamPolicy(resource string) *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall { - c := &ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The name of the migration job object resource to get. +func (r *ProjectsLocationsMigrationJobsObjectsService) Get(name string) *ProjectsLocationsMigrationJobsObjectsGetCall { + c := &ProjectsLocationsMigrationJobsObjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name 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 +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMigrationJobsObjectsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsObjectsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsMigrationJobsObjectsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsObjectsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMigrationJobsObjectsGetCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsObjectsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMigrationJobsObjectsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigrationJobsObjectsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "datamigration.projects.locations.migrationJobs.objects.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *MigrationJobObject.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsMigrationJobsObjectsGetCall) Do(opts ...googleapi.CallOption) (*MigrationJobObject, 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 := &MigrationJobObject{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall 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 *ProjectsLocationsMigrationJobsObjectsService) GetIamPolicy(resource string) *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall { + c := &ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall{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 @@ -11255,6 +11722,256 @@ func (c *ProjectsLocationsMigrationJobsObjectsGetIamPolicyCall) Do(opts ...googl return ret, nil } +type ProjectsLocationsMigrationJobsObjectsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Use this method to list the objects of a specific migration job. +// +// - parent: The parent migration job that owns the collection of objects. +func (r *ProjectsLocationsMigrationJobsObjectsService) List(parent string) *ProjectsLocationsMigrationJobsObjectsListCall { + c := &ProjectsLocationsMigrationJobsObjectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of objects +// to return. Default is 50. The maximum value is 1000; values above 1000 will +// be coerced to 1000. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) PageSize(pageSize int64) *ProjectsLocationsMigrationJobsObjectsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous `ListMigrationJObObjectsRequest` call. Provide this to retrieve +// the subsequent page. When paginating, all other parameters provided to +// `ListMigrationJobObjectsRequest` must match the call that provided the page +// token. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) PageToken(pageToken string) *ProjectsLocationsMigrationJobsObjectsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsObjectsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsMigrationJobsObjectsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsObjectsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigrationJobsObjectsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/objects") + 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 "datamigration.projects.locations.migrationJobs.objects.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListMigrationJobObjectsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) Do(opts ...googleapi.CallOption) (*ListMigrationJobObjectsResponse, 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 := &ListMigrationJobObjectsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsMigrationJobsObjectsListCall) Pages(ctx context.Context, f func(*ListMigrationJobObjectsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsMigrationJobsObjectsLookupCall struct { + s *Service + parent string + lookupmigrationjobobjectrequest *LookupMigrationJobObjectRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Lookup: Use this method to look up a migration job object by its source +// object identifier. +// +// - parent: The parent migration job that owns the collection of objects. +func (r *ProjectsLocationsMigrationJobsObjectsService) Lookup(parent string, lookupmigrationjobobjectrequest *LookupMigrationJobObjectRequest) *ProjectsLocationsMigrationJobsObjectsLookupCall { + c := &ProjectsLocationsMigrationJobsObjectsLookupCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.lookupmigrationjobobjectrequest = lookupmigrationjobobjectrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsMigrationJobsObjectsLookupCall) Fields(s ...googleapi.Field) *ProjectsLocationsMigrationJobsObjectsLookupCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsMigrationJobsObjectsLookupCall) Context(ctx context.Context) *ProjectsLocationsMigrationJobsObjectsLookupCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsMigrationJobsObjectsLookupCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsMigrationJobsObjectsLookupCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.lookupmigrationjobobjectrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/objects:lookup") + 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 "datamigration.projects.locations.migrationJobs.objects.lookup" call. +// Any non-2xx status code is an error. Response headers are in either +// *MigrationJobObject.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsMigrationJobsObjectsLookupCall) Do(opts ...googleapi.CallOption) (*MigrationJobObject, 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 := &MigrationJobObject{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsMigrationJobsObjectsSetIamPolicyCall struct { s *Service resource string @@ -11485,7 +12202,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/discoveryengine/v1/discoveryengine-api.json b/discoveryengine/v1/discoveryengine-api.json index 86b662e15b6..02f0d138268 100644 --- a/discoveryengine/v1/discoveryengine-api.json +++ b/discoveryengine/v1/discoveryengine-api.json @@ -1967,7 +1967,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -3593,7 +3593,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -5366,7 +5366,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -6341,7 +6341,7 @@ } } }, - "revision": "20241205", + "revision": "20241206", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -6851,13 +6851,15 @@ "STATE_UNSPECIFIED", "IN_PROGRESS", "FAILED", - "SUCCEEDED" + "SUCCEEDED", + "STREAMING" ], "enumDescriptions": [ "Unknown.", "Answer generation is currently in progress.", "Answer generation currently failed.", - "Answer generation has succeeded." + "Answer generation has succeeded.", + "Answer generation is currently in progress." ], "type": "string" }, @@ -12928,13 +12930,15 @@ "STATE_UNSPECIFIED", "IN_PROGRESS", "FAILED", - "SUCCEEDED" + "SUCCEEDED", + "STREAMING" ], "enumDescriptions": [ "Unknown.", "Answer generation is currently in progress.", "Answer generation currently failed.", - "Answer generation has succeeded." + "Answer generation has succeeded.", + "Answer generation is currently in progress." ], "type": "string" }, @@ -15281,7 +15285,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "type": "string" }, "pageSize": { diff --git a/discoveryengine/v1/discoveryengine-gen.go b/discoveryengine/v1/discoveryengine-gen.go index b962aa081fd..4a3a2d119c4 100644 --- a/discoveryengine/v1/discoveryengine-gen.go +++ b/discoveryengine/v1/discoveryengine-gen.go @@ -1656,6 +1656,7 @@ type GoogleCloudDiscoveryengineV1Answer struct { // "IN_PROGRESS" - Answer generation is currently in progress. // "FAILED" - Answer generation currently failed. // "SUCCEEDED" - Answer generation has succeeded. + // "STREAMING" - Answer generation is currently in progress. State string `json:"state,omitempty"` // Steps: Answer generation steps. Steps []*GoogleCloudDiscoveryengineV1AnswerStep `json:"steps,omitempty"` @@ -10354,6 +10355,7 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "IN_PROGRESS" - Answer generation is currently in progress. // "FAILED" - Answer generation currently failed. // "SUCCEEDED" - Answer generation has succeeded. + // "STREAMING" - Answer generation is currently in progress. State string `json:"state,omitempty"` // Steps: Answer generation steps. Steps []*GoogleCloudDiscoveryengineV1alphaAnswerStep `json:"steps,omitempty"` @@ -13539,8 +13541,9 @@ type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { Filter string `json:"filter,omitempty"` // 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` * `session_name` Example: "update_time desc" - // "create_time" + // `update_time` * `create_time` * `session_name` * `is_pinned` Example: * + // "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list + // sessions by is_pinned first, then by update_time. OrderBy string `json:"orderBy,omitempty"` // PageSize: Maximum number of results to return. If unspecified, defaults to // 50. Max allowed value is 1000. @@ -27115,7 +27118,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter s // 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` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -33120,7 +33125,9 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter stri // 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` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -39625,7 +39632,9 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *Pro // 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` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c diff --git a/discoveryengine/v1alpha/discoveryengine-api.json b/discoveryengine/v1alpha/discoveryengine-api.json index f2b363cd040..23e27974a41 100644 --- a/discoveryengine/v1alpha/discoveryengine-api.json +++ b/discoveryengine/v1alpha/discoveryengine-api.json @@ -2522,7 +2522,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -4435,7 +4435,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -6482,7 +6482,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -8156,7 +8156,7 @@ } } }, - "revision": "20241205", + "revision": "20241206", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -10935,13 +10935,15 @@ "STATE_UNSPECIFIED", "IN_PROGRESS", "FAILED", - "SUCCEEDED" + "SUCCEEDED", + "STREAMING" ], "enumDescriptions": [ "Unknown.", "Answer generation is currently in progress.", "Answer generation currently failed.", - "Answer generation has succeeded." + "Answer generation has succeeded.", + "Answer generation is currently in progress." ], "type": "string" }, @@ -15566,7 +15568,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "type": "string" }, "pageSize": { diff --git a/discoveryengine/v1alpha/discoveryengine-gen.go b/discoveryengine/v1alpha/discoveryengine-gen.go index 91fe69cbaf3..2713f2476db 100644 --- a/discoveryengine/v1alpha/discoveryengine-gen.go +++ b/discoveryengine/v1alpha/discoveryengine-gen.go @@ -4917,6 +4917,7 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "IN_PROGRESS" - Answer generation is currently in progress. // "FAILED" - Answer generation currently failed. // "SUCCEEDED" - Answer generation has succeeded. + // "STREAMING" - Answer generation is currently in progress. State string `json:"state,omitempty"` // Steps: Answer generation steps. Steps []*GoogleCloudDiscoveryengineV1alphaAnswerStep `json:"steps,omitempty"` @@ -11500,8 +11501,9 @@ type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { Filter string `json:"filter,omitempty"` // 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` * `session_name` Example: "update_time desc" - // "create_time" + // `update_time` * `create_time` * `session_name` * `is_pinned` Example: * + // "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list + // sessions by is_pinned first, then by update_time. OrderBy string `json:"orderBy,omitempty"` // PageSize: Maximum number of results to return. If unspecified, defaults to // 50. Max allowed value is 1000. @@ -29978,7 +29980,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter s // 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` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -37081,7 +37085,9 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter stri // 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` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -44595,7 +44601,9 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *Pro // 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` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c diff --git a/discoveryengine/v1beta/discoveryengine-api.json b/discoveryengine/v1beta/discoveryengine-api.json index 8258b95e126..e32b7048395 100644 --- a/discoveryengine/v1beta/discoveryengine-api.json +++ b/discoveryengine/v1beta/discoveryengine-api.json @@ -2060,7 +2060,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -3920,7 +3920,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -5786,7 +5786,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "location": "query", "type": "string" }, @@ -7354,7 +7354,7 @@ } } }, - "revision": "20241205", + "revision": "20241206", "rootUrl": "https://discoveryengine.googleapis.com/", "schemas": { "GoogleApiDistribution": { @@ -9872,13 +9872,15 @@ "STATE_UNSPECIFIED", "IN_PROGRESS", "FAILED", - "SUCCEEDED" + "SUCCEEDED", + "STREAMING" ], "enumDescriptions": [ "Unknown.", "Answer generation is currently in progress.", "Answer generation currently failed.", - "Answer generation has succeeded." + "Answer generation has succeeded.", + "Answer generation is currently in progress." ], "type": "string" }, @@ -12225,7 +12227,7 @@ "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` * `session_name` Example: \"update_time desc\" \"create_time\"", + "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` * `session_name` * `is_pinned` Example: * \"update_time desc\" * \"create_time\" * \"is_pinned desc,update_time desc\": list sessions by is_pinned first, then by update_time.", "type": "string" }, "pageSize": { @@ -14339,13 +14341,15 @@ "STATE_UNSPECIFIED", "IN_PROGRESS", "FAILED", - "SUCCEEDED" + "SUCCEEDED", + "STREAMING" ], "enumDescriptions": [ "Unknown.", "Answer generation is currently in progress.", "Answer generation currently failed.", - "Answer generation has succeeded." + "Answer generation has succeeded.", + "Answer generation is currently in progress." ], "type": "string" }, diff --git a/discoveryengine/v1beta/discoveryengine-gen.go b/discoveryengine/v1beta/discoveryengine-gen.go index 9f263cac975..36a615c0eb5 100644 --- a/discoveryengine/v1beta/discoveryengine-gen.go +++ b/discoveryengine/v1beta/discoveryengine-gen.go @@ -4485,6 +4485,7 @@ type GoogleCloudDiscoveryengineV1alphaAnswer struct { // "IN_PROGRESS" - Answer generation is currently in progress. // "FAILED" - Answer generation currently failed. // "SUCCEEDED" - Answer generation has succeeded. + // "STREAMING" - Answer generation is currently in progress. State string `json:"state,omitempty"` // Steps: Answer generation steps. Steps []*GoogleCloudDiscoveryengineV1alphaAnswerStep `json:"steps,omitempty"` @@ -7670,8 +7671,9 @@ type GoogleCloudDiscoveryengineV1alphaListSessionsRequest struct { Filter string `json:"filter,omitempty"` // 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` * `session_name` Example: "update_time desc" - // "create_time" + // `update_time` * `create_time` * `session_name` * `is_pinned` Example: * + // "update_time desc" * "create_time" * "is_pinned desc,update_time desc": list + // sessions by is_pinned first, then by update_time. OrderBy string `json:"orderBy,omitempty"` // PageSize: Maximum number of results to return. If unspecified, defaults to // 50. Max allowed value is 1000. @@ -10637,6 +10639,7 @@ type GoogleCloudDiscoveryengineV1betaAnswer struct { // "IN_PROGRESS" - Answer generation is currently in progress. // "FAILED" - Answer generation currently failed. // "SUCCEEDED" - Answer generation has succeeded. + // "STREAMING" - Answer generation is currently in progress. State string `json:"state,omitempty"` // Steps: Answer generation steps. Steps []*GoogleCloudDiscoveryengineV1betaAnswerStep `json:"steps,omitempty"` @@ -28199,7 +28202,9 @@ func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) Filter(filter s // 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` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -35088,7 +35093,9 @@ func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) Filter(filter stri // 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` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsCollectionsEnginesSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsCollectionsEnginesSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c @@ -41960,7 +41967,9 @@ func (c *ProjectsLocationsDataStoresSessionsListCall) Filter(filter string) *Pro // 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` * -// `session_name` Example: "update_time desc" "create_time" +// `session_name` * `is_pinned` Example: * "update_time desc" * "create_time" * +// "is_pinned desc,update_time desc": list sessions by is_pinned first, then by +// update_time. func (c *ProjectsLocationsDataStoresSessionsListCall) OrderBy(orderBy string) *ProjectsLocationsDataStoresSessionsListCall { c.urlParams_.Set("orderBy", orderBy) return c diff --git a/metastore/v1/metastore-api.json b/metastore/v1/metastore-api.json index 285cb4beabb..d39534b5768 100644 --- a/metastore/v1/metastore-api.json +++ b/metastore/v1/metastore-api.json @@ -1684,7 +1684,7 @@ } } }, - "revision": "20240709", + "revision": "20241203", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -3023,7 +3023,7 @@ "type": "string" }, "requestedCancellation": { - "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", "readOnly": true, "type": "boolean" }, @@ -3166,7 +3166,7 @@ "type": "object" }, "RestoreServiceRequest": { - "description": "Request message for DataprocMetastore.Restore.", + "description": "Request message for DataprocMetastore.RestoreService.", "id": "RestoreServiceRequest", "properties": { "backup": { diff --git a/metastore/v1/metastore-gen.go b/metastore/v1/metastore-gen.go index 88b915477a6..352fe6830ed 100644 --- a/metastore/v1/metastore-gen.go +++ b/metastore/v1/metastore-gen.go @@ -2003,8 +2003,8 @@ type OperationMetadata struct { EndTime string `json:"endTime,omitempty"` // RequestedCancellation: Output only. Identifies whether the caller has // requested cancellation of the operation. Operations that have successfully - // been cancelled have Operation.error value with a google.rpc.Status.code of - // 1, corresponding to Code.CANCELLED. + // been cancelled have google.longrunning.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"` @@ -2220,7 +2220,7 @@ func (s Restore) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// RestoreServiceRequest: Request message for DataprocMetastore.Restore. +// RestoreServiceRequest: Request message for DataprocMetastore.RestoreService. type RestoreServiceRequest struct { // Backup: Optional. The relative resource name of the metastore service backup // to restore from, in the following diff --git a/metastore/v1beta/metastore-api.json b/metastore/v1beta/metastore-api.json index ff69ee57cfe..8c976108a52 100644 --- a/metastore/v1beta/metastore-api.json +++ b/metastore/v1beta/metastore-api.json @@ -1796,7 +1796,7 @@ } } }, - "revision": "20240709", + "revision": "20241203", "rootUrl": "https://metastore.googleapis.com/", "schemas": { "AlterMetadataResourceLocationRequest": { @@ -3232,7 +3232,7 @@ "type": "string" }, "requestedCancellation": { - "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", "readOnly": true, "type": "boolean" }, @@ -3397,7 +3397,7 @@ "type": "object" }, "RestoreServiceRequest": { - "description": "Request message for DataprocMetastore.Restore.", + "description": "Request message for DataprocMetastore.RestoreService.", "id": "RestoreServiceRequest", "properties": { "backup": { diff --git a/metastore/v1beta/metastore-gen.go b/metastore/v1beta/metastore-gen.go index 4ad857d7b6f..274af995d52 100644 --- a/metastore/v1beta/metastore-gen.go +++ b/metastore/v1beta/metastore-gen.go @@ -2163,8 +2163,8 @@ type OperationMetadata struct { EndTime string `json:"endTime,omitempty"` // RequestedCancellation: Output only. Identifies whether the caller has // requested cancellation of the operation. Operations that have successfully - // been cancelled have Operation.error value with a google.rpc.Status.code of - // 1, corresponding to Code.CANCELLED. + // been cancelled have google.longrunning.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"` @@ -2430,7 +2430,7 @@ func (s Restore) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// RestoreServiceRequest: Request message for DataprocMetastore.Restore. +// RestoreServiceRequest: Request message for DataprocMetastore.RestoreService. type RestoreServiceRequest struct { // Backup: Optional. The relative resource name of the metastore service backup // to restore from, in the following diff --git a/metastore/v2alpha/metastore-api.json b/metastore/v2alpha/metastore-api.json new file mode 100644 index 00000000000..05153aa7600 --- /dev/null +++ b/metastore/v2alpha/metastore-api.json @@ -0,0 +1,2313 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://metastore.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Dataproc Metastore", + "description": "The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/dataproc-metastore/docs", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "metastore:v2alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://metastore.mtls.googleapis.com/", + "name": "metastore", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "services": { + "methods": { + "alterLocation": { + "description": "Alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata resource and does not transfer any existing data to the new location.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterLocation", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterLocation", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:alterLocation", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "alterTableProperties": { + "description": "Alter metadata table properties.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterTableProperties", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterTableProperties", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the Dataproc Metastore service that's being used to mutate metadata table properties, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:alterTableProperties", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "cancelMigration": { + "description": "Cancels the ongoing Managed Migration process.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:cancelMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.cancelMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to cancel the ongoing migration to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:cancelMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaCancelMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "completeMigration": { + "description": "Completes the managed migration process. The Dataproc Metastore service will switch to using its own backend database after successful migration.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:completeMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.completeMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to complete the migration to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:completeMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaCompleteMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a metastore service in a project and location.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "serviceId": { + "description": "Required. The ID of the metastore service, which is used as the final component of the metastore service's name.This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+parent}/services", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaService" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "exportMetadata": { + "description": "Exports metadata from a service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:exportMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.exportMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:exportMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaExportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a single service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaService" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "importMetadata": { + "description": "Imports Metadata into a Dataproc Metastore service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:importMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.importMetadata", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service to run import, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}:importMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaImportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists services in a project and location.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/services", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaListServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "moveTableToDatabase": { + "description": "Move a table to another database.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:moveTableToDatabase", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.moveTableToDatabase", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:moveTableToDatabase", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "PATCH", + "id": "metastore.projects.locations.services.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. A field mask used to specify the fields to be overwritten in the metastore service resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaService" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "queryMetadata": { + "description": "Query Dataproc Metastore metadata.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:queryMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.queryMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to query metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:queryMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaQueryMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "removeIamPolicy": { + "description": "Removes the attached IAM policies for a resource", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/{servicesId1}:removeIamPolicy", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.removeIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "Required. The relative resource name of the dataplane resource to remove IAM policy, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id} or projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/.*$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+resource}:removeIamPolicy", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest" + }, + "response": { + "$ref": "GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a service from a backup.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:restore", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.restore", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run restore, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:restore", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaRestoreServiceRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "startMigration": { + "description": "Starts the Managed Migration process.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:startMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.startMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to start migrating to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+service}:startMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaStartMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a new backup in a given project and location.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. The ID of the backup, which is used as the final component of the backup's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service in which to create a backup of the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+parent}/backups", + "request": { + "$ref": "GoogleCloudMetastoreV2alphaBackup" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single backup.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single backup.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaBackup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists backups in a service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of backups to return. The response may contain less than the maximum number. If unspecified, no more than 500 backups are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListBackups call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListBackups must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose backups to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/backups", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "migrationExecutions": { + "methods": { + "delete": { + "description": "Deletes a single migration execution.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.migrationExecutions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the migrationExecution to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single migration execution.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.migrationExecutions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the migration execution to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaMigrationExecution" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists migration executions on a service.", + "flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.migrationExecutions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of migration executions to return. The response may contain less than the maximum number. If unspecified, no more than 500 migration executions are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListMigrationExecutions call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListMigrationExecutions must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose migration executions to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2alpha/{+parent}/migrationExecutions", + "response": { + "$ref": "GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20241203", + "rootUrl": "https://metastore.googleapis.com/", + "schemas": { + "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1CustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1CustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1ErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1ErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1HiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1HiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1LocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1LocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1CustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1MultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1HiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1MoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1MoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1MultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1MultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1OperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1QueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1QueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1alphaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1alphaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1alphaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1alphaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1betaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1betaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1betaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1betaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1betaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1betaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest": { + "description": "Request message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest", + "properties": { + "locationUri": { + "description": "Required. The new location URI for the metadata resource.", + "type": "string" + }, + "resourceName": { + "description": "Required. The relative metadata resource name in the following format.databases/{database_id} or databases/{database_id}/tables/{table_id} or databases/{database_id}/tables/{table_id}/partitions/{partition_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest": { + "description": "Request message for DataprocMetastore.AlterTableProperties.", + "id": "GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest", + "properties": { + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that describes the desired values to mutate. If update_mask is empty, the properties will not update. Otherwise, the properties only alters the value whose associated paths exist in the update mask", + "type": "object" + }, + "tableName": { + "description": "Required. The name of the table containing the properties you're altering in the following format.databases/{database_id}/tables/{table_id}", + "type": "string" + }, + "updateMask": { + "description": "A field mask that specifies the metadata table properties that are overwritten by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.For example, given the target properties: properties { a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if the field mask is:paths: \"properties.b\", \"properties.c\"then the result will be: properties { a: 1 b: 3 c: 4 } ", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaAutoscalingConfig": { + "description": "Represents the autoscaling configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2alphaAutoscalingConfig", + "properties": { + "autoscalingEnabled": { + "description": "Optional. Whether or not autoscaling is enabled for this service.", + "type": "boolean" + }, + "autoscalingFactor": { + "description": "Output only. The scaling factor of a service with autoscaling enabled.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "limitConfig": { + "$ref": "GoogleCloudMetastoreV2alphaLimitConfig", + "description": "Optional. The LimitConfig of the service." + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig": { + "description": "Configuration information for the auxiliary service versions.", + "id": "GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig", + "properties": { + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "A mapping of Hive metastore configuration key-value pairs to apply to the auxiliary Hive metastore (configured in hive-site.xml) in addition to the primary version's overrides. If keys are present in both the auxiliary version's overrides and the primary version's overrides, the value from the auxiliary version's overrides takes precedence.", + "type": "object" + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the auxiliary metastore service, includes version and region data.", + "items": { + "$ref": "GoogleCloudMetastoreV2alphaEndpoint" + }, + "readOnly": true, + "type": "array" + }, + "version": { + "description": "The Hive metastore version of the auxiliary service. It must be less than the primary Hive metastore service's version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaBackup": { + "description": "The details of a backup resource.", + "id": "GoogleCloudMetastoreV2alphaBackup", + "properties": { + "createTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the backup.", + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the backup finished creating.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}", + "type": "string" + }, + "restoringServices": { + "description": "Output only. Services that are restoring from the backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "serviceRevision": { + "$ref": "GoogleCloudMetastoreV2alphaService", + "description": "Output only. The revision of the service at the time of backup.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "DELETING", + "ACTIVE", + "FAILED", + "RESTORING" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is being created.", + "The backup is being deleted.", + "The backup is active and ready to use.", + "The backup failed.", + "The backup is being restored." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaCancelMigrationRequest": { + "description": "Request message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV2alphaCancelMigrationRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaCdcConfig": { + "description": "Configuration information to start the Change Data Capture (CDC) streams from customer database to backend database of Dataproc Metastore.", + "id": "GoogleCloudMetastoreV2alphaCdcConfig", + "properties": { + "bucket": { + "description": "Optional. The bucket to write the intermediate stream event data in. The bucket name must be without any prefix like \"gs://\". See the bucket naming requirements (https://cloud.google.com/storage/docs/buckets#naming). This field is optional. If not set, the Artifacts Cloud Storage bucket will be used.", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Datastream service should use for the MySQL connection. This field is not returned on request.", + "type": "string" + }, + "reverseProxySubnet": { + "description": "Required. The URL of the subnetwork resource to create the VM instance hosting the reverse proxy in. More context in https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy The subnetwork should reside in the network provided in the request that Datastream will peer to and should be in the same region as Datastream, in the following format. projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "rootPath": { + "description": "Optional. The root path inside the Cloud Storage bucket. The stream event data will be written to this path. The default value is /migration.", + "type": "string" + }, + "subnetIpRange": { + "description": "Required. A /29 CIDR IP range for peering with datastream.", + "type": "string" + }, + "username": { + "description": "Required. The username that the Datastream service should use for the MySQL connection.", + "type": "string" + }, + "vpcNetwork": { + "description": "Required. Fully qualified name of the Cloud SQL instance's VPC network or the shared VPC network that Datastream will peer to, in the following format: projects/{project_id}/locations/global/networks/{network_id}. More context in https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig": { + "description": "Configuration information to establish customer database connection before the cutover phase of migration", + "id": "GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig", + "properties": { + "hiveDatabaseName": { + "description": "Required. The hive database name.", + "type": "string" + }, + "instanceConnectionName": { + "description": "Required. Cloud SQL database connection name (project_id:region:instance_name)", + "type": "string" + }, + "ipAddress": { + "description": "Required. The private IP address of the Cloud SQL instance.", + "type": "string" + }, + "natSubnet": { + "description": "Required. The relative resource name of the subnetwork to be used for Private Service Connect. Note that this cannot be a regular subnet and is used only for NAT. (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets) This subnet is used to publish the SOCKS5 proxy service. The subnet size must be at least /29 and it should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Dataproc Metastore service will be using to connect to the database. This field is not returned on request.", + "type": "string" + }, + "port": { + "description": "Required. The network port of the database.", + "format": "int32", + "type": "integer" + }, + "proxySubnet": { + "description": "Required. The relative resource name of the subnetwork to deploy the SOCKS5 proxy service in. The subnetwork should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "username": { + "description": "Required. The username that Dataproc Metastore service will use to connect to the database.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig": { + "description": "Configuration information for migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore.", + "id": "GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig", + "properties": { + "cdcConfig": { + "$ref": "GoogleCloudMetastoreV2alphaCdcConfig", + "description": "Required. Configuration information to start the Change Data Capture (CDC) streams from customer database to backend database of Dataproc Metastore. Dataproc Metastore switches to using its backend database after the cutover phase of migration." + }, + "cloudSqlConnectionConfig": { + "$ref": "GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig", + "description": "Required. Configuration information to establish customer database connection before the cutover phase of migration" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaCompleteMigrationRequest": { + "description": "Request message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV2alphaCompleteMigrationRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaDataCatalogConfig": { + "description": "Specifies how metastore metadata should be integrated with the Data Catalog service.", + "id": "GoogleCloudMetastoreV2alphaDataCatalogConfig", + "properties": { + "enabled": { + "description": "Optional. Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaDatabaseDump": { + "description": "A specification of the location of and metadata about a database dump from a relational database management system.", + "id": "GoogleCloudMetastoreV2alphaDatabaseDump", + "properties": { + "gcsUri": { + "description": "Required. A Cloud Storage object or folder URI that specifies the source from which to import metadata. It must begin with gs://.", + "type": "string" + }, + "type": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaEncryptionConfig": { + "description": "Encryption settings for the service.", + "id": "GoogleCloudMetastoreV2alphaEncryptionConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaEndpoint": { + "description": "An endpoint used to access the metastore service.", + "id": "GoogleCloudMetastoreV2alphaEndpoint", + "properties": { + "endpointUri": { + "description": "Output only. The URI of the endpoint used to access the metastore service.", + "readOnly": true, + "type": "string" + }, + "region": { + "description": "Output only. The region where the endpoint is located.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaExportMetadataRequest": { + "description": "Request message for DataprocMetastore.ExportMetadata.", + "id": "GoogleCloudMetastoreV2alphaExportMetadataRequest", + "properties": { + "databaseDumpType": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + }, + "destinationGcsFolder": { + "description": "A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaHiveMetastoreConfig": { + "description": "Specifies configuration information specific to running Hive metastore software as the metastore service.", + "id": "GoogleCloudMetastoreV2alphaHiveMetastoreConfig", + "properties": { + "auxiliaryVersions": { + "additionalProperties": { + "$ref": "GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig" + }, + "description": "Optional. A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen.", + "type": "object" + }, + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig.", + "type": "object" + }, + "endpointProtocol": { + "description": "Optional. The protocol to use for the metastore service endpoint. If unspecified, defaults to GRPC.", + "enum": [ + "ENDPOINT_PROTOCOL_UNSPECIFIED", + "THRIFT", + "GRPC" + ], + "enumDescriptions": [ + "The protocol is not set.", + "Use the legacy Apache Thrift protocol for the metastore service endpoint.", + "Use the modernized gRPC protocol for the metastore service endpoint." + ], + "type": "string" + }, + "version": { + "description": "Immutable. The Hive metastore schema version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaImportMetadataRequest": { + "description": "Request message for DataprocMetastore.CreateMetadataImport.", + "id": "GoogleCloudMetastoreV2alphaImportMetadataRequest", + "properties": { + "databaseDump": { + "$ref": "GoogleCloudMetastoreV2alphaDatabaseDump", + "description": "Immutable. A database dump from a pre-existing metastore's database." + }, + "description": { + "description": "Optional. The description of the metadata import.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaLatestBackup": { + "description": "The details of the latest scheduled backup.", + "id": "GoogleCloudMetastoreV2alphaLatestBackup", + "properties": { + "backupId": { + "description": "Output only. The ID of an in-progress scheduled backup. Empty if no backup is in progress.", + "readOnly": true, + "type": "string" + }, + "duration": { + "description": "Output only. The duration of the backup completion.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is in progress.", + "The backup completed.", + "The backup failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaLimitConfig": { + "description": "Represents the autoscaling limit configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2alphaLimitConfig", + "properties": { + "maxScalingFactor": { + "description": "Optional. The highest scaling factor that the service should be autoscaled to.", + "format": "int32", + "type": "integer" + }, + "minScalingFactor": { + "description": "Optional. The lowest scaling factor that the service should be autoscaled to.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaListBackupsResponse": { + "description": "Response message for DataprocMetastore.ListBackups.", + "id": "GoogleCloudMetastoreV2alphaListBackupsResponse", + "properties": { + "backups": { + "description": "The backups of the specified service.", + "items": { + "$ref": "GoogleCloudMetastoreV2alphaBackup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that 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.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse": { + "description": "Response message for DataprocMetastore.ListMigrationExecutions.", + "id": "GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse", + "properties": { + "migrationExecutions": { + "description": "The migration executions on the specified service.", + "items": { + "$ref": "GoogleCloudMetastoreV2alphaMigrationExecution" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that 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.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaListServicesResponse": { + "description": "Response message for DataprocMetastore.ListServices.", + "id": "GoogleCloudMetastoreV2alphaListServicesResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "services": { + "description": "The services in the specified location.", + "items": { + "$ref": "GoogleCloudMetastoreV2alphaService" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaMetadataIntegration": { + "description": "Specifies how metastore metadata should be integrated with external services.", + "id": "GoogleCloudMetastoreV2alphaMetadataIntegration", + "properties": { + "dataCatalogConfig": { + "$ref": "GoogleCloudMetastoreV2alphaDataCatalogConfig", + "description": "Optional. The integration config for the Data Catalog service." + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaMigrationExecution": { + "description": "The details of a migration execution resource.", + "id": "GoogleCloudMetastoreV2alphaMigrationExecution", + "properties": { + "cloudSqlMigrationConfig": { + "$ref": "GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig", + "description": "Configuration information specific to migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore." + }, + "createTime": { + "description": "Output only. The time when the migration execution was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the migration execution finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The relative resource name of the migration execution, in the following form: projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}", + "readOnly": true, + "type": "string" + }, + "phase": { + "description": "Output only. The current phase of the migration execution.", + "enum": [ + "PHASE_UNSPECIFIED", + "REPLICATION", + "CUTOVER" + ], + "enumDescriptions": [ + "The phase of the migration execution is unknown.", + "Replication phase refers to the migration phase when Dataproc Metastore is running a pipeline to replicate changes in the customer database to its backend database. During this phase, Dataproc Metastore uses the customer database as the hive metastore backend database.", + "Cutover phase refers to the migration phase when Dataproc Metastore switches to using its own backend database. Migration enters this phase when customer is done migrating all their clusters/workloads to Dataproc Metastore and triggers CompleteMigration." + ], + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the migration execution.", + "enum": [ + "STATE_UNSPECIFIED", + "STARTING", + "RUNNING", + "CANCELLING", + "AWAITING_USER_ACTION", + "SUCCEEDED", + "FAILED", + "CANCELLED", + "DELETING" + ], + "enumDescriptions": [ + "The state of the migration execution is unknown.", + "The migration execution is starting.", + "The migration execution is running.", + "The migration execution is in the process of being cancelled.", + "The migration execution is awaiting user action.", + "The migration execution has completed successfully.", + "The migration execution has failed.", + "The migration execution is cancelled.", + "The migration execution is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the migration execution.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest": { + "description": "Request message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest", + "properties": { + "dbName": { + "description": "Required. The name of the database where the table resides.", + "type": "string" + }, + "destinationDbName": { + "description": "Required. The name of the database where the table should be moved.", + "type": "string" + }, + "tableName": { + "description": "Required. The name of the table to be moved.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaQueryMetadataRequest": { + "description": "Request message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV2alphaQueryMetadataRequest", + "properties": { + "query": { + "description": "Required. A read-only SQL query to execute against the metadata database. The query cannot change or mutate the data.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest": { + "description": "Request message for DataprocMetastore.RemoveIamPolicy.", + "id": "GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest", + "properties": { + "asynchronous": { + "description": "Optional. Removes IAM policy attached to database or table asynchronously when it is set. The default is false.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse": { + "description": "Response message for DataprocMetastore.RemoveIamPolicy.", + "id": "GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse", + "properties": { + "success": { + "description": "True if the policy is successfully removed.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaRestoreServiceRequest": { + "description": "Request message for DataprocMetastore.Restore.", + "id": "GoogleCloudMetastoreV2alphaRestoreServiceRequest", + "properties": { + "backup": { + "description": "Optional. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}. Mutually exclusive with backup_location, and exactly one of the two must be set.", + "type": "string" + }, + "backupLocation": { + "description": "Optional. A Cloud Storage URI specifying the location of the backup artifacts, namely - backup avro files under \"avro/\", backup_metastore.json and service.json, in the following form:gs://. Mutually exclusive with backup, and exactly one of the two must be set.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + }, + "restoreType": { + "description": "Optional. The type of restore. If unspecified, defaults to METADATA_ONLY.", + "enum": [ + "RESTORE_TYPE_UNSPECIFIED", + "FULL", + "METADATA_ONLY" + ], + "enumDescriptions": [ + "The restore type is unknown.", + "The service's metadata and configuration are restored.", + "Only the service's metadata is restored." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaScalingConfig": { + "description": "Represents the scaling configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2alphaScalingConfig", + "properties": { + "autoscalingConfig": { + "$ref": "GoogleCloudMetastoreV2alphaAutoscalingConfig", + "description": "Optional. The autoscaling configuration." + }, + "scalingFactor": { + "description": "Optional. Scaling factor from 1 to 5, increments of 1.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaScheduledBackup": { + "description": "This specifies the configuration of scheduled backup.", + "id": "GoogleCloudMetastoreV2alphaScheduledBackup", + "properties": { + "backupLocation": { + "description": "Optional. A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing backup files will be stored below it.", + "type": "string" + }, + "cronSchedule": { + "description": "Optional. The scheduled interval in Cron format, see https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is not enabled. Must be specified to enable scheduled backups.", + "type": "string" + }, + "enabled": { + "description": "Optional. Defines whether the scheduled backup is enabled. The default value is false.", + "type": "boolean" + }, + "latestBackup": { + "$ref": "GoogleCloudMetastoreV2alphaLatestBackup", + "description": "Output only. The details of the latest scheduled backup.", + "readOnly": true + }, + "nextScheduledTime": { + "description": "Output only. The time when the next backups execution is scheduled to start.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "timeZone": { + "description": "Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is UTC.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaService": { + "description": "A managed metastore service that serves metadata queries.", + "id": "GoogleCloudMetastoreV2alphaService", + "properties": { + "createTime": { + "description": "Output only. The time when the metastore service was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "encryptionConfig": { + "$ref": "GoogleCloudMetastoreV2alphaEncryptionConfig", + "description": "Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated." + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the metastore service.", + "items": { + "$ref": "GoogleCloudMetastoreV2alphaEndpoint" + }, + "readOnly": true, + "type": "array" + }, + "hiveMetastoreConfig": { + "$ref": "GoogleCloudMetastoreV2alphaHiveMetastoreConfig", + "description": "Configuration information specific to running Hive metastore software as the metastore service." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels for the metastore service.", + "type": "object" + }, + "metadataIntegration": { + "$ref": "GoogleCloudMetastoreV2alphaMetadataIntegration", + "description": "Optional. The setting that defines how metastore metadata should be integrated with external services and systems." + }, + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "type": "string" + }, + "scalingConfig": { + "$ref": "GoogleCloudMetastoreV2alphaScalingConfig", + "description": "Optional. Scaling configuration of the metastore service." + }, + "scheduledBackup": { + "$ref": "GoogleCloudMetastoreV2alphaScheduledBackup", + "description": "Optional. The configuration of scheduled backup for the metastore service." + }, + "state": { + "description": "Output only. The current state of the metastore service.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "SUSPENDING", + "SUSPENDED", + "UPDATING", + "DELETING", + "ERROR", + "MIGRATING" + ], + "enumDescriptions": [ + "The state of the metastore service is unknown.", + "The metastore service is in the process of being created.", + "The metastore service is running and ready to serve queries.", + "The metastore service is entering suspension. Its query-serving availability may cease unexpectedly.", + "The metastore service is suspended and unable to serve queries.", + "The metastore service is being updated. It remains usable but cannot accept additional update requests or be deleted at this time.", + "The metastore service is undergoing deletion. It cannot be used.", + "The metastore service has encountered an error and cannot be used. The metastore service should be deleted.", + "The metastore service is processing a managed migration." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the metastore service, if available.", + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The globally unique resource identifier of the metastore service.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the metastore service was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "warehouseGcsUri": { + "description": "Required. A Cloud Storage URI (starting with gs://) that specifies the default warehouse directory of the Hive Metastore.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2alphaStartMigrationRequest": { + "description": "Request message for DataprocMetastore.StartMigration.", + "id": "GoogleCloudMetastoreV2alphaStartMigrationRequest", + "properties": { + "migrationExecution": { + "$ref": "GoogleCloudMetastoreV2alphaMigrationExecution", + "description": "Required. The configuration details for the migration." + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Dataproc Metastore API", + "version": "v2alpha", + "version_module": true +} \ No newline at end of file diff --git a/metastore/v2alpha/metastore-gen.go b/metastore/v2alpha/metastore-gen.go new file mode 100644 index 00000000000..63e0e064bfc --- /dev/null +++ b/metastore/v2alpha/metastore-gen.go @@ -0,0 +1,4855 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package metastore provides access to the Dataproc Metastore API. +// +// For product documentation, see: https://cloud.google.com/dataproc-metastore/docs +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/metastore/v2alpha" +// ... +// ctx := context.Background() +// metastoreService, err := metastore.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// metastoreService, err := metastore.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// metastoreService, err := metastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package metastore // import "google.golang.org/api/metastore/v2alpha" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "metastore:v2alpha" +const apiName = "metastore" +const apiVersion = "v2alpha" +const basePath = "https://metastore.googleapis.com/" +const basePathTemplate = "https://metastore.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://metastore.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Services = NewProjectsLocationsServicesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Services *ProjectsLocationsServicesService +} + +func NewProjectsLocationsServicesService(s *Service) *ProjectsLocationsServicesService { + rs := &ProjectsLocationsServicesService{s: s} + rs.Backups = NewProjectsLocationsServicesBackupsService(s) + rs.MigrationExecutions = NewProjectsLocationsServicesMigrationExecutionsService(s) + return rs +} + +type ProjectsLocationsServicesService struct { + s *Service + + Backups *ProjectsLocationsServicesBackupsService + + MigrationExecutions *ProjectsLocationsServicesMigrationExecutionsService +} + +func NewProjectsLocationsServicesBackupsService(s *Service) *ProjectsLocationsServicesBackupsService { + rs := &ProjectsLocationsServicesBackupsService{s: s} + return rs +} + +type ProjectsLocationsServicesBackupsService struct { + s *Service +} + +func NewProjectsLocationsServicesMigrationExecutionsService(s *Service) *ProjectsLocationsServicesMigrationExecutionsService { + rs := &ProjectsLocationsServicesMigrationExecutionsService{s: s} + return rs +} + +type ProjectsLocationsServicesMigrationExecutionsService struct { + s *Service +} + +// GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1CustomRegionMetadata: Metadata about a custom region. +// This is only populated if the region is a custom region. For single/multi +// regions, it will be empty. +type GoogleCloudMetastoreV1CustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1CustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1CustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1ErrorDetails: Error details in public error message +// for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1ErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1ErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1ErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1HiveMetastoreVersion: A specification of a supported +// version of the Hive Metastore software. +type GoogleCloudMetastoreV1HiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1HiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1HiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1LocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1LocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1CustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1MultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1HiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1LocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1LocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1MoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1MoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1MultiRegionMetadata: The metadata for the multi-region +// that includes the constituent regions. The metadata is only populated if the +// region is multi-region. For single region or custom dual region, it will be +// empty. +type GoogleCloudMetastoreV1MultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1MultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1MultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1OperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1OperationMetadata 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. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1OperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1QueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1QueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1QueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1QueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1alphaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1alphaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1alphaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1alphaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1alphaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1alphaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1alphaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1alphaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1alphaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1alphaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1alphaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1alphaOperationMetadata 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. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1betaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1betaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1betaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1betaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1betaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1betaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1betaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1betaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1betaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1betaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1betaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1betaOperationMetadata 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. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest: Request +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest struct { + // LocationUri: Required. The new location URI for the metadata resource. + LocationUri string `json:"locationUri,omitempty"` + // ResourceName: Required. The relative metadata resource name in the following + // format.databases/{database_id} or databases/{database_id}/tables/{table_id} + // or databases/{database_id}/tables/{table_id}/partitions/{partition_id} + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "LocationUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LocationUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest: Request message for +// DataprocMetastore.AlterTableProperties. +type GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest struct { + // Properties: A map that describes the desired values to mutate. If + // update_mask is empty, the properties will not update. Otherwise, the + // properties only alters the value whose associated paths exist in the update + // mask + Properties map[string]string `json:"properties,omitempty"` + // TableName: Required. The name of the table containing the properties you're + // altering in the following format.databases/{database_id}/tables/{table_id} + TableName string `json:"tableName,omitempty"` + // UpdateMask: A field mask that specifies the metadata table properties that + // are overwritten by the update. Fields specified in the update_mask are + // relative to the resource (not to the full request). A field is overwritten + // if it is in the mask.For example, given the target properties: properties { + // a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if + // the field mask is:paths: "properties.b", "properties.c"then the result will + // be: properties { a: 1 b: 3 c: 4 } + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Properties") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Properties") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaAutoscalingConfig: Represents the autoscaling +// configuration of a metastore service. +type GoogleCloudMetastoreV2alphaAutoscalingConfig struct { + // AutoscalingEnabled: Optional. Whether or not autoscaling is enabled for this + // service. + AutoscalingEnabled bool `json:"autoscalingEnabled,omitempty"` + // AutoscalingFactor: Output only. The scaling factor of a service with + // autoscaling enabled. + AutoscalingFactor int64 `json:"autoscalingFactor,omitempty"` + // LimitConfig: Optional. The LimitConfig of the service. + LimitConfig *GoogleCloudMetastoreV2alphaLimitConfig `json:"limitConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoscalingEnabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutoscalingEnabled") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaAutoscalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaAutoscalingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig: Configuration information +// for the auxiliary service versions. +type GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig struct { + // ConfigOverrides: A mapping of Hive metastore configuration key-value pairs + // to apply to the auxiliary Hive metastore (configured in hive-site.xml) in + // addition to the primary version's overrides. If keys are present in both the + // auxiliary version's overrides and the primary version's overrides, the value + // from the auxiliary version's overrides takes precedence. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the auxiliary + // metastore service, includes version and region data. + Endpoints []*GoogleCloudMetastoreV2alphaEndpoint `json:"endpoints,omitempty"` + // Version: The Hive metastore version of the auxiliary service. It must be + // less than the primary Hive metastore service's version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConfigOverrides") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConfigOverrides") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaBackup: The details of a backup resource. +type GoogleCloudMetastoreV2alphaBackup struct { + // CreateTime: Output only. The time when the backup was started. + CreateTime string `json:"createTime,omitempty"` + // Description: The description of the backup. + Description string `json:"description,omitempty"` + // EndTime: Output only. The time when the backup finished creating. + EndTime string `json:"endTime,omitempty"` + // Name: Immutable. The relative resource name of the backup, in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // backups/{backup_id} + Name string `json:"name,omitempty"` + // RestoringServices: Output only. Services that are restoring from the backup. + RestoringServices []string `json:"restoringServices,omitempty"` + // ServiceRevision: Output only. The revision of the service at the time of + // backup. + ServiceRevision *GoogleCloudMetastoreV2alphaService `json:"serviceRevision,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "CREATING" - The backup is being created. + // "DELETING" - The backup is being deleted. + // "ACTIVE" - The backup is active and ready to use. + // "FAILED" - The backup failed. + // "RESTORING" - The backup is being restored. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaCancelMigrationRequest: Request message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV2alphaCancelMigrationRequest struct { +} + +// GoogleCloudMetastoreV2alphaCdcConfig: Configuration information to start the +// Change Data Capture (CDC) streams from customer database to backend database +// of Dataproc Metastore. +type GoogleCloudMetastoreV2alphaCdcConfig struct { + // Bucket: Optional. The bucket to write the intermediate stream event data in. + // The bucket name must be without any prefix like "gs://". See the bucket + // naming requirements (https://cloud.google.com/storage/docs/buckets#naming). + // This field is optional. If not set, the Artifacts Cloud Storage bucket will + // be used. + Bucket string `json:"bucket,omitempty"` + // Password: Required. Input only. The password for the user that Datastream + // service should use for the MySQL connection. This field is not returned on + // request. + Password string `json:"password,omitempty"` + // ReverseProxySubnet: Required. The URL of the subnetwork resource to create + // the VM instance hosting the reverse proxy in. More context in + // https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy + // The subnetwork should reside in the network provided in the request that + // Datastream will peer to and should be in the same region as Datastream, in + // the following format. + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + ReverseProxySubnet string `json:"reverseProxySubnet,omitempty"` + // RootPath: Optional. The root path inside the Cloud Storage bucket. The + // stream event data will be written to this path. The default value is + // /migration. + RootPath string `json:"rootPath,omitempty"` + // SubnetIpRange: Required. A /29 CIDR IP range for peering with datastream. + SubnetIpRange string `json:"subnetIpRange,omitempty"` + // Username: Required. The username that the Datastream service should use for + // the MySQL connection. + Username string `json:"username,omitempty"` + // VpcNetwork: Required. Fully qualified name of the Cloud SQL instance's VPC + // network or the shared VPC network that Datastream will peer to, in the + // following format: + // projects/{project_id}/locations/global/networks/{network_id}. More context + // in + // https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity + VpcNetwork string `json:"vpcNetwork,omitempty"` + // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Bucket") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaCdcConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaCdcConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig: Configuration +// information to establish customer database connection before the cutover +// phase of migration +type GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig struct { + // HiveDatabaseName: Required. The hive database name. + HiveDatabaseName string `json:"hiveDatabaseName,omitempty"` + // InstanceConnectionName: Required. Cloud SQL database connection name + // (project_id:region:instance_name) + InstanceConnectionName string `json:"instanceConnectionName,omitempty"` + // IpAddress: Required. The private IP address of the Cloud SQL instance. + IpAddress string `json:"ipAddress,omitempty"` + // NatSubnet: Required. The relative resource name of the subnetwork to be used + // for Private Service Connect. Note that this cannot be a regular subnet and + // is used only for NAT. + // (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets) + // This subnet is used to publish the SOCKS5 proxy service. The subnet size + // must be at least /29 and it should reside in a network through which the + // Cloud SQL instance is accessible. The resource name should be in the format, + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + NatSubnet string `json:"natSubnet,omitempty"` + // Password: Required. Input only. The password for the user that Dataproc + // Metastore service will be using to connect to the database. This field is + // not returned on request. + Password string `json:"password,omitempty"` + // Port: Required. The network port of the database. + Port int64 `json:"port,omitempty"` + // ProxySubnet: Required. The relative resource name of the subnetwork to + // deploy the SOCKS5 proxy service in. The subnetwork should reside in a + // network through which the Cloud SQL instance is accessible. The resource + // name should be in the format, + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + ProxySubnet string `json:"proxySubnet,omitempty"` + // Username: Required. The username that Dataproc Metastore service will use to + // connect to the database. + Username string `json:"username,omitempty"` + // ForceSendFields is a list of field names (e.g. "HiveDatabaseName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "HiveDatabaseName") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig: Configuration +// information for migrating from self-managed hive metastore on Google Cloud +// using Cloud SQL as the backend database to Dataproc Metastore. +type GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig struct { + // CdcConfig: Required. Configuration information to start the Change Data + // Capture (CDC) streams from customer database to backend database of Dataproc + // Metastore. Dataproc Metastore switches to using its backend database after + // the cutover phase of migration. + CdcConfig *GoogleCloudMetastoreV2alphaCdcConfig `json:"cdcConfig,omitempty"` + // CloudSqlConnectionConfig: Required. Configuration information to establish + // customer database connection before the cutover phase of migration + CloudSqlConnectionConfig *GoogleCloudMetastoreV2alphaCloudSQLConnectionConfig `json:"cloudSqlConnectionConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "CdcConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CdcConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaCompleteMigrationRequest: Request message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV2alphaCompleteMigrationRequest struct { +} + +// GoogleCloudMetastoreV2alphaDataCatalogConfig: Specifies how metastore +// metadata should be integrated with the Data Catalog service. +type GoogleCloudMetastoreV2alphaDataCatalogConfig struct { + // Enabled: Optional. Defines whether the metastore metadata should be synced + // to Data Catalog. The default value is to disable syncing metastore metadata + // to Data Catalog. + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaDataCatalogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaDataCatalogConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaDatabaseDump: A specification of the location of +// and metadata about a database dump from a relational database management +// system. +type GoogleCloudMetastoreV2alphaDatabaseDump struct { + // GcsUri: Required. A Cloud Storage object or folder URI that specifies the + // source from which to import metadata. It must begin with gs://. + GcsUri string `json:"gcsUri,omitempty"` + // Type: Optional. The type of the database dump. If unspecified, defaults to + // MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsUri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcsUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaDatabaseDump) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaDatabaseDump + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaEncryptionConfig: Encryption settings for the +// service. +type GoogleCloudMetastoreV2alphaEncryptionConfig struct { +} + +// GoogleCloudMetastoreV2alphaEndpoint: An endpoint used to access the +// metastore service. +type GoogleCloudMetastoreV2alphaEndpoint struct { + // EndpointUri: Output only. The URI of the endpoint used to access the + // metastore service. + EndpointUri string `json:"endpointUri,omitempty"` + // Region: Output only. The region where the endpoint is located. + Region string `json:"region,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndpointUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndpointUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaEndpoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaExportMetadataRequest: Request message for +// DataprocMetastore.ExportMetadata. +type GoogleCloudMetastoreV2alphaExportMetadataRequest struct { + // DatabaseDumpType: Optional. The type of the database dump. If unspecified, + // defaults to MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + DatabaseDumpType string `json:"databaseDumpType,omitempty"` + // DestinationGcsFolder: A Cloud Storage URI of a folder, in the format gs:///. + // A sub-folder containing exported files will be created below it. + DestinationGcsFolder string `json:"destinationGcsFolder,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDumpType") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaExportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaExportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaHiveMetastoreConfig: Specifies configuration +// information specific to running Hive metastore software as the metastore +// service. +type GoogleCloudMetastoreV2alphaHiveMetastoreConfig struct { + // AuxiliaryVersions: Optional. A mapping of Hive metastore version to the + // auxiliary version configuration. When specified, a secondary Hive metastore + // service is created along with the primary service. All auxiliary versions + // must be less than the service's primary version. The key is the auxiliary + // service name and it must match the regular expression a-z?. This means that + // the first character must be a lowercase letter, and all the following + // characters must be hyphens, lowercase letters, or digits, except the last + // character, which cannot be a hyphen. + AuxiliaryVersions map[string]GoogleCloudMetastoreV2alphaAuxiliaryVersionConfig `json:"auxiliaryVersions,omitempty"` + // ConfigOverrides: Optional. A mapping of Hive metastore configuration + // key-value pairs to apply to the Hive metastore (configured in + // hive-site.xml). The mappings override system defaults (some keys cannot be + // overridden). These overrides are also applied to auxiliary versions and can + // be further customized in the auxiliary version's AuxiliaryVersionConfig. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // EndpointProtocol: Optional. The protocol to use for the metastore service + // endpoint. If unspecified, defaults to GRPC. + // + // Possible values: + // "ENDPOINT_PROTOCOL_UNSPECIFIED" - The protocol is not set. + // "THRIFT" - Use the legacy Apache Thrift protocol for the metastore service + // endpoint. + // "GRPC" - Use the modernized gRPC protocol for the metastore service + // endpoint. + EndpointProtocol string `json:"endpointProtocol,omitempty"` + // Version: Immutable. The Hive metastore schema version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuxiliaryVersions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuxiliaryVersions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaHiveMetastoreConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaHiveMetastoreConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaImportMetadataRequest: Request message for +// DataprocMetastore.CreateMetadataImport. +type GoogleCloudMetastoreV2alphaImportMetadataRequest struct { + // DatabaseDump: Immutable. A database dump from a pre-existing metastore's + // database. + DatabaseDump *GoogleCloudMetastoreV2alphaDatabaseDump `json:"databaseDump,omitempty"` + // Description: Optional. The description of the metadata import. + Description string `json:"description,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDump") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDump") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaImportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaImportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaLatestBackup: The details of the latest scheduled +// backup. +type GoogleCloudMetastoreV2alphaLatestBackup struct { + // BackupId: Output only. The ID of an in-progress scheduled backup. Empty if + // no backup is in progress. + BackupId string `json:"backupId,omitempty"` + // Duration: Output only. The duration of the backup completion. + Duration string `json:"duration,omitempty"` + // StartTime: Output only. The time when the backup was started. + StartTime string `json:"startTime,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "IN_PROGRESS" - The backup is in progress. + // "SUCCEEDED" - The backup completed. + // "FAILED" - The backup failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaLatestBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaLatestBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaLimitConfig: Represents the autoscaling limit +// configuration of a metastore service. +type GoogleCloudMetastoreV2alphaLimitConfig struct { + // MaxScalingFactor: Optional. The highest scaling factor that the service + // should be autoscaled to. + MaxScalingFactor int64 `json:"maxScalingFactor,omitempty"` + // MinScalingFactor: Optional. The lowest scaling factor that the service + // should be autoscaled to. + MinScalingFactor int64 `json:"minScalingFactor,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxScalingFactor") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxScalingFactor") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaLimitConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaLimitConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaListBackupsResponse: Response message for +// DataprocMetastore.ListBackups. +type GoogleCloudMetastoreV2alphaListBackupsResponse struct { + // Backups: The backups of the specified service. + Backups []*GoogleCloudMetastoreV2alphaBackup `json:"backups,omitempty"` + // NextPageToken: A token that 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. + 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. "Backups") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaListBackupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse: Response message +// for DataprocMetastore.ListMigrationExecutions. +type GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse struct { + // MigrationExecutions: The migration executions on the specified service. + MigrationExecutions []*GoogleCloudMetastoreV2alphaMigrationExecution `json:"migrationExecutions,omitempty"` + // NextPageToken: A token that 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. + 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. "MigrationExecutions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecutions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaListServicesResponse: Response message for +// DataprocMetastore.ListServices. +type GoogleCloudMetastoreV2alphaListServicesResponse struct { + // NextPageToken: A token that 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"` + // Services: The services in the specified location. + Services []*GoogleCloudMetastoreV2alphaService `json:"services,omitempty"` + // Unreachable: Locations that could not be reached. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaListServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaListServicesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaMetadataIntegration: Specifies how metastore +// metadata should be integrated with external services. +type GoogleCloudMetastoreV2alphaMetadataIntegration struct { + // DataCatalogConfig: Optional. The integration config for the Data Catalog + // service. + DataCatalogConfig *GoogleCloudMetastoreV2alphaDataCatalogConfig `json:"dataCatalogConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataCatalogConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataCatalogConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaMetadataIntegration) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaMetadataIntegration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaMigrationExecution: The details of a migration +// execution resource. +type GoogleCloudMetastoreV2alphaMigrationExecution struct { + // CloudSqlMigrationConfig: Configuration information specific to migrating + // from self-managed hive metastore on Google Cloud using Cloud SQL as the + // backend database to Dataproc Metastore. + CloudSqlMigrationConfig *GoogleCloudMetastoreV2alphaCloudSQLMigrationConfig `json:"cloudSqlMigrationConfig,omitempty"` + // CreateTime: Output only. The time when the migration execution was started. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time when the migration execution finished. + EndTime string `json:"endTime,omitempty"` + // Name: Output only. The relative resource name of the migration execution, in + // the following form: + // projects/{project_number}/locations/{location_id}/services/{service_id}/migra + // tionExecutions/{migration_execution_id} + Name string `json:"name,omitempty"` + // Phase: Output only. The current phase of the migration execution. + // + // Possible values: + // "PHASE_UNSPECIFIED" - The phase of the migration execution is unknown. + // "REPLICATION" - Replication phase refers to the migration phase when + // Dataproc Metastore is running a pipeline to replicate changes in the + // customer database to its backend database. During this phase, Dataproc + // Metastore uses the customer database as the hive metastore backend database. + // "CUTOVER" - Cutover phase refers to the migration phase when Dataproc + // Metastore switches to using its own backend database. Migration enters this + // phase when customer is done migrating all their clusters/workloads to + // Dataproc Metastore and triggers CompleteMigration. + Phase string `json:"phase,omitempty"` + // State: Output only. The current state of the migration execution. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the migration execution is unknown. + // "STARTING" - The migration execution is starting. + // "RUNNING" - The migration execution is running. + // "CANCELLING" - The migration execution is in the process of being + // cancelled. + // "AWAITING_USER_ACTION" - The migration execution is awaiting user action. + // "SUCCEEDED" - The migration execution has completed successfully. + // "FAILED" - The migration execution has failed. + // "CANCELLED" - The migration execution is cancelled. + // "DELETING" - The migration execution is being deleted. + State string `json:"state,omitempty"` + // StateMessage: Output only. Additional information about the current state of + // the migration execution. + StateMessage string `json:"stateMessage,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CloudSqlMigrationConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CloudSqlMigrationConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaMigrationExecution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaMigrationExecution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest: Request message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest struct { + // DbName: Required. The name of the database where the table resides. + DbName string `json:"dbName,omitempty"` + // DestinationDbName: Required. The name of the database where the table should + // be moved. + DestinationDbName string `json:"destinationDbName,omitempty"` + // TableName: Required. The name of the table to be moved. + TableName string `json:"tableName,omitempty"` + // ForceSendFields is a list of field names (e.g. "DbName") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaQueryMetadataRequest: Request message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV2alphaQueryMetadataRequest struct { + // Query: Required. A read-only SQL query to execute against the metadata + // database. The query cannot change or mutate the data. + Query string `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "Query") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Query") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaQueryMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaQueryMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest: Request message for +// DataprocMetastore.RemoveIamPolicy. +type GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest struct { + // Asynchronous: Optional. Removes IAM policy attached to database or table + // asynchronously when it is set. The default is false. + Asynchronous bool `json:"asynchronous,omitempty"` + // ForceSendFields is a list of field names (e.g. "Asynchronous") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Asynchronous") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse: Response message for +// DataprocMetastore.RemoveIamPolicy. +type GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse struct { + // Success: True if the policy is successfully removed. + Success bool `json:"success,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Success") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Success") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaRestoreServiceRequest: Request message for +// DataprocMetastore.Restore. +type GoogleCloudMetastoreV2alphaRestoreServiceRequest struct { + // Backup: Optional. The relative resource name of the metastore service backup + // to restore from, in the following + // form:projects/{project_id}/locations/{location_id}/services/{service_id}/back + // ups/{backup_id}. Mutually exclusive with backup_location, and exactly one of + // the two must be set. + Backup string `json:"backup,omitempty"` + // BackupLocation: Optional. A Cloud Storage URI specifying the location of the + // backup artifacts, namely - backup avro files under "avro/", + // backup_metastore.json and service.json, in the following form:gs://. + // Mutually exclusive with backup, and exactly one of the two must be set. + BackupLocation string `json:"backupLocation,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // RestoreType: Optional. The type of restore. If unspecified, defaults to + // METADATA_ONLY. + // + // Possible values: + // "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown. + // "FULL" - The service's metadata and configuration are restored. + // "METADATA_ONLY" - Only the service's metadata is restored. + RestoreType string `json:"restoreType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backup") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaRestoreServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaRestoreServiceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaScalingConfig: Represents the scaling +// configuration of a metastore service. +type GoogleCloudMetastoreV2alphaScalingConfig struct { + // AutoscalingConfig: Optional. The autoscaling configuration. + AutoscalingConfig *GoogleCloudMetastoreV2alphaAutoscalingConfig `json:"autoscalingConfig,omitempty"` + // ScalingFactor: Optional. Scaling factor from 1 to 5, increments of 1. + ScalingFactor int64 `json:"scalingFactor,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoscalingConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutoscalingConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaScalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaScalingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaScheduledBackup: This specifies the configuration +// of scheduled backup. +type GoogleCloudMetastoreV2alphaScheduledBackup struct { + // BackupLocation: Optional. A Cloud Storage URI of a folder, in the format + // gs:///. A sub-folder containing backup files will be stored below it. + BackupLocation string `json:"backupLocation,omitempty"` + // CronSchedule: Optional. The scheduled interval in Cron format, see + // https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is + // not enabled. Must be specified to enable scheduled backups. + CronSchedule string `json:"cronSchedule,omitempty"` + // Enabled: Optional. Defines whether the scheduled backup is enabled. The + // default value is false. + Enabled bool `json:"enabled,omitempty"` + // LatestBackup: Output only. The details of the latest scheduled backup. + LatestBackup *GoogleCloudMetastoreV2alphaLatestBackup `json:"latestBackup,omitempty"` + // NextScheduledTime: Output only. The time when the next backups execution is + // scheduled to start. + NextScheduledTime string `json:"nextScheduledTime,omitempty"` + // TimeZone: Optional. Specifies the time zone to be used when interpreting + // cron_schedule. Must be a time zone name from the time zone database + // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. + // America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is + // UTC. + TimeZone string `json:"timeZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupLocation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupLocation") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaScheduledBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaScheduledBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaService: A managed metastore service that serves +// metadata queries. +type GoogleCloudMetastoreV2alphaService struct { + // CreateTime: Output only. The time when the metastore service was created. + CreateTime string `json:"createTime,omitempty"` + // EncryptionConfig: Immutable. Information used to configure the Dataproc + // Metastore service to encrypt customer data at rest. Cannot be updated. + EncryptionConfig *GoogleCloudMetastoreV2alphaEncryptionConfig `json:"encryptionConfig,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the metastore + // service. + Endpoints []*GoogleCloudMetastoreV2alphaEndpoint `json:"endpoints,omitempty"` + // HiveMetastoreConfig: Configuration information specific to running Hive + // metastore software as the metastore service. + HiveMetastoreConfig *GoogleCloudMetastoreV2alphaHiveMetastoreConfig `json:"hiveMetastoreConfig,omitempty"` + // Labels: User-defined labels for the metastore service. + Labels map[string]string `json:"labels,omitempty"` + // MetadataIntegration: Optional. The setting that defines how metastore + // metadata should be integrated with external services and systems. + MetadataIntegration *GoogleCloudMetastoreV2alphaMetadataIntegration `json:"metadataIntegration,omitempty"` + // Name: Immutable. The relative resource name of the metastore service, in the + // following + // format:projects/{project_number}/locations/{location_id}/services/{service_id + // }. + Name string `json:"name,omitempty"` + // ScalingConfig: Optional. Scaling configuration of the metastore service. + ScalingConfig *GoogleCloudMetastoreV2alphaScalingConfig `json:"scalingConfig,omitempty"` + // ScheduledBackup: Optional. The configuration of scheduled backup for the + // metastore service. + ScheduledBackup *GoogleCloudMetastoreV2alphaScheduledBackup `json:"scheduledBackup,omitempty"` + // State: Output only. The current state of the metastore service. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the metastore service is unknown. + // "CREATING" - The metastore service is in the process of being created. + // "ACTIVE" - The metastore service is running and ready to serve queries. + // "SUSPENDING" - The metastore service is entering suspension. Its + // query-serving availability may cease unexpectedly. + // "SUSPENDED" - The metastore service is suspended and unable to serve + // queries. + // "UPDATING" - The metastore service is being updated. It remains usable but + // cannot accept additional update requests or be deleted at this time. + // "DELETING" - The metastore service is undergoing deletion. It cannot be + // used. + // "ERROR" - The metastore service has encountered an error and cannot be + // used. The metastore service should be deleted. + // "MIGRATING" - The metastore service is processing a managed migration. + State string `json:"state,omitempty"` + // StateMessage: Output only. Additional information about the current state of + // the metastore service, if available. + StateMessage string `json:"stateMessage,omitempty"` + // Uid: Output only. The globally unique resource identifier of the metastore + // service. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The time when the metastore service was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // WarehouseGcsUri: Required. A Cloud Storage URI (starting with gs://) that + // specifies the default warehouse directory of the Hive Metastore. + WarehouseGcsUri string `json:"warehouseGcsUri,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaService) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaService + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2alphaStartMigrationRequest: Request message for +// DataprocMetastore.StartMigration. +type GoogleCloudMetastoreV2alphaStartMigrationRequest struct { + // MigrationExecution: Required. The configuration details for the migration. + MigrationExecution *GoogleCloudMetastoreV2alphaMigrationExecution `json:"migrationExecution,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2alphaStartMigrationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2alphaStartMigrationRequest + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsLocationsServicesAlterLocationCall struct { + s *Service + service string + googlecloudmetastorev2alphaaltermetadataresourcelocationrequest *GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterLocation: Alter metadata resource location. The metadata resource can +// be a database, table, or partition. This functionality only updates the +// parent directory for the respective metadata resource and does not transfer +// any existing data to the new location. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterLocation(service string, googlecloudmetastorev2alphaaltermetadataresourcelocationrequest *GoogleCloudMetastoreV2alphaAlterMetadataResourceLocationRequest) *ProjectsLocationsServicesAlterLocationCall { + c := &ProjectsLocationsServicesAlterLocationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphaaltermetadataresourcelocationrequest = googlecloudmetastorev2alphaaltermetadataresourcelocationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterLocationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterLocationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterLocationCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterLocationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterLocationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterLocationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaaltermetadataresourcelocationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:alterLocation") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterLocation" call. +// 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 *ProjectsLocationsServicesAlterLocationCall) 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 +} + +type ProjectsLocationsServicesAlterTablePropertiesCall struct { + s *Service + service string + googlecloudmetastorev2alphaaltertablepropertiesrequest *GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterTableProperties: Alter metadata table properties. +// +// - service: The relative resource name of the Dataproc Metastore service +// that's being used to mutate metadata table properties, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterTableProperties(service string, googlecloudmetastorev2alphaaltertablepropertiesrequest *GoogleCloudMetastoreV2alphaAlterTablePropertiesRequest) *ProjectsLocationsServicesAlterTablePropertiesCall { + c := &ProjectsLocationsServicesAlterTablePropertiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphaaltertablepropertiesrequest = googlecloudmetastorev2alphaaltertablepropertiesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaaltertablepropertiesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:alterTableProperties") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterTableProperties" call. +// 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 *ProjectsLocationsServicesAlterTablePropertiesCall) 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 +} + +type ProjectsLocationsServicesCancelMigrationCall struct { + s *Service + service string + googlecloudmetastorev2alphacancelmigrationrequest *GoogleCloudMetastoreV2alphaCancelMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CancelMigration: Cancels the ongoing Managed Migration process. +// +// - service: The relative resource name of the metastore service to cancel the +// ongoing migration to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) CancelMigration(service string, googlecloudmetastorev2alphacancelmigrationrequest *GoogleCloudMetastoreV2alphaCancelMigrationRequest) *ProjectsLocationsServicesCancelMigrationCall { + c := &ProjectsLocationsServicesCancelMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphacancelmigrationrequest = googlecloudmetastorev2alphacancelmigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCancelMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCancelMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCancelMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCancelMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCancelMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCancelMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphacancelmigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:cancelMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.cancelMigration" call. +// 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 *ProjectsLocationsServicesCancelMigrationCall) 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 +} + +type ProjectsLocationsServicesCompleteMigrationCall struct { + s *Service + service string + googlecloudmetastorev2alphacompletemigrationrequest *GoogleCloudMetastoreV2alphaCompleteMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CompleteMigration: Completes the managed migration process. The Dataproc +// Metastore service will switch to using its own backend database after +// successful migration. +// +// - service: The relative resource name of the metastore service to complete +// the migration to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) CompleteMigration(service string, googlecloudmetastorev2alphacompletemigrationrequest *GoogleCloudMetastoreV2alphaCompleteMigrationRequest) *ProjectsLocationsServicesCompleteMigrationCall { + c := &ProjectsLocationsServicesCompleteMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphacompletemigrationrequest = googlecloudmetastorev2alphacompletemigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCompleteMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCompleteMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCompleteMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphacompletemigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:completeMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.completeMigration" call. +// 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 *ProjectsLocationsServicesCompleteMigrationCall) 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 +} + +type ProjectsLocationsServicesCreateCall struct { + s *Service + parent string + googlecloudmetastorev2alphaservice *GoogleCloudMetastoreV2alphaService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a metastore service in a project and location. +// +// - parent: The relative resource name of the location in which to create a +// metastore service, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) Create(parent string, googlecloudmetastorev2alphaservice *GoogleCloudMetastoreV2alphaService) *ProjectsLocationsServicesCreateCall { + c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2alphaservice = googlecloudmetastorev2alphaservice + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceId sets the optional parameter "serviceId": Required. The ID of the +// metastore service, which is used as the final component of the metastore +// service's name.This value must be between 2 and 63 characters long +// inclusive, begin with a letter, end with a letter or number, and consist of +// alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("serviceId", serviceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/services") + 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 "metastore.projects.locations.services.create" call. +// 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 *ProjectsLocationsServicesCreateCall) 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 +} + +type ProjectsLocationsServicesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single service. +// +// - name: The relative resource name of the metastore service to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall { + c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall { + 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 +// details. +func (c *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "metastore.projects.locations.services.delete" call. +// 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 *ProjectsLocationsServicesDeleteCall) 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 +} + +type ProjectsLocationsServicesExportMetadataCall struct { + s *Service + service string + googlecloudmetastorev2alphaexportmetadatarequest *GoogleCloudMetastoreV2alphaExportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportMetadata: Exports metadata from a service. +// +// - service: The relative resource name of the metastore service to run +// export, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ExportMetadata(service string, googlecloudmetastorev2alphaexportmetadatarequest *GoogleCloudMetastoreV2alphaExportMetadataRequest) *ProjectsLocationsServicesExportMetadataCall { + c := &ProjectsLocationsServicesExportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphaexportmetadatarequest = googlecloudmetastorev2alphaexportmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesExportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesExportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesExportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesExportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesExportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesExportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaexportmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:exportMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.exportMetadata" call. +// 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 *ProjectsLocationsServicesExportMetadataCall) 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 +} + +type ProjectsLocationsServicesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a single service. +// +// - name: The relative resource name of the metastore service to retrieve, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall { + c := &ProjectsLocationsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "metastore.projects.locations.services.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaService.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaService, 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 := &GoogleCloudMetastoreV2alphaService{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesImportMetadataCall struct { + s *Service + name string + googlecloudmetastorev2alphaimportmetadatarequest *GoogleCloudMetastoreV2alphaImportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ImportMetadata: Imports Metadata into a Dataproc Metastore service. +// +// - name: Immutable. The relative resource name of the metastore service to +// run import, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ImportMetadata(name string, googlecloudmetastorev2alphaimportmetadatarequest *GoogleCloudMetastoreV2alphaImportMetadataRequest) *ProjectsLocationsServicesImportMetadataCall { + c := &ProjectsLocationsServicesImportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2alphaimportmetadatarequest = googlecloudmetastorev2alphaimportmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesImportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesImportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesImportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesImportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesImportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesImportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaimportmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+name}:importMetadata") + 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 "metastore.projects.locations.services.importMetadata" call. +// 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 *ProjectsLocationsServicesImportMetadataCall) 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 +} + +type ProjectsLocationsServicesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists services in a project and location. +// +// - parent: The relative resource name of the location of metastore services +// to list, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall { + c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesListCall) Filter(filter string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// services to return. The response may contain less than the maximum number. +// If unspecified, no more than 500 services are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListServices call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListServices must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/services") + 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 "metastore.projects.locations.services.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaListServicesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaListServicesResponse, 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 := &GoogleCloudMetastoreV2alphaListServicesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServicesListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2alphaListServicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsServicesMoveTableToDatabaseCall struct { + s *Service + service string + googlecloudmetastorev2alphamovetabletodatabaserequest *GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MoveTableToDatabase: Move a table to another database. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) MoveTableToDatabase(service string, googlecloudmetastorev2alphamovetabletodatabaserequest *GoogleCloudMetastoreV2alphaMoveTableToDatabaseRequest) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c := &ProjectsLocationsServicesMoveTableToDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphamovetabletodatabaserequest = googlecloudmetastorev2alphamovetabletodatabaserequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Context(ctx context.Context) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphamovetabletodatabaserequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:moveTableToDatabase") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.moveTableToDatabase" call. +// 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 *ProjectsLocationsServicesMoveTableToDatabaseCall) 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 +} + +type ProjectsLocationsServicesPatchCall struct { + s *Service + name string + googlecloudmetastorev2alphaservice *GoogleCloudMetastoreV2alphaService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single service. +// +// - name: Immutable. The relative resource name of the metastore service, in +// the following +// format:projects/{project_number}/locations/{location_id}/services/{service_ +// id}. +func (r *ProjectsLocationsServicesService) Patch(name string, googlecloudmetastorev2alphaservice *GoogleCloudMetastoreV2alphaService) *ProjectsLocationsServicesPatchCall { + c := &ProjectsLocationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2alphaservice = googlecloudmetastorev2alphaservice + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A field mask +// used to specify the fields to be overwritten in the metastore service +// resource by the update. Fields specified in the update_mask are relative to +// the resource (not to the full request). A field is overwritten if it is in +// the mask. +func (c *ProjectsLocationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "metastore.projects.locations.services.patch" call. +// 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 *ProjectsLocationsServicesPatchCall) 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 +} + +type ProjectsLocationsServicesQueryMetadataCall struct { + s *Service + service string + googlecloudmetastorev2alphaquerymetadatarequest *GoogleCloudMetastoreV2alphaQueryMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// QueryMetadata: Query Dataproc Metastore metadata. +// +// - service: The relative resource name of the metastore service to query +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) QueryMetadata(service string, googlecloudmetastorev2alphaquerymetadatarequest *GoogleCloudMetastoreV2alphaQueryMetadataRequest) *ProjectsLocationsServicesQueryMetadataCall { + c := &ProjectsLocationsServicesQueryMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphaquerymetadatarequest = googlecloudmetastorev2alphaquerymetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesQueryMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesQueryMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesQueryMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesQueryMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesQueryMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesQueryMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphaquerymetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:queryMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.queryMetadata" call. +// 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 *ProjectsLocationsServicesQueryMetadataCall) 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 +} + +type ProjectsLocationsServicesRemoveIamPolicyCall struct { + s *Service + resource string + googlecloudmetastorev2alpharemoveiampolicyrequest *GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveIamPolicy: Removes the attached IAM policies for a resource +// +// - resource: The relative resource name of the dataplane resource to remove +// IAM policy, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}/da +// tabases/{database_id} or +// projects/{project_id}/locations/{location_id}/services/{service_id}/databas +// es/{database_id}/tables/{table_id}. +func (r *ProjectsLocationsServicesService) RemoveIamPolicy(resource string, googlecloudmetastorev2alpharemoveiampolicyrequest *GoogleCloudMetastoreV2alphaRemoveIamPolicyRequest) *ProjectsLocationsServicesRemoveIamPolicyCall { + c := &ProjectsLocationsServicesRemoveIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googlecloudmetastorev2alpharemoveiampolicyrequest = googlecloudmetastorev2alpharemoveiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRemoveIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesRemoveIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alpharemoveiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+resource}:removeIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.removeIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse, 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 := &GoogleCloudMetastoreV2alphaRemoveIamPolicyResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesRestoreCall struct { + s *Service + service string + googlecloudmetastorev2alpharestoreservicerequest *GoogleCloudMetastoreV2alphaRestoreServiceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a service from a backup. +// +// - service: The relative resource name of the metastore service to run +// restore, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) Restore(service string, googlecloudmetastorev2alpharestoreservicerequest *GoogleCloudMetastoreV2alphaRestoreServiceRequest) *ProjectsLocationsServicesRestoreCall { + c := &ProjectsLocationsServicesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alpharestoreservicerequest = googlecloudmetastorev2alpharestoreservicerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRestoreCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesRestoreCall) Context(ctx context.Context) *ProjectsLocationsServicesRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alpharestoreservicerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:restore") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.restore" call. +// 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 *ProjectsLocationsServicesRestoreCall) 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 +} + +type ProjectsLocationsServicesStartMigrationCall struct { + s *Service + service string + googlecloudmetastorev2alphastartmigrationrequest *GoogleCloudMetastoreV2alphaStartMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StartMigration: Starts the Managed Migration process. +// +// - service: The relative resource name of the metastore service to start +// migrating to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) StartMigration(service string, googlecloudmetastorev2alphastartmigrationrequest *GoogleCloudMetastoreV2alphaStartMigrationRequest) *ProjectsLocationsServicesStartMigrationCall { + c := &ProjectsLocationsServicesStartMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2alphastartmigrationrequest = googlecloudmetastorev2alphastartmigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesStartMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesStartMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesStartMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesStartMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesStartMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesStartMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphastartmigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+service}:startMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.startMigration" call. +// 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 *ProjectsLocationsServicesStartMigrationCall) 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 +} + +type ProjectsLocationsServicesBackupsCreateCall struct { + s *Service + parent string + googlecloudmetastorev2alphabackup *GoogleCloudMetastoreV2alphaBackup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new backup in a given project and location. +// +// - parent: The relative resource name of the service in which to create a +// backup of the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesBackupsService) Create(parent string, googlecloudmetastorev2alphabackup *GoogleCloudMetastoreV2alphaBackup) *ProjectsLocationsServicesBackupsCreateCall { + c := &ProjectsLocationsServicesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2alphabackup = googlecloudmetastorev2alphabackup + return c +} + +// BackupId sets the optional parameter "backupId": Required. The ID of the +// backup, which is used as the final component of the backup's name.This value +// must be between 1 and 64 characters long, begin with a letter, end with a +// letter or number, and consist of alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsCreateCall { + 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 +// details. +func (c *ProjectsLocationsServicesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2alphabackup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.create" call. +// 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 *ProjectsLocationsServicesBackupsCreateCall) 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 +} + +type ProjectsLocationsServicesBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single backup. +// +// - name: The relative resource name of the backup to delete, in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Delete(name string) *ProjectsLocationsServicesBackupsDeleteCall { + c := &ProjectsLocationsServicesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsDeleteCall { + 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 +// details. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "metastore.projects.locations.services.backups.delete" call. +// 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 *ProjectsLocationsServicesBackupsDeleteCall) 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 +} + +type ProjectsLocationsServicesBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single backup. +// +// - name: The relative resource name of the backup to retrieve, in the +// following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Get(name string) *ProjectsLocationsServicesBackupsGetCall { + c := &ProjectsLocationsServicesBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "metastore.projects.locations.services.backups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaBackup.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesBackupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaBackup, 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 := &GoogleCloudMetastoreV2alphaBackup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists backups in a service. +// +// - parent: The relative resource name of the service whose backups to list, +// in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups. +func (r *ProjectsLocationsServicesBackupsService) List(parent string) *ProjectsLocationsServicesBackupsListCall { + c := &ProjectsLocationsServicesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesBackupsListCall) Filter(filter string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// backups to return. The response may contain less than the maximum number. If +// unspecified, no more than 500 backups are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListBackups call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListBackups must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesBackupsListCall) PageToken(pageToken string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsListCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaListBackupsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesBackupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaListBackupsResponse, 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 := &GoogleCloudMetastoreV2alphaListBackupsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServicesBackupsListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2alphaListBackupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsServicesMigrationExecutionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single migration execution. +// +// - name: The relative resource name of the migrationExecution to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions/{migration_execution_id}. +func (r *ProjectsLocationsServicesMigrationExecutionsService) Delete(name string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c := &ProjectsLocationsServicesMigrationExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + 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 +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "metastore.projects.locations.services.migrationExecutions.delete" call. +// 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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) 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 +} + +type ProjectsLocationsServicesMigrationExecutionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single migration execution. +// +// - name: The relative resource name of the migration execution to retrieve, +// in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions/{migration_execution_id}. +func (r *ProjectsLocationsServicesMigrationExecutionsService) Get(name string) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c := &ProjectsLocationsServicesMigrationExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+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 "metastore.projects.locations.services.migrationExecutions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaMigrationExecution.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaMigrationExecution, 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 := &GoogleCloudMetastoreV2alphaMigrationExecution{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesMigrationExecutionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists migration executions on a service. +// +// - parent: The relative resource name of the service whose migration +// executions to list, in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions. +func (r *ProjectsLocationsServicesMigrationExecutionsService) List(parent string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c := &ProjectsLocationsServicesMigrationExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Filter(filter string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// migration executions to return. The response may contain less than the +// maximum number. If unspecified, no more than 500 migration executions are +// returned. The maximum value is 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListMigrationExecutions call. Provide this +// token to retrieve the subsequent page.To retrieve the first page, supply an +// empty page token.When paginating, other parameters provided to +// DataprocMetastore.ListMigrationExecutions must match the call that provided +// the page token. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2alpha/{+parent}/migrationExecutions") + 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 "metastore.projects.locations.services.migrationExecutions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse.ServerResponse.He +// ader or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse, 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 := &GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2alphaListMigrationExecutionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/metastore/v2beta/metastore-api.json b/metastore/v2beta/metastore-api.json new file mode 100644 index 00000000000..3dc967a65c4 --- /dev/null +++ b/metastore/v2beta/metastore-api.json @@ -0,0 +1,2313 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://metastore.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Dataproc Metastore", + "description": "The Dataproc Metastore API is used to manage the lifecycle and configuration of metastore services.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/dataproc-metastore/docs", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "metastore:v2beta", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://metastore.mtls.googleapis.com/", + "name": "metastore", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "services": { + "methods": { + "alterLocation": { + "description": "Alter metadata resource location. The metadata resource can be a database, table, or partition. This functionality only updates the parent directory for the respective metadata resource and does not transfer any existing data to the new location.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterLocation", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterLocation", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:alterLocation", + "request": { + "$ref": "GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "alterTableProperties": { + "description": "Alter metadata table properties.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:alterTableProperties", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.alterTableProperties", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the Dataproc Metastore service that's being used to mutate metadata table properties, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:alterTableProperties", + "request": { + "$ref": "GoogleCloudMetastoreV2betaAlterTablePropertiesRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "cancelMigration": { + "description": "Cancels the ongoing Managed Migration process.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:cancelMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.cancelMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to cancel the ongoing migration to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:cancelMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2betaCancelMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "completeMigration": { + "description": "Completes the managed migration process. The Dataproc Metastore service will switch to using its own backend database after successful migration.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:completeMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.completeMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to complete the migration to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:completeMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2betaCompleteMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "create": { + "description": "Creates a metastore service in a project and location.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The relative resource name of the location in which to create a metastore service, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "serviceId": { + "description": "Required. The ID of the metastore service, which is used as the final component of the metastore service's name.This value must be between 2 and 63 characters long inclusive, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+parent}/services", + "request": { + "$ref": "GoogleCloudMetastoreV2betaService" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "exportMetadata": { + "description": "Exports metadata from a service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:exportMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.exportMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run export, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:exportMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2betaExportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the details of a single service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the metastore service to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2betaService" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "importMetadata": { + "description": "Imports Metadata into a Dataproc Metastore service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:importMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.importMetadata", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service to run import, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}:importMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2betaImportMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists services in a project and location.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of services to return. The response may contain less than the maximum number. If unspecified, no more than 500 services are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListServices call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListServices must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the location of metastore services to list, in the following form:projects/{project_number}/locations/{location_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/services", + "response": { + "$ref": "GoogleCloudMetastoreV2betaListServicesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "moveTableToDatabase": { + "description": "Move a table to another database.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:moveTableToDatabase", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.moveTableToDatabase", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to mutate metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:moveTableToDatabase", + "request": { + "$ref": "GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", + "httpMethod": "PATCH", + "id": "metastore.projects.locations.services.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "Required. A field mask used to specify the fields to be overwritten in the metastore service resource by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "request": { + "$ref": "GoogleCloudMetastoreV2betaService" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "queryMetadata": { + "description": "Query Dataproc Metastore metadata.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:queryMetadata", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.queryMetadata", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to query metadata, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:queryMetadata", + "request": { + "$ref": "GoogleCloudMetastoreV2betaQueryMetadataRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "removeIamPolicy": { + "description": "Removes the attached IAM policies for a resource", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/{servicesId1}:removeIamPolicy", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.removeIamPolicy", + "parameterOrder": [ + "resource" + ], + "parameters": { + "resource": { + "description": "Required. The relative resource name of the dataplane resource to remove IAM policy, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id} or projects/{project_id}/locations/{location_id}/services/{service_id}/databases/{database_id}/tables/{table_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/.*$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+resource}:removeIamPolicy", + "request": { + "$ref": "GoogleCloudMetastoreV2betaRemoveIamPolicyRequest" + }, + "response": { + "$ref": "GoogleCloudMetastoreV2betaRemoveIamPolicyResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "restore": { + "description": "Restores a service from a backup.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:restore", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.restore", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to run restore, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:restore", + "request": { + "$ref": "GoogleCloudMetastoreV2betaRestoreServiceRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "startMigration": { + "description": "Starts the Managed Migration process.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:startMigration", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.startMigration", + "parameterOrder": [ + "service" + ], + "parameters": { + "service": { + "description": "Required. The relative resource name of the metastore service to start migrating to, in the following format:projects/{project_id}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+service}:startMigration", + "request": { + "$ref": "GoogleCloudMetastoreV2betaStartMigrationRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "backups": { + "methods": { + "create": { + "description": "Creates a new backup in a given project and location.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "POST", + "id": "metastore.projects.locations.services.backups.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "backupId": { + "description": "Required. The ID of the backup, which is used as the final component of the backup's name.This value must be between 1 and 64 characters long, begin with a letter, end with a letter or number, and consist of alpha-numeric ASCII characters or hyphens.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service in which to create a backup of the following form:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+parent}/backups", + "request": { + "$ref": "GoogleCloudMetastoreV2betaBackup" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single backup.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.backups.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single backup.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups/{backupsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the backup to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/backups/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2betaBackup" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists backups in a service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/backups", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.backups.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of backups to return. The response may contain less than the maximum number. If unspecified, no more than 500 backups are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListBackups call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListBackups must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose backups to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/backups", + "response": { + "$ref": "GoogleCloudMetastoreV2betaListBackupsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "migrationExecutions": { + "methods": { + "delete": { + "description": "Deletes a single migration execution.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", + "httpMethod": "DELETE", + "id": "metastore.projects.locations.services.migrationExecutions.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the migrationExecution to delete, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", + "required": true, + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single migration execution.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions/{migrationExecutionsId}", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.migrationExecutions.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The relative resource name of the migration execution to retrieve, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/migrationExecutions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+name}", + "response": { + "$ref": "GoogleCloudMetastoreV2betaMigrationExecution" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists migration executions on a service.", + "flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/migrationExecutions", + "httpMethod": "GET", + "id": "metastore.projects.locations.services.migrationExecutions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. The filter to apply to list results.", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Specify the ordering of results as described in Sorting Order (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not specified, the results will be sorted in the default order.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of migration executions to return. The response may contain less than the maximum number. If unspecified, no more than 500 migration executions are returned. The maximum value is 1000; values above 1000 are changed to 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous DataprocMetastore.ListMigrationExecutions call. Provide this token to retrieve the subsequent page.To retrieve the first page, supply an empty page token.When paginating, other parameters provided to DataprocMetastore.ListMigrationExecutions must match the call that provided the page token.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The relative resource name of the service whose migration executions to list, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta/{+parent}/migrationExecutions", + "response": { + "$ref": "GoogleCloudMetastoreV2betaListMigrationExecutionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20241203", + "rootUrl": "https://metastore.googleapis.com/", + "schemas": { + "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1CustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1CustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1ErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1ErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1HiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1HiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1LocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1LocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1CustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1MultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1HiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1MoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1MoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1MultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1MultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1OperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1OperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1QueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1QueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1alphaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1alphaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1alphaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1alphaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1alphaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1alphaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1alphaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1alphaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse": { + "description": "Response message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCancelMigrationResponse": { + "description": "Response message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV1betaCancelMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCompleteMigrationResponse": { + "description": "Response message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV1betaCompleteMigrationResponse", + "properties": { + "migrationExecution": { + "description": "The relative resource name of the migration execution, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaCustomRegionMetadata": { + "description": "Metadata about a custom region. This is only populated if the region is a custom region. For single/multi regions, it will be empty.", + "id": "GoogleCloudMetastoreV1betaCustomRegionMetadata", + "properties": { + "optionalReadOnlyRegions": { + "description": "The read-only regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requiredReadWriteRegions": { + "description": "The read-write regions for this custom region.", + "items": { + "type": "string" + }, + "type": "array" + }, + "witnessRegion": { + "description": "The Spanner witness region for this custom region.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaErrorDetails": { + "description": "Error details in public error message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaErrorDetails", + "properties": { + "details": { + "additionalProperties": { + "type": "string" + }, + "description": "Additional structured details about this error.Keys define the failure items. Value describes the exception or details of the item.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaHiveMetastoreVersion": { + "description": "A specification of a supported version of the Hive Metastore software.", + "id": "GoogleCloudMetastoreV1betaHiveMetastoreVersion", + "properties": { + "isDefault": { + "description": "Whether version will be chosen by the server if a metastore service is created with a HiveMetastoreConfig that omits the version.", + "type": "boolean" + }, + "version": { + "description": "The semantic version of the Hive Metastore software.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaLocationMetadata": { + "description": "Metadata about the service in a location.", + "id": "GoogleCloudMetastoreV1betaLocationMetadata", + "properties": { + "customRegionMetadata": { + "description": "Possible configurations supported if the current region is a custom region.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaCustomRegionMetadata" + }, + "type": "array" + }, + "multiRegionMetadata": { + "$ref": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "description": "The multi-region metadata if the current region is a multi-region." + }, + "supportedHiveMetastoreVersions": { + "description": "The versions of Hive Metastore that can be used when creating a new metastore service in this location. The server guarantees that exactly one HiveMetastoreVersion in the list will set is_default.", + "items": { + "$ref": "GoogleCloudMetastoreV1betaHiveMetastoreVersion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse": { + "description": "Response message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV1betaMultiRegionMetadata": { + "description": "The metadata for the multi-region that includes the constituent regions. The metadata is only populated if the region is multi-region. For single region or custom dual region, it will be empty.", + "id": "GoogleCloudMetastoreV1betaMultiRegionMetadata", + "properties": { + "constituentRegions": { + "description": "The regions constituting the multi-region.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaOperationMetadata": { + "description": "Represents the metadata of a long-running operation.", + "id": "GoogleCloudMetastoreV1betaOperationMetadata", + "properties": { + "apiVersion": { + "description": "Output only. API version used to start the operation.", + "readOnly": true, + "type": "string" + }, + "createTime": { + "description": "Output only. The time the operation was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the operation finished running.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "requestedCancellation": { + "description": "Output only. Identifies whether the caller has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.", + "readOnly": true, + "type": "boolean" + }, + "statusMessage": { + "description": "Output only. Human-readable status of the operation, if any.", + "readOnly": true, + "type": "string" + }, + "target": { + "description": "Output only. Server-defined resource path for the target of the operation.", + "readOnly": true, + "type": "string" + }, + "verb": { + "description": "Output only. Name of the verb executed by the operation.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV1betaQueryMetadataResponse": { + "description": "Response message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV1betaQueryMetadataResponse", + "properties": { + "resultManifestUri": { + "description": "The manifest URI is link to a JSON instance in Cloud Storage. This instance manifests immediately along with QueryMetadataResponse. The content of the URI is not retriable until the long-running operation query against the metadata finishes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest": { + "description": "Request message for DataprocMetastore.AlterMetadataResourceLocation.", + "id": "GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest", + "properties": { + "locationUri": { + "description": "Required. The new location URI for the metadata resource.", + "type": "string" + }, + "resourceName": { + "description": "Required. The relative metadata resource name in the following format.databases/{database_id} or databases/{database_id}/tables/{table_id} or databases/{database_id}/tables/{table_id}/partitions/{partition_id}", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaAlterTablePropertiesRequest": { + "description": "Request message for DataprocMetastore.AlterTableProperties.", + "id": "GoogleCloudMetastoreV2betaAlterTablePropertiesRequest", + "properties": { + "properties": { + "additionalProperties": { + "type": "string" + }, + "description": "A map that describes the desired values to mutate. If update_mask is empty, the properties will not update. Otherwise, the properties only alters the value whose associated paths exist in the update mask", + "type": "object" + }, + "tableName": { + "description": "Required. The name of the table containing the properties you're altering in the following format.databases/{database_id}/tables/{table_id}", + "type": "string" + }, + "updateMask": { + "description": "A field mask that specifies the metadata table properties that are overwritten by the update. Fields specified in the update_mask are relative to the resource (not to the full request). A field is overwritten if it is in the mask.For example, given the target properties: properties { a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if the field mask is:paths: \"properties.b\", \"properties.c\"then the result will be: properties { a: 1 b: 3 c: 4 } ", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaAutoscalingConfig": { + "description": "Represents the autoscaling configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2betaAutoscalingConfig", + "properties": { + "autoscalingEnabled": { + "description": "Optional. Whether or not autoscaling is enabled for this service.", + "type": "boolean" + }, + "autoscalingFactor": { + "description": "Output only. The scaling factor of a service with autoscaling enabled.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "limitConfig": { + "$ref": "GoogleCloudMetastoreV2betaLimitConfig", + "description": "Optional. The LimitConfig of the service." + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaAuxiliaryVersionConfig": { + "description": "Configuration information for the auxiliary service versions.", + "id": "GoogleCloudMetastoreV2betaAuxiliaryVersionConfig", + "properties": { + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "A mapping of Hive metastore configuration key-value pairs to apply to the auxiliary Hive metastore (configured in hive-site.xml) in addition to the primary version's overrides. If keys are present in both the auxiliary version's overrides and the primary version's overrides, the value from the auxiliary version's overrides takes precedence.", + "type": "object" + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the auxiliary metastore service, includes version and region data.", + "items": { + "$ref": "GoogleCloudMetastoreV2betaEndpoint" + }, + "readOnly": true, + "type": "array" + }, + "version": { + "description": "The Hive metastore version of the auxiliary service. It must be less than the primary Hive metastore service's version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaBackup": { + "description": "The details of a backup resource.", + "id": "GoogleCloudMetastoreV2betaBackup", + "properties": { + "createTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the backup.", + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the backup finished creating.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Immutable. The relative resource name of the backup, in the following form:projects/{project_number}/locations/{location_id}/services/{service_id}/backups/{backup_id}", + "type": "string" + }, + "restoringServices": { + "description": "Output only. Services that are restoring from the backup.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "serviceRevision": { + "$ref": "GoogleCloudMetastoreV2betaService", + "description": "Output only. The revision of the service at the time of backup.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "DELETING", + "ACTIVE", + "FAILED", + "RESTORING" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is being created.", + "The backup is being deleted.", + "The backup is active and ready to use.", + "The backup failed.", + "The backup is being restored." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaCancelMigrationRequest": { + "description": "Request message for DataprocMetastore.CancelMigration.", + "id": "GoogleCloudMetastoreV2betaCancelMigrationRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2betaCdcConfig": { + "description": "Configuration information to start the Change Data Capture (CDC) streams from customer database to backend database of Dataproc Metastore.", + "id": "GoogleCloudMetastoreV2betaCdcConfig", + "properties": { + "bucket": { + "description": "Optional. The bucket to write the intermediate stream event data in. The bucket name must be without any prefix like \"gs://\". See the bucket naming requirements (https://cloud.google.com/storage/docs/buckets#naming). This field is optional. If not set, the Artifacts Cloud Storage bucket will be used.", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Datastream service should use for the MySQL connection. This field is not returned on request.", + "type": "string" + }, + "reverseProxySubnet": { + "description": "Required. The URL of the subnetwork resource to create the VM instance hosting the reverse proxy in. More context in https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy The subnetwork should reside in the network provided in the request that Datastream will peer to and should be in the same region as Datastream, in the following format. projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "rootPath": { + "description": "Optional. The root path inside the Cloud Storage bucket. The stream event data will be written to this path. The default value is /migration.", + "type": "string" + }, + "subnetIpRange": { + "description": "Required. A /29 CIDR IP range for peering with datastream.", + "type": "string" + }, + "username": { + "description": "Required. The username that the Datastream service should use for the MySQL connection.", + "type": "string" + }, + "vpcNetwork": { + "description": "Required. Fully qualified name of the Cloud SQL instance's VPC network or the shared VPC network that Datastream will peer to, in the following format: projects/{project_id}/locations/global/networks/{network_id}. More context in https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaCloudSQLConnectionConfig": { + "description": "Configuration information to establish customer database connection before the cutover phase of migration", + "id": "GoogleCloudMetastoreV2betaCloudSQLConnectionConfig", + "properties": { + "hiveDatabaseName": { + "description": "Required. The hive database name.", + "type": "string" + }, + "instanceConnectionName": { + "description": "Required. Cloud SQL database connection name (project_id:region:instance_name)", + "type": "string" + }, + "ipAddress": { + "description": "Required. The private IP address of the Cloud SQL instance.", + "type": "string" + }, + "natSubnet": { + "description": "Required. The relative resource name of the subnetwork to be used for Private Service Connect. Note that this cannot be a regular subnet and is used only for NAT. (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets) This subnet is used to publish the SOCKS5 proxy service. The subnet size must be at least /29 and it should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "password": { + "description": "Required. Input only. The password for the user that Dataproc Metastore service will be using to connect to the database. This field is not returned on request.", + "type": "string" + }, + "port": { + "description": "Required. The network port of the database.", + "format": "int32", + "type": "integer" + }, + "proxySubnet": { + "description": "Required. The relative resource name of the subnetwork to deploy the SOCKS5 proxy service in. The subnetwork should reside in a network through which the Cloud SQL instance is accessible. The resource name should be in the format, projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id}", + "type": "string" + }, + "username": { + "description": "Required. The username that Dataproc Metastore service will use to connect to the database.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaCloudSQLMigrationConfig": { + "description": "Configuration information for migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore.", + "id": "GoogleCloudMetastoreV2betaCloudSQLMigrationConfig", + "properties": { + "cdcConfig": { + "$ref": "GoogleCloudMetastoreV2betaCdcConfig", + "description": "Required. Configuration information to start the Change Data Capture (CDC) streams from customer database to backend database of Dataproc Metastore. Dataproc Metastore switches to using its backend database after the cutover phase of migration." + }, + "cloudSqlConnectionConfig": { + "$ref": "GoogleCloudMetastoreV2betaCloudSQLConnectionConfig", + "description": "Required. Configuration information to establish customer database connection before the cutover phase of migration" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaCompleteMigrationRequest": { + "description": "Request message for DataprocMetastore.CompleteMigration.", + "id": "GoogleCloudMetastoreV2betaCompleteMigrationRequest", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2betaDataCatalogConfig": { + "description": "Specifies how metastore metadata should be integrated with the Data Catalog service.", + "id": "GoogleCloudMetastoreV2betaDataCatalogConfig", + "properties": { + "enabled": { + "description": "Optional. Defines whether the metastore metadata should be synced to Data Catalog. The default value is to disable syncing metastore metadata to Data Catalog.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaDatabaseDump": { + "description": "A specification of the location of and metadata about a database dump from a relational database management system.", + "id": "GoogleCloudMetastoreV2betaDatabaseDump", + "properties": { + "gcsUri": { + "description": "Required. A Cloud Storage object or folder URI that specifies the source from which to import metadata. It must begin with gs://.", + "type": "string" + }, + "type": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaEncryptionConfig": { + "description": "Encryption settings for the service.", + "id": "GoogleCloudMetastoreV2betaEncryptionConfig", + "properties": {}, + "type": "object" + }, + "GoogleCloudMetastoreV2betaEndpoint": { + "description": "An endpoint used to access the metastore service.", + "id": "GoogleCloudMetastoreV2betaEndpoint", + "properties": { + "endpointUri": { + "description": "Output only. The URI of the endpoint used to access the metastore service.", + "readOnly": true, + "type": "string" + }, + "region": { + "description": "Output only. The region where the endpoint is located.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaExportMetadataRequest": { + "description": "Request message for DataprocMetastore.ExportMetadata.", + "id": "GoogleCloudMetastoreV2betaExportMetadataRequest", + "properties": { + "databaseDumpType": { + "description": "Optional. The type of the database dump. If unspecified, defaults to MYSQL.", + "enum": [ + "TYPE_UNSPECIFIED", + "MYSQL", + "AVRO" + ], + "enumDescriptions": [ + "The type of the database dump is unknown.", + "Database dump is a MySQL dump file.", + "Database dump contains Avro files." + ], + "type": "string" + }, + "destinationGcsFolder": { + "description": "A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing exported files will be created below it.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaHiveMetastoreConfig": { + "description": "Specifies configuration information specific to running Hive metastore software as the metastore service.", + "id": "GoogleCloudMetastoreV2betaHiveMetastoreConfig", + "properties": { + "auxiliaryVersions": { + "additionalProperties": { + "$ref": "GoogleCloudMetastoreV2betaAuxiliaryVersionConfig" + }, + "description": "Optional. A mapping of Hive metastore version to the auxiliary version configuration. When specified, a secondary Hive metastore service is created along with the primary service. All auxiliary versions must be less than the service's primary version. The key is the auxiliary service name and it must match the regular expression a-z?. This means that the first character must be a lowercase letter, and all the following characters must be hyphens, lowercase letters, or digits, except the last character, which cannot be a hyphen.", + "type": "object" + }, + "configOverrides": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. A mapping of Hive metastore configuration key-value pairs to apply to the Hive metastore (configured in hive-site.xml). The mappings override system defaults (some keys cannot be overridden). These overrides are also applied to auxiliary versions and can be further customized in the auxiliary version's AuxiliaryVersionConfig.", + "type": "object" + }, + "endpointProtocol": { + "description": "Optional. The protocol to use for the metastore service endpoint. If unspecified, defaults to GRPC.", + "enum": [ + "ENDPOINT_PROTOCOL_UNSPECIFIED", + "THRIFT", + "GRPC" + ], + "enumDescriptions": [ + "The protocol is not set.", + "Use the legacy Apache Thrift protocol for the metastore service endpoint.", + "Use the modernized gRPC protocol for the metastore service endpoint." + ], + "type": "string" + }, + "version": { + "description": "Immutable. The Hive metastore schema version.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaImportMetadataRequest": { + "description": "Request message for DataprocMetastore.CreateMetadataImport.", + "id": "GoogleCloudMetastoreV2betaImportMetadataRequest", + "properties": { + "databaseDump": { + "$ref": "GoogleCloudMetastoreV2betaDatabaseDump", + "description": "Immutable. A database dump from a pre-existing metastore's database." + }, + "description": { + "description": "Optional. The description of the metadata import.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaLatestBackup": { + "description": "The details of the latest scheduled backup.", + "id": "GoogleCloudMetastoreV2betaLatestBackup", + "properties": { + "backupId": { + "description": "Output only. The ID of an in-progress scheduled backup. Empty if no backup is in progress.", + "readOnly": true, + "type": "string" + }, + "duration": { + "description": "Output only. The duration of the backup completion.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The time when the backup was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the backup.", + "enum": [ + "STATE_UNSPECIFIED", + "IN_PROGRESS", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state of the backup is unknown.", + "The backup is in progress.", + "The backup completed.", + "The backup failed." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaLimitConfig": { + "description": "Represents the autoscaling limit configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2betaLimitConfig", + "properties": { + "maxScalingFactor": { + "description": "Optional. The highest scaling factor that the service should be autoscaled to.", + "format": "int32", + "type": "integer" + }, + "minScalingFactor": { + "description": "Optional. The lowest scaling factor that the service should be autoscaled to.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaListBackupsResponse": { + "description": "Response message for DataprocMetastore.ListBackups.", + "id": "GoogleCloudMetastoreV2betaListBackupsResponse", + "properties": { + "backups": { + "description": "The backups of the specified service.", + "items": { + "$ref": "GoogleCloudMetastoreV2betaBackup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that 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.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaListMigrationExecutionsResponse": { + "description": "Response message for DataprocMetastore.ListMigrationExecutions.", + "id": "GoogleCloudMetastoreV2betaListMigrationExecutionsResponse", + "properties": { + "migrationExecutions": { + "description": "The migration executions on the specified service.", + "items": { + "$ref": "GoogleCloudMetastoreV2betaMigrationExecution" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token that 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.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaListServicesResponse": { + "description": "Response message for DataprocMetastore.ListServices.", + "id": "GoogleCloudMetastoreV2betaListServicesResponse", + "properties": { + "nextPageToken": { + "description": "A token that can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", + "type": "string" + }, + "services": { + "description": "The services in the specified location.", + "items": { + "$ref": "GoogleCloudMetastoreV2betaService" + }, + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaMetadataIntegration": { + "description": "Specifies how metastore metadata should be integrated with external services.", + "id": "GoogleCloudMetastoreV2betaMetadataIntegration", + "properties": { + "dataCatalogConfig": { + "$ref": "GoogleCloudMetastoreV2betaDataCatalogConfig", + "description": "Optional. The integration config for the Data Catalog service." + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaMigrationExecution": { + "description": "The details of a migration execution resource.", + "id": "GoogleCloudMetastoreV2betaMigrationExecution", + "properties": { + "cloudSqlMigrationConfig": { + "$ref": "GoogleCloudMetastoreV2betaCloudSQLMigrationConfig", + "description": "Configuration information specific to migrating from self-managed hive metastore on Google Cloud using Cloud SQL as the backend database to Dataproc Metastore." + }, + "createTime": { + "description": "Output only. The time when the migration execution was started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time when the migration execution finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "name": { + "description": "Output only. The relative resource name of the migration execution, in the following form: projects/{project_number}/locations/{location_id}/services/{service_id}/migrationExecutions/{migration_execution_id}", + "readOnly": true, + "type": "string" + }, + "phase": { + "description": "Output only. The current phase of the migration execution.", + "enum": [ + "PHASE_UNSPECIFIED", + "REPLICATION", + "CUTOVER" + ], + "enumDescriptions": [ + "The phase of the migration execution is unknown.", + "Replication phase refers to the migration phase when Dataproc Metastore is running a pipeline to replicate changes in the customer database to its backend database. During this phase, Dataproc Metastore uses the customer database as the hive metastore backend database.", + "Cutover phase refers to the migration phase when Dataproc Metastore switches to using its own backend database. Migration enters this phase when customer is done migrating all their clusters/workloads to Dataproc Metastore and triggers CompleteMigration." + ], + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the migration execution.", + "enum": [ + "STATE_UNSPECIFIED", + "STARTING", + "RUNNING", + "CANCELLING", + "AWAITING_USER_ACTION", + "SUCCEEDED", + "FAILED", + "CANCELLED", + "DELETING" + ], + "enumDescriptions": [ + "The state of the migration execution is unknown.", + "The migration execution is starting.", + "The migration execution is running.", + "The migration execution is in the process of being cancelled.", + "The migration execution is awaiting user action.", + "The migration execution has completed successfully.", + "The migration execution has failed.", + "The migration execution is cancelled.", + "The migration execution is being deleted." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the migration execution.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest": { + "description": "Request message for DataprocMetastore.MoveTableToDatabase.", + "id": "GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest", + "properties": { + "dbName": { + "description": "Required. The name of the database where the table resides.", + "type": "string" + }, + "destinationDbName": { + "description": "Required. The name of the database where the table should be moved.", + "type": "string" + }, + "tableName": { + "description": "Required. The name of the table to be moved.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaQueryMetadataRequest": { + "description": "Request message for DataprocMetastore.QueryMetadata.", + "id": "GoogleCloudMetastoreV2betaQueryMetadataRequest", + "properties": { + "query": { + "description": "Required. A read-only SQL query to execute against the metadata database. The query cannot change or mutate the data.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaRemoveIamPolicyRequest": { + "description": "Request message for DataprocMetastore.RemoveIamPolicy.", + "id": "GoogleCloudMetastoreV2betaRemoveIamPolicyRequest", + "properties": { + "asynchronous": { + "description": "Optional. Removes IAM policy attached to database or table asynchronously when it is set. The default is false.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaRemoveIamPolicyResponse": { + "description": "Response message for DataprocMetastore.RemoveIamPolicy.", + "id": "GoogleCloudMetastoreV2betaRemoveIamPolicyResponse", + "properties": { + "success": { + "description": "True if the policy is successfully removed.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaRestoreServiceRequest": { + "description": "Request message for DataprocMetastore.Restore.", + "id": "GoogleCloudMetastoreV2betaRestoreServiceRequest", + "properties": { + "backup": { + "description": "Optional. The relative resource name of the metastore service backup to restore from, in the following form:projects/{project_id}/locations/{location_id}/services/{service_id}/backups/{backup_id}. Mutually exclusive with backup_location, and exactly one of the two must be set.", + "type": "string" + }, + "backupLocation": { + "description": "Optional. A Cloud Storage URI specifying the location of the backup artifacts, namely - backup avro files under \"avro/\", backup_metastore.json and service.json, in the following form:gs://. Mutually exclusive with backup, and exactly one of the two must be set.", + "type": "string" + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + }, + "restoreType": { + "description": "Optional. The type of restore. If unspecified, defaults to METADATA_ONLY.", + "enum": [ + "RESTORE_TYPE_UNSPECIFIED", + "FULL", + "METADATA_ONLY" + ], + "enumDescriptions": [ + "The restore type is unknown.", + "The service's metadata and configuration are restored.", + "Only the service's metadata is restored." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaScalingConfig": { + "description": "Represents the scaling configuration of a metastore service.", + "id": "GoogleCloudMetastoreV2betaScalingConfig", + "properties": { + "autoscalingConfig": { + "$ref": "GoogleCloudMetastoreV2betaAutoscalingConfig", + "description": "Optional. The autoscaling configuration." + }, + "scalingFactor": { + "description": "Optional. Scaling factor from 1 to 5, increments of 1.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaScheduledBackup": { + "description": "This specifies the configuration of scheduled backup.", + "id": "GoogleCloudMetastoreV2betaScheduledBackup", + "properties": { + "backupLocation": { + "description": "Optional. A Cloud Storage URI of a folder, in the format gs:///. A sub-folder containing backup files will be stored below it.", + "type": "string" + }, + "cronSchedule": { + "description": "Optional. The scheduled interval in Cron format, see https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is not enabled. Must be specified to enable scheduled backups.", + "type": "string" + }, + "enabled": { + "description": "Optional. Defines whether the scheduled backup is enabled. The default value is false.", + "type": "boolean" + }, + "latestBackup": { + "$ref": "GoogleCloudMetastoreV2betaLatestBackup", + "description": "Output only. The details of the latest scheduled backup.", + "readOnly": true + }, + "nextScheduledTime": { + "description": "Output only. The time when the next backups execution is scheduled to start.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "timeZone": { + "description": "Optional. Specifies the time zone to be used when interpreting cron_schedule. Must be a time zone name from the time zone database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is UTC.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaService": { + "description": "A managed metastore service that serves metadata queries.", + "id": "GoogleCloudMetastoreV2betaService", + "properties": { + "createTime": { + "description": "Output only. The time when the metastore service was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "encryptionConfig": { + "$ref": "GoogleCloudMetastoreV2betaEncryptionConfig", + "description": "Immutable. Information used to configure the Dataproc Metastore service to encrypt customer data at rest. Cannot be updated." + }, + "endpoints": { + "description": "Output only. The list of endpoints used to access the metastore service.", + "items": { + "$ref": "GoogleCloudMetastoreV2betaEndpoint" + }, + "readOnly": true, + "type": "array" + }, + "hiveMetastoreConfig": { + "$ref": "GoogleCloudMetastoreV2betaHiveMetastoreConfig", + "description": "Configuration information specific to running Hive metastore software as the metastore service." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "User-defined labels for the metastore service.", + "type": "object" + }, + "metadataIntegration": { + "$ref": "GoogleCloudMetastoreV2betaMetadataIntegration", + "description": "Optional. The setting that defines how metastore metadata should be integrated with external services and systems." + }, + "name": { + "description": "Immutable. The relative resource name of the metastore service, in the following format:projects/{project_number}/locations/{location_id}/services/{service_id}.", + "type": "string" + }, + "scalingConfig": { + "$ref": "GoogleCloudMetastoreV2betaScalingConfig", + "description": "Optional. Scaling configuration of the metastore service." + }, + "scheduledBackup": { + "$ref": "GoogleCloudMetastoreV2betaScheduledBackup", + "description": "Optional. The configuration of scheduled backup for the metastore service." + }, + "state": { + "description": "Output only. The current state of the metastore service.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "SUSPENDING", + "SUSPENDED", + "UPDATING", + "DELETING", + "ERROR", + "MIGRATING" + ], + "enumDescriptions": [ + "The state of the metastore service is unknown.", + "The metastore service is in the process of being created.", + "The metastore service is running and ready to serve queries.", + "The metastore service is entering suspension. Its query-serving availability may cease unexpectedly.", + "The metastore service is suspended and unable to serve queries.", + "The metastore service is being updated. It remains usable but cannot accept additional update requests or be deleted at this time.", + "The metastore service is undergoing deletion. It cannot be used.", + "The metastore service has encountered an error and cannot be used. The metastore service should be deleted.", + "The metastore service is processing a managed migration." + ], + "readOnly": true, + "type": "string" + }, + "stateMessage": { + "description": "Output only. Additional information about the current state of the metastore service, if available.", + "readOnly": true, + "type": "string" + }, + "uid": { + "description": "Output only. The globally unique resource identifier of the metastore service.", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the metastore service was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "warehouseGcsUri": { + "description": "Required. A Cloud Storage URI (starting with gs://) that specifies the default warehouse directory of the Hive Metastore.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudMetastoreV2betaStartMigrationRequest": { + "description": "Request message for DataprocMetastore.StartMigration.", + "id": "GoogleCloudMetastoreV2betaStartMigrationRequest", + "properties": { + "migrationExecution": { + "$ref": "GoogleCloudMetastoreV2betaMigrationExecution", + "description": "Required. The configuration details for the migration." + }, + "requestId": { + "description": "Optional. A request ID. Specify a unique request ID to allow the server to ignore the request if it has completed. The server will ignore subsequent requests that provide a duplicate request ID for at least 60 minutes after the first request.For example, if an initial request times out, followed by another request with the same request ID, the server ignores the second request to prevent the creation of duplicate commitments.The request ID must be a valid UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero UUID (00000000-0000-0000-0000-000000000000) is not supported.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC (https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Dataproc Metastore API", + "version": "v2beta", + "version_module": true +} \ No newline at end of file diff --git a/metastore/v2beta/metastore-gen.go b/metastore/v2beta/metastore-gen.go new file mode 100644 index 00000000000..4dec99e2ec5 --- /dev/null +++ b/metastore/v2beta/metastore-gen.go @@ -0,0 +1,4855 @@ +// Copyright 2024 Google LLC. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Code generated file. DO NOT EDIT. + +// Package metastore provides access to the Dataproc Metastore API. +// +// For product documentation, see: https://cloud.google.com/dataproc-metastore/docs +// +// # Library status +// +// These client libraries are officially supported by Google. However, this +// library is considered complete and is in maintenance mode. This means +// that we will address critical bugs and security issues but will not add +// any new features. +// +// When possible, we recommend using our newer +// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) +// that are still actively being worked and iterated on. +// +// # Creating a client +// +// Usage example: +// +// import "google.golang.org/api/metastore/v2beta" +// ... +// ctx := context.Background() +// metastoreService, err := metastore.NewService(ctx) +// +// In this example, Google Application Default Credentials are used for +// authentication. For information on how to create and obtain Application +// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. +// +// # Other authentication options +// +// To use an API key for authentication (note: some APIs do not support API +// keys), use [google.golang.org/api/option.WithAPIKey]: +// +// metastoreService, err := metastore.NewService(ctx, option.WithAPIKey("AIza...")) +// +// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth +// flow, use [google.golang.org/api/option.WithTokenSource]: +// +// config := &oauth2.Config{...} +// // ... +// token, err := config.Exchange(ctx, ...) +// metastoreService, err := metastore.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) +// +// See [google.golang.org/api/option.ClientOption] for details on options. +package metastore // import "google.golang.org/api/metastore/v2beta" + +import ( + "bytes" + "context" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "net/url" + "strconv" + "strings" + + googleapi "google.golang.org/api/googleapi" + internal "google.golang.org/api/internal" + gensupport "google.golang.org/api/internal/gensupport" + option "google.golang.org/api/option" + internaloption "google.golang.org/api/option/internaloption" + htransport "google.golang.org/api/transport/http" +) + +// Always reference these packages, just in case the auto-generated code +// below doesn't. +var _ = bytes.NewBuffer +var _ = strconv.Itoa +var _ = fmt.Sprintf +var _ = json.NewDecoder +var _ = io.Copy +var _ = url.Parse +var _ = gensupport.MarshalJSON +var _ = googleapi.Version +var _ = errors.New +var _ = strings.Replace +var _ = context.Canceled +var _ = internaloption.WithDefaultEndpoint +var _ = internal.Version + +const apiId = "metastore:v2beta" +const apiName = "metastore" +const apiVersion = "v2beta" +const basePath = "https://metastore.googleapis.com/" +const basePathTemplate = "https://metastore.UNIVERSE_DOMAIN/" +const mtlsBasePath = "https://metastore.mtls.googleapis.com/" + +// OAuth2 scopes used by this API. +const ( + // See, edit, configure, and delete your Google Cloud data and see the email + // address for your Google Account. + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" +) + +// NewService creates a new Service. +func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { + scopesOption := internaloption.WithDefaultScopes( + "https://www.googleapis.com/auth/cloud-platform", + ) + // NOTE: prepend, so we don't override user-specified scopes. + opts = append([]option.ClientOption{scopesOption}, opts...) + opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) + opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) + opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) + opts = append(opts, internaloption.EnableNewAuthLibrary()) + client, endpoint, err := htransport.NewClient(ctx, opts...) + if err != nil { + return nil, err + } + s, err := New(client) + if err != nil { + return nil, err + } + if endpoint != "" { + s.BasePath = endpoint + } + return s, nil +} + +// New creates a new Service. It uses the provided http.Client for requests. +// +// Deprecated: please use NewService instead. +// To provide a custom HTTP client, use option.WithHTTPClient. +// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. +func New(client *http.Client) (*Service, error) { + if client == nil { + return nil, errors.New("client is nil") + } + s := &Service{client: client, BasePath: basePath} + s.Projects = NewProjectsService(s) + return s, nil +} + +type Service struct { + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment + + Projects *ProjectsService +} + +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + +func NewProjectsService(s *Service) *ProjectsService { + rs := &ProjectsService{s: s} + rs.Locations = NewProjectsLocationsService(s) + return rs +} + +type ProjectsService struct { + s *Service + + Locations *ProjectsLocationsService +} + +func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { + rs := &ProjectsLocationsService{s: s} + rs.Services = NewProjectsLocationsServicesService(s) + return rs +} + +type ProjectsLocationsService struct { + s *Service + + Services *ProjectsLocationsServicesService +} + +func NewProjectsLocationsServicesService(s *Service) *ProjectsLocationsServicesService { + rs := &ProjectsLocationsServicesService{s: s} + rs.Backups = NewProjectsLocationsServicesBackupsService(s) + rs.MigrationExecutions = NewProjectsLocationsServicesMigrationExecutionsService(s) + return rs +} + +type ProjectsLocationsServicesService struct { + s *Service + + Backups *ProjectsLocationsServicesBackupsService + + MigrationExecutions *ProjectsLocationsServicesMigrationExecutionsService +} + +func NewProjectsLocationsServicesBackupsService(s *Service) *ProjectsLocationsServicesBackupsService { + rs := &ProjectsLocationsServicesBackupsService{s: s} + return rs +} + +type ProjectsLocationsServicesBackupsService struct { + s *Service +} + +func NewProjectsLocationsServicesMigrationExecutionsService(s *Service) *ProjectsLocationsServicesMigrationExecutionsService { + rs := &ProjectsLocationsServicesMigrationExecutionsService{s: s} + return rs +} + +type ProjectsLocationsServicesMigrationExecutionsService struct { + s *Service +} + +// GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1AlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1CustomRegionMetadata: Metadata about a custom region. +// This is only populated if the region is a custom region. For single/multi +// regions, it will be empty. +type GoogleCloudMetastoreV1CustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1CustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1CustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1ErrorDetails: Error details in public error message +// for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1ErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1ErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1ErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1HiveMetastoreVersion: A specification of a supported +// version of the Hive Metastore software. +type GoogleCloudMetastoreV1HiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1HiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1HiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1LocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1LocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1CustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1MultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1HiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1LocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1LocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1MoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1MoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1MultiRegionMetadata: The metadata for the multi-region +// that includes the constituent regions. The metadata is only populated if the +// region is multi-region. For single region or custom dual region, it will be +// empty. +type GoogleCloudMetastoreV1MultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1MultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1MultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1OperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1OperationMetadata 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. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1OperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1OperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1QueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1QueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1QueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1QueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1alphaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1alphaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1alphaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1alphaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1alphaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1alphaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1alphaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1alphaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1alphaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1alphaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1alphaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1alphaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1alphaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1alphaOperationMetadata 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. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1alphaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1alphaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1alphaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1alphaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse: Response +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV1betaAlterMetadataResourceLocationResponse struct { +} + +// GoogleCloudMetastoreV1betaCancelMigrationResponse: Response message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV1betaCancelMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCancelMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCancelMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCompleteMigrationResponse: Response message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV1betaCompleteMigrationResponse struct { + // MigrationExecution: The relative resource name of the migration execution, + // in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // migrationExecutions/{migration_execution_id}. + MigrationExecution string `json:"migrationExecution,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCompleteMigrationResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCompleteMigrationResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaCustomRegionMetadata: Metadata about a custom +// region. This is only populated if the region is a custom region. For +// single/multi regions, it will be empty. +type GoogleCloudMetastoreV1betaCustomRegionMetadata struct { + // OptionalReadOnlyRegions: The read-only regions for this custom region. + OptionalReadOnlyRegions []string `json:"optionalReadOnlyRegions,omitempty"` + // RequiredReadWriteRegions: The read-write regions for this custom region. + RequiredReadWriteRegions []string `json:"requiredReadWriteRegions,omitempty"` + // WitnessRegion: The Spanner witness region for this custom region. + WitnessRegion string `json:"witnessRegion,omitempty"` + // ForceSendFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "OptionalReadOnlyRegions") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaCustomRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaCustomRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaErrorDetails: Error details in public error +// message for DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaErrorDetails struct { + // Details: Additional structured details about this error.Keys define the + // failure items. Value describes the exception or details of the item. + Details map[string]string `json:"details,omitempty"` + // ForceSendFields is a list of field names (e.g. "Details") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Details") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaErrorDetails) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaErrorDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaHiveMetastoreVersion: A specification of a +// supported version of the Hive Metastore software. +type GoogleCloudMetastoreV1betaHiveMetastoreVersion struct { + // IsDefault: Whether version will be chosen by the server if a metastore + // service is created with a HiveMetastoreConfig that omits the version. + IsDefault bool `json:"isDefault,omitempty"` + // Version: The semantic version of the Hive Metastore software. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "IsDefault") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "IsDefault") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaHiveMetastoreVersion) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaHiveMetastoreVersion + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaLocationMetadata: Metadata about the service in a +// location. +type GoogleCloudMetastoreV1betaLocationMetadata struct { + // CustomRegionMetadata: Possible configurations supported if the current + // region is a custom region. + CustomRegionMetadata []*GoogleCloudMetastoreV1betaCustomRegionMetadata `json:"customRegionMetadata,omitempty"` + // MultiRegionMetadata: The multi-region metadata if the current region is a + // multi-region. + MultiRegionMetadata *GoogleCloudMetastoreV1betaMultiRegionMetadata `json:"multiRegionMetadata,omitempty"` + // SupportedHiveMetastoreVersions: The versions of Hive Metastore that can be + // used when creating a new metastore service in this location. The server + // guarantees that exactly one HiveMetastoreVersion in the list will set + // is_default. + SupportedHiveMetastoreVersions []*GoogleCloudMetastoreV1betaHiveMetastoreVersion `json:"supportedHiveMetastoreVersions,omitempty"` + // ForceSendFields is a list of field names (e.g. "CustomRegionMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CustomRegionMetadata") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaLocationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaLocationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse: Response message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV1betaMoveTableToDatabaseResponse struct { +} + +// GoogleCloudMetastoreV1betaMultiRegionMetadata: The metadata for the +// multi-region that includes the constituent regions. The metadata is only +// populated if the region is multi-region. For single region or custom dual +// region, it will be empty. +type GoogleCloudMetastoreV1betaMultiRegionMetadata struct { + // ConstituentRegions: The regions constituting the multi-region. + ConstituentRegions []string `json:"constituentRegions,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConstituentRegions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConstituentRegions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaMultiRegionMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaMultiRegionMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaOperationMetadata: Represents the metadata of a +// long-running operation. +type GoogleCloudMetastoreV1betaOperationMetadata 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. Identifies whether the caller has + // requested cancellation of the operation. Operations that have successfully + // been cancelled have google.longrunning.Operation.error value with a + // google.rpc.Status.code of 1, corresponding to Code.CANCELLED. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ApiVersion") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaOperationMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaOperationMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV1betaQueryMetadataResponse: Response message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV1betaQueryMetadataResponse struct { + // ResultManifestUri: The manifest URI is link to a JSON instance in Cloud + // Storage. This instance manifests immediately along with + // QueryMetadataResponse. The content of the URI is not retriable until the + // long-running operation query against the metadata finishes. + ResultManifestUri string `json:"resultManifestUri,omitempty"` + // ForceSendFields is a list of field names (e.g. "ResultManifestUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ResultManifestUri") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV1betaQueryMetadataResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV1betaQueryMetadataResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest: Request +// message for DataprocMetastore.AlterMetadataResourceLocation. +type GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest struct { + // LocationUri: Required. The new location URI for the metadata resource. + LocationUri string `json:"locationUri,omitempty"` + // ResourceName: Required. The relative metadata resource name in the following + // format.databases/{database_id} or databases/{database_id}/tables/{table_id} + // or databases/{database_id}/tables/{table_id}/partitions/{partition_id} + ResourceName string `json:"resourceName,omitempty"` + // ForceSendFields is a list of field names (e.g. "LocationUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "LocationUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaAlterTablePropertiesRequest: Request message for +// DataprocMetastore.AlterTableProperties. +type GoogleCloudMetastoreV2betaAlterTablePropertiesRequest struct { + // Properties: A map that describes the desired values to mutate. If + // update_mask is empty, the properties will not update. Otherwise, the + // properties only alters the value whose associated paths exist in the update + // mask + Properties map[string]string `json:"properties,omitempty"` + // TableName: Required. The name of the table containing the properties you're + // altering in the following format.databases/{database_id}/tables/{table_id} + TableName string `json:"tableName,omitempty"` + // UpdateMask: A field mask that specifies the metadata table properties that + // are overwritten by the update. Fields specified in the update_mask are + // relative to the resource (not to the full request). A field is overwritten + // if it is in the mask.For example, given the target properties: properties { + // a: 1 b: 2 } And an update properties: properties { a: 2 b: 3 c: 4 } then if + // the field mask is:paths: "properties.b", "properties.c"then the result will + // be: properties { a: 1 b: 3 c: 4 } + UpdateMask string `json:"updateMask,omitempty"` + // ForceSendFields is a list of field names (e.g. "Properties") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Properties") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaAlterTablePropertiesRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaAlterTablePropertiesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaAutoscalingConfig: Represents the autoscaling +// configuration of a metastore service. +type GoogleCloudMetastoreV2betaAutoscalingConfig struct { + // AutoscalingEnabled: Optional. Whether or not autoscaling is enabled for this + // service. + AutoscalingEnabled bool `json:"autoscalingEnabled,omitempty"` + // AutoscalingFactor: Output only. The scaling factor of a service with + // autoscaling enabled. + AutoscalingFactor int64 `json:"autoscalingFactor,omitempty"` + // LimitConfig: Optional. The LimitConfig of the service. + LimitConfig *GoogleCloudMetastoreV2betaLimitConfig `json:"limitConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoscalingEnabled") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutoscalingEnabled") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaAutoscalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaAutoscalingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaAuxiliaryVersionConfig: Configuration information +// for the auxiliary service versions. +type GoogleCloudMetastoreV2betaAuxiliaryVersionConfig struct { + // ConfigOverrides: A mapping of Hive metastore configuration key-value pairs + // to apply to the auxiliary Hive metastore (configured in hive-site.xml) in + // addition to the primary version's overrides. If keys are present in both the + // auxiliary version's overrides and the primary version's overrides, the value + // from the auxiliary version's overrides takes precedence. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the auxiliary + // metastore service, includes version and region data. + Endpoints []*GoogleCloudMetastoreV2betaEndpoint `json:"endpoints,omitempty"` + // Version: The Hive metastore version of the auxiliary service. It must be + // less than the primary Hive metastore service's version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "ConfigOverrides") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ConfigOverrides") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaAuxiliaryVersionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaAuxiliaryVersionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaBackup: The details of a backup resource. +type GoogleCloudMetastoreV2betaBackup struct { + // CreateTime: Output only. The time when the backup was started. + CreateTime string `json:"createTime,omitempty"` + // Description: The description of the backup. + Description string `json:"description,omitempty"` + // EndTime: Output only. The time when the backup finished creating. + EndTime string `json:"endTime,omitempty"` + // Name: Immutable. The relative resource name of the backup, in the following + // form:projects/{project_number}/locations/{location_id}/services/{service_id}/ + // backups/{backup_id} + Name string `json:"name,omitempty"` + // RestoringServices: Output only. Services that are restoring from the backup. + RestoringServices []string `json:"restoringServices,omitempty"` + // ServiceRevision: Output only. The revision of the service at the time of + // backup. + ServiceRevision *GoogleCloudMetastoreV2betaService `json:"serviceRevision,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "CREATING" - The backup is being created. + // "DELETING" - The backup is being deleted. + // "ACTIVE" - The backup is active and ready to use. + // "FAILED" - The backup failed. + // "RESTORING" - The backup is being restored. + State string `json:"state,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaCancelMigrationRequest: Request message for +// DataprocMetastore.CancelMigration. +type GoogleCloudMetastoreV2betaCancelMigrationRequest struct { +} + +// GoogleCloudMetastoreV2betaCdcConfig: Configuration information to start the +// Change Data Capture (CDC) streams from customer database to backend database +// of Dataproc Metastore. +type GoogleCloudMetastoreV2betaCdcConfig struct { + // Bucket: Optional. The bucket to write the intermediate stream event data in. + // The bucket name must be without any prefix like "gs://". See the bucket + // naming requirements (https://cloud.google.com/storage/docs/buckets#naming). + // This field is optional. If not set, the Artifacts Cloud Storage bucket will + // be used. + Bucket string `json:"bucket,omitempty"` + // Password: Required. Input only. The password for the user that Datastream + // service should use for the MySQL connection. This field is not returned on + // request. + Password string `json:"password,omitempty"` + // ReverseProxySubnet: Required. The URL of the subnetwork resource to create + // the VM instance hosting the reverse proxy in. More context in + // https://cloud.google.com/datastream/docs/private-connectivity#reverse-csql-proxy + // The subnetwork should reside in the network provided in the request that + // Datastream will peer to and should be in the same region as Datastream, in + // the following format. + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + ReverseProxySubnet string `json:"reverseProxySubnet,omitempty"` + // RootPath: Optional. The root path inside the Cloud Storage bucket. The + // stream event data will be written to this path. The default value is + // /migration. + RootPath string `json:"rootPath,omitempty"` + // SubnetIpRange: Required. A /29 CIDR IP range for peering with datastream. + SubnetIpRange string `json:"subnetIpRange,omitempty"` + // Username: Required. The username that the Datastream service should use for + // the MySQL connection. + Username string `json:"username,omitempty"` + // VpcNetwork: Required. Fully qualified name of the Cloud SQL instance's VPC + // network or the shared VPC network that Datastream will peer to, in the + // following format: + // projects/{project_id}/locations/global/networks/{network_id}. More context + // in + // https://cloud.google.com/datastream/docs/network-connectivity-options#privateconnectivity + VpcNetwork string `json:"vpcNetwork,omitempty"` + // ForceSendFields is a list of field names (e.g. "Bucket") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Bucket") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaCdcConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaCdcConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaCloudSQLConnectionConfig: Configuration +// information to establish customer database connection before the cutover +// phase of migration +type GoogleCloudMetastoreV2betaCloudSQLConnectionConfig struct { + // HiveDatabaseName: Required. The hive database name. + HiveDatabaseName string `json:"hiveDatabaseName,omitempty"` + // InstanceConnectionName: Required. Cloud SQL database connection name + // (project_id:region:instance_name) + InstanceConnectionName string `json:"instanceConnectionName,omitempty"` + // IpAddress: Required. The private IP address of the Cloud SQL instance. + IpAddress string `json:"ipAddress,omitempty"` + // NatSubnet: Required. The relative resource name of the subnetwork to be used + // for Private Service Connect. Note that this cannot be a regular subnet and + // is used only for NAT. + // (https://cloud.google.com/vpc/docs/about-vpc-hosted-services#psc-subnets) + // This subnet is used to publish the SOCKS5 proxy service. The subnet size + // must be at least /29 and it should reside in a network through which the + // Cloud SQL instance is accessible. The resource name should be in the format, + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + NatSubnet string `json:"natSubnet,omitempty"` + // Password: Required. Input only. The password for the user that Dataproc + // Metastore service will be using to connect to the database. This field is + // not returned on request. + Password string `json:"password,omitempty"` + // Port: Required. The network port of the database. + Port int64 `json:"port,omitempty"` + // ProxySubnet: Required. The relative resource name of the subnetwork to + // deploy the SOCKS5 proxy service in. The subnetwork should reside in a + // network through which the Cloud SQL instance is accessible. The resource + // name should be in the format, + // projects/{project_id}/regions/{region_id}/subnetworks/{subnetwork_id} + ProxySubnet string `json:"proxySubnet,omitempty"` + // Username: Required. The username that Dataproc Metastore service will use to + // connect to the database. + Username string `json:"username,omitempty"` + // ForceSendFields is a list of field names (e.g. "HiveDatabaseName") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "HiveDatabaseName") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaCloudSQLConnectionConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaCloudSQLConnectionConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaCloudSQLMigrationConfig: Configuration information +// for migrating from self-managed hive metastore on Google Cloud using Cloud +// SQL as the backend database to Dataproc Metastore. +type GoogleCloudMetastoreV2betaCloudSQLMigrationConfig struct { + // CdcConfig: Required. Configuration information to start the Change Data + // Capture (CDC) streams from customer database to backend database of Dataproc + // Metastore. Dataproc Metastore switches to using its backend database after + // the cutover phase of migration. + CdcConfig *GoogleCloudMetastoreV2betaCdcConfig `json:"cdcConfig,omitempty"` + // CloudSqlConnectionConfig: Required. Configuration information to establish + // customer database connection before the cutover phase of migration + CloudSqlConnectionConfig *GoogleCloudMetastoreV2betaCloudSQLConnectionConfig `json:"cloudSqlConnectionConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "CdcConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CdcConfig") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaCloudSQLMigrationConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaCloudSQLMigrationConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaCompleteMigrationRequest: Request message for +// DataprocMetastore.CompleteMigration. +type GoogleCloudMetastoreV2betaCompleteMigrationRequest struct { +} + +// GoogleCloudMetastoreV2betaDataCatalogConfig: Specifies how metastore +// metadata should be integrated with the Data Catalog service. +type GoogleCloudMetastoreV2betaDataCatalogConfig struct { + // Enabled: Optional. Defines whether the metastore metadata should be synced + // to Data Catalog. The default value is to disable syncing metastore metadata + // to Data Catalog. + Enabled bool `json:"enabled,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaDataCatalogConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaDataCatalogConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaDatabaseDump: A specification of the location of +// and metadata about a database dump from a relational database management +// system. +type GoogleCloudMetastoreV2betaDatabaseDump struct { + // GcsUri: Required. A Cloud Storage object or folder URI that specifies the + // source from which to import metadata. It must begin with gs://. + GcsUri string `json:"gcsUri,omitempty"` + // Type: Optional. The type of the database dump. If unspecified, defaults to + // MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "GcsUri") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "GcsUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaDatabaseDump) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaDatabaseDump + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaEncryptionConfig: Encryption settings for the +// service. +type GoogleCloudMetastoreV2betaEncryptionConfig struct { +} + +// GoogleCloudMetastoreV2betaEndpoint: An endpoint used to access the metastore +// service. +type GoogleCloudMetastoreV2betaEndpoint struct { + // EndpointUri: Output only. The URI of the endpoint used to access the + // metastore service. + EndpointUri string `json:"endpointUri,omitempty"` + // Region: Output only. The region where the endpoint is located. + Region string `json:"region,omitempty"` + // ForceSendFields is a list of field names (e.g. "EndpointUri") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "EndpointUri") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaEndpoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaExportMetadataRequest: Request message for +// DataprocMetastore.ExportMetadata. +type GoogleCloudMetastoreV2betaExportMetadataRequest struct { + // DatabaseDumpType: Optional. The type of the database dump. If unspecified, + // defaults to MYSQL. + // + // Possible values: + // "TYPE_UNSPECIFIED" - The type of the database dump is unknown. + // "MYSQL" - Database dump is a MySQL dump file. + // "AVRO" - Database dump contains Avro files. + DatabaseDumpType string `json:"databaseDumpType,omitempty"` + // DestinationGcsFolder: A Cloud Storage URI of a folder, in the format gs:///. + // A sub-folder containing exported files will be created below it. + DestinationGcsFolder string `json:"destinationGcsFolder,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDumpType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDumpType") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaExportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaExportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaHiveMetastoreConfig: Specifies configuration +// information specific to running Hive metastore software as the metastore +// service. +type GoogleCloudMetastoreV2betaHiveMetastoreConfig struct { + // AuxiliaryVersions: Optional. A mapping of Hive metastore version to the + // auxiliary version configuration. When specified, a secondary Hive metastore + // service is created along with the primary service. All auxiliary versions + // must be less than the service's primary version. The key is the auxiliary + // service name and it must match the regular expression a-z?. This means that + // the first character must be a lowercase letter, and all the following + // characters must be hyphens, lowercase letters, or digits, except the last + // character, which cannot be a hyphen. + AuxiliaryVersions map[string]GoogleCloudMetastoreV2betaAuxiliaryVersionConfig `json:"auxiliaryVersions,omitempty"` + // ConfigOverrides: Optional. A mapping of Hive metastore configuration + // key-value pairs to apply to the Hive metastore (configured in + // hive-site.xml). The mappings override system defaults (some keys cannot be + // overridden). These overrides are also applied to auxiliary versions and can + // be further customized in the auxiliary version's AuxiliaryVersionConfig. + ConfigOverrides map[string]string `json:"configOverrides,omitempty"` + // EndpointProtocol: Optional. The protocol to use for the metastore service + // endpoint. If unspecified, defaults to GRPC. + // + // Possible values: + // "ENDPOINT_PROTOCOL_UNSPECIFIED" - The protocol is not set. + // "THRIFT" - Use the legacy Apache Thrift protocol for the metastore service + // endpoint. + // "GRPC" - Use the modernized gRPC protocol for the metastore service + // endpoint. + EndpointProtocol string `json:"endpointProtocol,omitempty"` + // Version: Immutable. The Hive metastore schema version. + Version string `json:"version,omitempty"` + // ForceSendFields is a list of field names (e.g. "AuxiliaryVersions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuxiliaryVersions") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaHiveMetastoreConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaHiveMetastoreConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaImportMetadataRequest: Request message for +// DataprocMetastore.CreateMetadataImport. +type GoogleCloudMetastoreV2betaImportMetadataRequest struct { + // DatabaseDump: Immutable. A database dump from a pre-existing metastore's + // database. + DatabaseDump *GoogleCloudMetastoreV2betaDatabaseDump `json:"databaseDump,omitempty"` + // Description: Optional. The description of the metadata import. + Description string `json:"description,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "DatabaseDump") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DatabaseDump") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaImportMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaImportMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaLatestBackup: The details of the latest scheduled +// backup. +type GoogleCloudMetastoreV2betaLatestBackup struct { + // BackupId: Output only. The ID of an in-progress scheduled backup. Empty if + // no backup is in progress. + BackupId string `json:"backupId,omitempty"` + // Duration: Output only. The duration of the backup completion. + Duration string `json:"duration,omitempty"` + // StartTime: Output only. The time when the backup was started. + StartTime string `json:"startTime,omitempty"` + // State: Output only. The current state of the backup. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the backup is unknown. + // "IN_PROGRESS" - The backup is in progress. + // "SUCCEEDED" - The backup completed. + // "FAILED" - The backup failed. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaLatestBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaLatestBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaLimitConfig: Represents the autoscaling limit +// configuration of a metastore service. +type GoogleCloudMetastoreV2betaLimitConfig struct { + // MaxScalingFactor: Optional. The highest scaling factor that the service + // should be autoscaled to. + MaxScalingFactor int64 `json:"maxScalingFactor,omitempty"` + // MinScalingFactor: Optional. The lowest scaling factor that the service + // should be autoscaled to. + MinScalingFactor int64 `json:"minScalingFactor,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxScalingFactor") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxScalingFactor") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaLimitConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaLimitConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaListBackupsResponse: Response message for +// DataprocMetastore.ListBackups. +type GoogleCloudMetastoreV2betaListBackupsResponse struct { + // Backups: The backups of the specified service. + Backups []*GoogleCloudMetastoreV2betaBackup `json:"backups,omitempty"` + // NextPageToken: A token that 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. + 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. "Backups") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaListBackupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaListBackupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaListMigrationExecutionsResponse: Response message +// for DataprocMetastore.ListMigrationExecutions. +type GoogleCloudMetastoreV2betaListMigrationExecutionsResponse struct { + // MigrationExecutions: The migration executions on the specified service. + MigrationExecutions []*GoogleCloudMetastoreV2betaMigrationExecution `json:"migrationExecutions,omitempty"` + // NextPageToken: A token that 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. + 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. "MigrationExecutions") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecutions") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaListMigrationExecutionsResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaListMigrationExecutionsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaListServicesResponse: Response message for +// DataprocMetastore.ListServices. +type GoogleCloudMetastoreV2betaListServicesResponse struct { + // NextPageToken: A token that 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"` + // Services: The services in the specified location. + Services []*GoogleCloudMetastoreV2betaService `json:"services,omitempty"` + // Unreachable: Locations that could not be reached. + 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "NextPageToken") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaListServicesResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaListServicesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaMetadataIntegration: Specifies how metastore +// metadata should be integrated with external services. +type GoogleCloudMetastoreV2betaMetadataIntegration struct { + // DataCatalogConfig: Optional. The integration config for the Data Catalog + // service. + DataCatalogConfig *GoogleCloudMetastoreV2betaDataCatalogConfig `json:"dataCatalogConfig,omitempty"` + // ForceSendFields is a list of field names (e.g. "DataCatalogConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DataCatalogConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaMetadataIntegration) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaMetadataIntegration + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaMigrationExecution: The details of a migration +// execution resource. +type GoogleCloudMetastoreV2betaMigrationExecution struct { + // CloudSqlMigrationConfig: Configuration information specific to migrating + // from self-managed hive metastore on Google Cloud using Cloud SQL as the + // backend database to Dataproc Metastore. + CloudSqlMigrationConfig *GoogleCloudMetastoreV2betaCloudSQLMigrationConfig `json:"cloudSqlMigrationConfig,omitempty"` + // CreateTime: Output only. The time when the migration execution was started. + CreateTime string `json:"createTime,omitempty"` + // EndTime: Output only. The time when the migration execution finished. + EndTime string `json:"endTime,omitempty"` + // Name: Output only. The relative resource name of the migration execution, in + // the following form: + // projects/{project_number}/locations/{location_id}/services/{service_id}/migra + // tionExecutions/{migration_execution_id} + Name string `json:"name,omitempty"` + // Phase: Output only. The current phase of the migration execution. + // + // Possible values: + // "PHASE_UNSPECIFIED" - The phase of the migration execution is unknown. + // "REPLICATION" - Replication phase refers to the migration phase when + // Dataproc Metastore is running a pipeline to replicate changes in the + // customer database to its backend database. During this phase, Dataproc + // Metastore uses the customer database as the hive metastore backend database. + // "CUTOVER" - Cutover phase refers to the migration phase when Dataproc + // Metastore switches to using its own backend database. Migration enters this + // phase when customer is done migrating all their clusters/workloads to + // Dataproc Metastore and triggers CompleteMigration. + Phase string `json:"phase,omitempty"` + // State: Output only. The current state of the migration execution. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the migration execution is unknown. + // "STARTING" - The migration execution is starting. + // "RUNNING" - The migration execution is running. + // "CANCELLING" - The migration execution is in the process of being + // cancelled. + // "AWAITING_USER_ACTION" - The migration execution is awaiting user action. + // "SUCCEEDED" - The migration execution has completed successfully. + // "FAILED" - The migration execution has failed. + // "CANCELLED" - The migration execution is cancelled. + // "DELETING" - The migration execution is being deleted. + State string `json:"state,omitempty"` + // StateMessage: Output only. Additional information about the current state of + // the migration execution. + StateMessage string `json:"stateMessage,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CloudSqlMigrationConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CloudSqlMigrationConfig") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaMigrationExecution) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaMigrationExecution + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest: Request message for +// DataprocMetastore.MoveTableToDatabase. +type GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest struct { + // DbName: Required. The name of the database where the table resides. + DbName string `json:"dbName,omitempty"` + // DestinationDbName: Required. The name of the database where the table should + // be moved. + DestinationDbName string `json:"destinationDbName,omitempty"` + // TableName: Required. The name of the table to be moved. + TableName string `json:"tableName,omitempty"` + // ForceSendFields is a list of field names (e.g. "DbName") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DbName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaQueryMetadataRequest: Request message for +// DataprocMetastore.QueryMetadata. +type GoogleCloudMetastoreV2betaQueryMetadataRequest struct { + // Query: Required. A read-only SQL query to execute against the metadata + // database. The query cannot change or mutate the data. + Query string `json:"query,omitempty"` + // ForceSendFields is a list of field names (e.g. "Query") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Query") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaQueryMetadataRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaQueryMetadataRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaRemoveIamPolicyRequest: Request message for +// DataprocMetastore.RemoveIamPolicy. +type GoogleCloudMetastoreV2betaRemoveIamPolicyRequest struct { + // Asynchronous: Optional. Removes IAM policy attached to database or table + // asynchronously when it is set. The default is false. + Asynchronous bool `json:"asynchronous,omitempty"` + // ForceSendFields is a list of field names (e.g. "Asynchronous") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Asynchronous") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaRemoveIamPolicyRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaRemoveIamPolicyRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaRemoveIamPolicyResponse: Response message for +// DataprocMetastore.RemoveIamPolicy. +type GoogleCloudMetastoreV2betaRemoveIamPolicyResponse struct { + // Success: True if the policy is successfully removed. + Success bool `json:"success,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Success") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Success") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaRemoveIamPolicyResponse) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaRemoveIamPolicyResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaRestoreServiceRequest: Request message for +// DataprocMetastore.Restore. +type GoogleCloudMetastoreV2betaRestoreServiceRequest struct { + // Backup: Optional. The relative resource name of the metastore service backup + // to restore from, in the following + // form:projects/{project_id}/locations/{location_id}/services/{service_id}/back + // ups/{backup_id}. Mutually exclusive with backup_location, and exactly one of + // the two must be set. + Backup string `json:"backup,omitempty"` + // BackupLocation: Optional. A Cloud Storage URI specifying the location of the + // backup artifacts, namely - backup avro files under "avro/", + // backup_metastore.json and service.json, in the following form:gs://. + // Mutually exclusive with backup, and exactly one of the two must be set. + BackupLocation string `json:"backupLocation,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // RestoreType: Optional. The type of restore. If unspecified, defaults to + // METADATA_ONLY. + // + // Possible values: + // "RESTORE_TYPE_UNSPECIFIED" - The restore type is unknown. + // "FULL" - The service's metadata and configuration are restored. + // "METADATA_ONLY" - Only the service's metadata is restored. + RestoreType string `json:"restoreType,omitempty"` + // ForceSendFields is a list of field names (e.g. "Backup") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Backup") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaRestoreServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaRestoreServiceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaScalingConfig: Represents the scaling +// configuration of a metastore service. +type GoogleCloudMetastoreV2betaScalingConfig struct { + // AutoscalingConfig: Optional. The autoscaling configuration. + AutoscalingConfig *GoogleCloudMetastoreV2betaAutoscalingConfig `json:"autoscalingConfig,omitempty"` + // ScalingFactor: Optional. Scaling factor from 1 to 5, increments of 1. + ScalingFactor int64 `json:"scalingFactor,omitempty"` + // ForceSendFields is a list of field names (e.g. "AutoscalingConfig") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AutoscalingConfig") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaScalingConfig) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaScalingConfig + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaScheduledBackup: This specifies the configuration +// of scheduled backup. +type GoogleCloudMetastoreV2betaScheduledBackup struct { + // BackupLocation: Optional. A Cloud Storage URI of a folder, in the format + // gs:///. A sub-folder containing backup files will be stored below it. + BackupLocation string `json:"backupLocation,omitempty"` + // CronSchedule: Optional. The scheduled interval in Cron format, see + // https://en.wikipedia.org/wiki/Cron The default is empty: scheduled backup is + // not enabled. Must be specified to enable scheduled backups. + CronSchedule string `json:"cronSchedule,omitempty"` + // Enabled: Optional. Defines whether the scheduled backup is enabled. The + // default value is false. + Enabled bool `json:"enabled,omitempty"` + // LatestBackup: Output only. The details of the latest scheduled backup. + LatestBackup *GoogleCloudMetastoreV2betaLatestBackup `json:"latestBackup,omitempty"` + // NextScheduledTime: Output only. The time when the next backups execution is + // scheduled to start. + NextScheduledTime string `json:"nextScheduledTime,omitempty"` + // TimeZone: Optional. Specifies the time zone to be used when interpreting + // cron_schedule. Must be a time zone name from the time zone database + // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g. + // America/Los_Angeles or Africa/Abidjan. If left unspecified, the default is + // UTC. + TimeZone string `json:"timeZone,omitempty"` + // ForceSendFields is a list of field names (e.g. "BackupLocation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "BackupLocation") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaScheduledBackup) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaScheduledBackup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaService: A managed metastore service that serves +// metadata queries. +type GoogleCloudMetastoreV2betaService struct { + // CreateTime: Output only. The time when the metastore service was created. + CreateTime string `json:"createTime,omitempty"` + // EncryptionConfig: Immutable. Information used to configure the Dataproc + // Metastore service to encrypt customer data at rest. Cannot be updated. + EncryptionConfig *GoogleCloudMetastoreV2betaEncryptionConfig `json:"encryptionConfig,omitempty"` + // Endpoints: Output only. The list of endpoints used to access the metastore + // service. + Endpoints []*GoogleCloudMetastoreV2betaEndpoint `json:"endpoints,omitempty"` + // HiveMetastoreConfig: Configuration information specific to running Hive + // metastore software as the metastore service. + HiveMetastoreConfig *GoogleCloudMetastoreV2betaHiveMetastoreConfig `json:"hiveMetastoreConfig,omitempty"` + // Labels: User-defined labels for the metastore service. + Labels map[string]string `json:"labels,omitempty"` + // MetadataIntegration: Optional. The setting that defines how metastore + // metadata should be integrated with external services and systems. + MetadataIntegration *GoogleCloudMetastoreV2betaMetadataIntegration `json:"metadataIntegration,omitempty"` + // Name: Immutable. The relative resource name of the metastore service, in the + // following + // format:projects/{project_number}/locations/{location_id}/services/{service_id + // }. + Name string `json:"name,omitempty"` + // ScalingConfig: Optional. Scaling configuration of the metastore service. + ScalingConfig *GoogleCloudMetastoreV2betaScalingConfig `json:"scalingConfig,omitempty"` + // ScheduledBackup: Optional. The configuration of scheduled backup for the + // metastore service. + ScheduledBackup *GoogleCloudMetastoreV2betaScheduledBackup `json:"scheduledBackup,omitempty"` + // State: Output only. The current state of the metastore service. + // + // Possible values: + // "STATE_UNSPECIFIED" - The state of the metastore service is unknown. + // "CREATING" - The metastore service is in the process of being created. + // "ACTIVE" - The metastore service is running and ready to serve queries. + // "SUSPENDING" - The metastore service is entering suspension. Its + // query-serving availability may cease unexpectedly. + // "SUSPENDED" - The metastore service is suspended and unable to serve + // queries. + // "UPDATING" - The metastore service is being updated. It remains usable but + // cannot accept additional update requests or be deleted at this time. + // "DELETING" - The metastore service is undergoing deletion. It cannot be + // used. + // "ERROR" - The metastore service has encountered an error and cannot be + // used. The metastore service should be deleted. + // "MIGRATING" - The metastore service is processing a managed migration. + State string `json:"state,omitempty"` + // StateMessage: Output only. Additional information about the current state of + // the metastore service, if available. + StateMessage string `json:"stateMessage,omitempty"` + // Uid: Output only. The globally unique resource identifier of the metastore + // service. + Uid string `json:"uid,omitempty"` + // UpdateTime: Output only. The time when the metastore service was last + // updated. + UpdateTime string `json:"updateTime,omitempty"` + // WarehouseGcsUri: Required. A Cloud Storage URI (starting with gs://) that + // specifies the default warehouse directory of the Hive Metastore. + WarehouseGcsUri string `json:"warehouseGcsUri,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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaService) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaService + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudMetastoreV2betaStartMigrationRequest: Request message for +// DataprocMetastore.StartMigration. +type GoogleCloudMetastoreV2betaStartMigrationRequest struct { + // MigrationExecution: Required. The configuration details for the migration. + MigrationExecution *GoogleCloudMetastoreV2betaMigrationExecution `json:"migrationExecution,omitempty"` + // RequestId: Optional. A request ID. Specify a unique request ID to allow the + // server to ignore the request if it has completed. The server will ignore + // subsequent requests that provide a duplicate request ID for at least 60 + // minutes after the first request.For example, if an initial request times + // out, followed by another request with the same request ID, the server + // ignores the second request to prevent the creation of duplicate + // commitments.The request ID must be a valid UUID + // (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero + // UUID (00000000-0000-0000-0000-000000000000) is not supported. + RequestId string `json:"requestId,omitempty"` + // ForceSendFields is a list of field names (e.g. "MigrationExecution") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MigrationExecution") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudMetastoreV2betaStartMigrationRequest) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudMetastoreV2betaStartMigrationRequest + return gensupport.MarshalJSON(NoMethod(s), 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Done") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleLongrunningOperation) MarshalJSON() ([]byte, error) { + type NoMethod GoogleLongrunningOperation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleRpcStatus) MarshalJSON() ([]byte, error) { + type NoMethod GoogleRpcStatus + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ProjectsLocationsServicesAlterLocationCall struct { + s *Service + service string + googlecloudmetastorev2betaaltermetadataresourcelocationrequest *GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterLocation: Alter metadata resource location. The metadata resource can +// be a database, table, or partition. This functionality only updates the +// parent directory for the respective metadata resource and does not transfer +// any existing data to the new location. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterLocation(service string, googlecloudmetastorev2betaaltermetadataresourcelocationrequest *GoogleCloudMetastoreV2betaAlterMetadataResourceLocationRequest) *ProjectsLocationsServicesAlterLocationCall { + c := &ProjectsLocationsServicesAlterLocationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betaaltermetadataresourcelocationrequest = googlecloudmetastorev2betaaltermetadataresourcelocationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterLocationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterLocationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterLocationCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterLocationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterLocationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterLocationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaaltermetadataresourcelocationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:alterLocation") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterLocation" call. +// 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 *ProjectsLocationsServicesAlterLocationCall) 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 +} + +type ProjectsLocationsServicesAlterTablePropertiesCall struct { + s *Service + service string + googlecloudmetastorev2betaaltertablepropertiesrequest *GoogleCloudMetastoreV2betaAlterTablePropertiesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AlterTableProperties: Alter metadata table properties. +// +// - service: The relative resource name of the Dataproc Metastore service +// that's being used to mutate metadata table properties, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) AlterTableProperties(service string, googlecloudmetastorev2betaaltertablepropertiesrequest *GoogleCloudMetastoreV2betaAlterTablePropertiesRequest) *ProjectsLocationsServicesAlterTablePropertiesCall { + c := &ProjectsLocationsServicesAlterTablePropertiesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betaaltertablepropertiesrequest = googlecloudmetastorev2betaaltertablepropertiesrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Context(ctx context.Context) *ProjectsLocationsServicesAlterTablePropertiesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesAlterTablePropertiesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaaltertablepropertiesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:alterTableProperties") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.alterTableProperties" call. +// 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 *ProjectsLocationsServicesAlterTablePropertiesCall) 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 +} + +type ProjectsLocationsServicesCancelMigrationCall struct { + s *Service + service string + googlecloudmetastorev2betacancelmigrationrequest *GoogleCloudMetastoreV2betaCancelMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CancelMigration: Cancels the ongoing Managed Migration process. +// +// - service: The relative resource name of the metastore service to cancel the +// ongoing migration to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) CancelMigration(service string, googlecloudmetastorev2betacancelmigrationrequest *GoogleCloudMetastoreV2betaCancelMigrationRequest) *ProjectsLocationsServicesCancelMigrationCall { + c := &ProjectsLocationsServicesCancelMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betacancelmigrationrequest = googlecloudmetastorev2betacancelmigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCancelMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCancelMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCancelMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCancelMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCancelMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCancelMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betacancelmigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:cancelMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.cancelMigration" call. +// 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 *ProjectsLocationsServicesCancelMigrationCall) 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 +} + +type ProjectsLocationsServicesCompleteMigrationCall struct { + s *Service + service string + googlecloudmetastorev2betacompletemigrationrequest *GoogleCloudMetastoreV2betaCompleteMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// CompleteMigration: Completes the managed migration process. The Dataproc +// Metastore service will switch to using its own backend database after +// successful migration. +// +// - service: The relative resource name of the metastore service to complete +// the migration to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) CompleteMigration(service string, googlecloudmetastorev2betacompletemigrationrequest *GoogleCloudMetastoreV2betaCompleteMigrationRequest) *ProjectsLocationsServicesCompleteMigrationCall { + c := &ProjectsLocationsServicesCompleteMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betacompletemigrationrequest = googlecloudmetastorev2betacompletemigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCompleteMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesCompleteMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCompleteMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCompleteMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betacompletemigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:completeMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.completeMigration" call. +// 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 *ProjectsLocationsServicesCompleteMigrationCall) 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 +} + +type ProjectsLocationsServicesCreateCall struct { + s *Service + parent string + googlecloudmetastorev2betaservice *GoogleCloudMetastoreV2betaService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a metastore service in a project and location. +// +// - parent: The relative resource name of the location in which to create a +// metastore service, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) Create(parent string, googlecloudmetastorev2betaservice *GoogleCloudMetastoreV2betaService) *ProjectsLocationsServicesCreateCall { + c := &ProjectsLocationsServicesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2betaservice = googlecloudmetastorev2betaservice + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesCreateCall) RequestId(requestId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ServiceId sets the optional parameter "serviceId": Required. The ID of the +// metastore service, which is used as the final component of the metastore +// service's name.This value must be between 2 and 63 characters long +// inclusive, begin with a letter, end with a letter or number, and consist of +// alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesCreateCall) ServiceId(serviceId string) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("serviceId", serviceId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/services") + 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 "metastore.projects.locations.services.create" call. +// 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 *ProjectsLocationsServicesCreateCall) 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 +} + +type ProjectsLocationsServicesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single service. +// +// - name: The relative resource name of the metastore service to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Delete(name string) *ProjectsLocationsServicesDeleteCall { + c := &ProjectsLocationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesDeleteCall { + 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 +// details. +func (c *ProjectsLocationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "metastore.projects.locations.services.delete" call. +// 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 *ProjectsLocationsServicesDeleteCall) 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 +} + +type ProjectsLocationsServicesExportMetadataCall struct { + s *Service + service string + googlecloudmetastorev2betaexportmetadatarequest *GoogleCloudMetastoreV2betaExportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ExportMetadata: Exports metadata from a service. +// +// - service: The relative resource name of the metastore service to run +// export, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ExportMetadata(service string, googlecloudmetastorev2betaexportmetadatarequest *GoogleCloudMetastoreV2betaExportMetadataRequest) *ProjectsLocationsServicesExportMetadataCall { + c := &ProjectsLocationsServicesExportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betaexportmetadatarequest = googlecloudmetastorev2betaexportmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesExportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesExportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesExportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesExportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesExportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesExportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaexportmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:exportMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.exportMetadata" call. +// 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 *ProjectsLocationsServicesExportMetadataCall) 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 +} + +type ProjectsLocationsServicesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets the details of a single service. +// +// - name: The relative resource name of the metastore service to retrieve, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesService) Get(name string) *ProjectsLocationsServicesGetCall { + c := &ProjectsLocationsServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesGetCall) Context(ctx context.Context) *ProjectsLocationsServicesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "metastore.projects.locations.services.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaService.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaService, 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 := &GoogleCloudMetastoreV2betaService{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesImportMetadataCall struct { + s *Service + name string + googlecloudmetastorev2betaimportmetadatarequest *GoogleCloudMetastoreV2betaImportMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ImportMetadata: Imports Metadata into a Dataproc Metastore service. +// +// - name: Immutable. The relative resource name of the metastore service to +// run import, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) ImportMetadata(name string, googlecloudmetastorev2betaimportmetadatarequest *GoogleCloudMetastoreV2betaImportMetadataRequest) *ProjectsLocationsServicesImportMetadataCall { + c := &ProjectsLocationsServicesImportMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2betaimportmetadatarequest = googlecloudmetastorev2betaimportmetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesImportMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesImportMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesImportMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesImportMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesImportMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesImportMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaimportmetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+name}:importMetadata") + 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 "metastore.projects.locations.services.importMetadata" call. +// 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 *ProjectsLocationsServicesImportMetadataCall) 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 +} + +type ProjectsLocationsServicesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists services in a project and location. +// +// - parent: The relative resource name of the location of metastore services +// to list, in the following +// form:projects/{project_number}/locations/{location_id}. +func (r *ProjectsLocationsServicesService) List(parent string) *ProjectsLocationsServicesListCall { + c := &ProjectsLocationsServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesListCall) Filter(filter string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesListCall) OrderBy(orderBy string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// services to return. The response may contain less than the maximum number. +// If unspecified, no more than 500 services are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesListCall) PageSize(pageSize int64) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListServices call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListServices must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesListCall) PageToken(pageToken string) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesListCall) Context(ctx context.Context) *ProjectsLocationsServicesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/services") + 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 "metastore.projects.locations.services.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaListServicesResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaListServicesResponse, 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 := &GoogleCloudMetastoreV2betaListServicesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServicesListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2betaListServicesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsServicesMoveTableToDatabaseCall struct { + s *Service + service string + googlecloudmetastorev2betamovetabletodatabaserequest *GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MoveTableToDatabase: Move a table to another database. +// +// - service: The relative resource name of the metastore service to mutate +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) MoveTableToDatabase(service string, googlecloudmetastorev2betamovetabletodatabaserequest *GoogleCloudMetastoreV2betaMoveTableToDatabaseRequest) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c := &ProjectsLocationsServicesMoveTableToDatabaseCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betamovetabletodatabaserequest = googlecloudmetastorev2betamovetabletodatabaserequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Context(ctx context.Context) *ProjectsLocationsServicesMoveTableToDatabaseCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMoveTableToDatabaseCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betamovetabletodatabaserequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:moveTableToDatabase") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.moveTableToDatabase" call. +// 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 *ProjectsLocationsServicesMoveTableToDatabaseCall) 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 +} + +type ProjectsLocationsServicesPatchCall struct { + s *Service + name string + googlecloudmetastorev2betaservice *GoogleCloudMetastoreV2betaService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single service. +// +// - name: Immutable. The relative resource name of the metastore service, in +// the following +// format:projects/{project_number}/locations/{location_id}/services/{service_ +// id}. +func (r *ProjectsLocationsServicesService) Patch(name string, googlecloudmetastorev2betaservice *GoogleCloudMetastoreV2betaService) *ProjectsLocationsServicesPatchCall { + c := &ProjectsLocationsServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.googlecloudmetastorev2betaservice = googlecloudmetastorev2betaservice + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesPatchCall) RequestId(requestId string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": Required. A field mask +// used to specify the fields to be overwritten in the metastore service +// resource by the update. Fields specified in the update_mask are relative to +// the resource (not to the full request). A field is overwritten if it is in +// the mask. +func (c *ProjectsLocationsServicesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesPatchCall) Context(ctx context.Context) *ProjectsLocationsServicesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "metastore.projects.locations.services.patch" call. +// 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 *ProjectsLocationsServicesPatchCall) 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 +} + +type ProjectsLocationsServicesQueryMetadataCall struct { + s *Service + service string + googlecloudmetastorev2betaquerymetadatarequest *GoogleCloudMetastoreV2betaQueryMetadataRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// QueryMetadata: Query Dataproc Metastore metadata. +// +// - service: The relative resource name of the metastore service to query +// metadata, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) QueryMetadata(service string, googlecloudmetastorev2betaquerymetadatarequest *GoogleCloudMetastoreV2betaQueryMetadataRequest) *ProjectsLocationsServicesQueryMetadataCall { + c := &ProjectsLocationsServicesQueryMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betaquerymetadatarequest = googlecloudmetastorev2betaquerymetadatarequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesQueryMetadataCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesQueryMetadataCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesQueryMetadataCall) Context(ctx context.Context) *ProjectsLocationsServicesQueryMetadataCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesQueryMetadataCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesQueryMetadataCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaquerymetadatarequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:queryMetadata") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.queryMetadata" call. +// 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 *ProjectsLocationsServicesQueryMetadataCall) 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 +} + +type ProjectsLocationsServicesRemoveIamPolicyCall struct { + s *Service + resource string + googlecloudmetastorev2betaremoveiampolicyrequest *GoogleCloudMetastoreV2betaRemoveIamPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveIamPolicy: Removes the attached IAM policies for a resource +// +// - resource: The relative resource name of the dataplane resource to remove +// IAM policy, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}/da +// tabases/{database_id} or +// projects/{project_id}/locations/{location_id}/services/{service_id}/databas +// es/{database_id}/tables/{table_id}. +func (r *ProjectsLocationsServicesService) RemoveIamPolicy(resource string, googlecloudmetastorev2betaremoveiampolicyrequest *GoogleCloudMetastoreV2betaRemoveIamPolicyRequest) *ProjectsLocationsServicesRemoveIamPolicyCall { + c := &ProjectsLocationsServicesRemoveIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource + c.googlecloudmetastorev2betaremoveiampolicyrequest = googlecloudmetastorev2betaremoveiampolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRemoveIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsServicesRemoveIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betaremoveiampolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+resource}:removeIamPolicy") + 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{ + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.removeIamPolicy" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaRemoveIamPolicyResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesRemoveIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaRemoveIamPolicyResponse, 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 := &GoogleCloudMetastoreV2betaRemoveIamPolicyResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesRestoreCall struct { + s *Service + service string + googlecloudmetastorev2betarestoreservicerequest *GoogleCloudMetastoreV2betaRestoreServiceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Restore: Restores a service from a backup. +// +// - service: The relative resource name of the metastore service to run +// restore, in the following +// form:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) Restore(service string, googlecloudmetastorev2betarestoreservicerequest *GoogleCloudMetastoreV2betaRestoreServiceRequest) *ProjectsLocationsServicesRestoreCall { + c := &ProjectsLocationsServicesRestoreCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betarestoreservicerequest = googlecloudmetastorev2betarestoreservicerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesRestoreCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesRestoreCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesRestoreCall) Context(ctx context.Context) *ProjectsLocationsServicesRestoreCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesRestoreCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesRestoreCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betarestoreservicerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:restore") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.restore" call. +// 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 *ProjectsLocationsServicesRestoreCall) 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 +} + +type ProjectsLocationsServicesStartMigrationCall struct { + s *Service + service string + googlecloudmetastorev2betastartmigrationrequest *GoogleCloudMetastoreV2betaStartMigrationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// StartMigration: Starts the Managed Migration process. +// +// - service: The relative resource name of the metastore service to start +// migrating to, in the following +// format:projects/{project_id}/locations/{location_id}/services/{service_id}. +func (r *ProjectsLocationsServicesService) StartMigration(service string, googlecloudmetastorev2betastartmigrationrequest *GoogleCloudMetastoreV2betaStartMigrationRequest) *ProjectsLocationsServicesStartMigrationCall { + c := &ProjectsLocationsServicesStartMigrationCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.service = service + c.googlecloudmetastorev2betastartmigrationrequest = googlecloudmetastorev2betastartmigrationrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesStartMigrationCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesStartMigrationCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesStartMigrationCall) Context(ctx context.Context) *ProjectsLocationsServicesStartMigrationCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesStartMigrationCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesStartMigrationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betastartmigrationrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+service}:startMigration") + 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{ + "service": c.service, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "metastore.projects.locations.services.startMigration" call. +// 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 *ProjectsLocationsServicesStartMigrationCall) 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 +} + +type ProjectsLocationsServicesBackupsCreateCall struct { + s *Service + parent string + googlecloudmetastorev2betabackup *GoogleCloudMetastoreV2betaBackup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new backup in a given project and location. +// +// - parent: The relative resource name of the service in which to create a +// backup of the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }. +func (r *ProjectsLocationsServicesBackupsService) Create(parent string, googlecloudmetastorev2betabackup *GoogleCloudMetastoreV2betaBackup) *ProjectsLocationsServicesBackupsCreateCall { + c := &ProjectsLocationsServicesBackupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.googlecloudmetastorev2betabackup = googlecloudmetastorev2betabackup + return c +} + +// BackupId sets the optional parameter "backupId": Required. The ID of the +// backup, which is used as the final component of the backup's name.This value +// must be between 1 and 64 characters long, begin with a letter, end with a +// letter or number, and consist of alpha-numeric ASCII characters or hyphens. +func (c *ProjectsLocationsServicesBackupsCreateCall) BackupId(backupId string) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("backupId", backupId) + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsCreateCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsCreateCall { + 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 +// details. +func (c *ProjectsLocationsServicesBackupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsCreateCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.googlecloudmetastorev2betabackup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.create" call. +// 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 *ProjectsLocationsServicesBackupsCreateCall) 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 +} + +type ProjectsLocationsServicesBackupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single backup. +// +// - name: The relative resource name of the backup to delete, in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Delete(name string) *ProjectsLocationsServicesBackupsDeleteCall { + c := &ProjectsLocationsServicesBackupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesBackupsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesBackupsDeleteCall { + 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 +// details. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "metastore.projects.locations.services.backups.delete" call. +// 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 *ProjectsLocationsServicesBackupsDeleteCall) 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 +} + +type ProjectsLocationsServicesBackupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single backup. +// +// - name: The relative resource name of the backup to retrieve, in the +// following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups/{backup_id}. +func (r *ProjectsLocationsServicesBackupsService) Get(name string) *ProjectsLocationsServicesBackupsGetCall { + c := &ProjectsLocationsServicesBackupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesBackupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesBackupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "metastore.projects.locations.services.backups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaBackup.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesBackupsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaBackup, 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 := &GoogleCloudMetastoreV2betaBackup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesBackupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists backups in a service. +// +// - parent: The relative resource name of the service whose backups to list, +// in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/backups. +func (r *ProjectsLocationsServicesBackupsService) List(parent string) *ProjectsLocationsServicesBackupsListCall { + c := &ProjectsLocationsServicesBackupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesBackupsListCall) Filter(filter string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesBackupsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// backups to return. The response may contain less than the maximum number. If +// unspecified, no more than 500 backups are returned. The maximum value is +// 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesBackupsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListBackups call. Provide this token to +// retrieve the subsequent page.To retrieve the first page, supply an empty +// page token.When paginating, other parameters provided to +// DataprocMetastore.ListBackups must match the call that provided the page +// token. +func (c *ProjectsLocationsServicesBackupsListCall) PageToken(pageToken string) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesBackupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesBackupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesBackupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesBackupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesBackupsListCall) Context(ctx context.Context) *ProjectsLocationsServicesBackupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesBackupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesBackupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/backups") + 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 "metastore.projects.locations.services.backups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaListBackupsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesBackupsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaListBackupsResponse, 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 := &GoogleCloudMetastoreV2betaListBackupsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServicesBackupsListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2betaListBackupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsServicesMigrationExecutionsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single migration execution. +// +// - name: The relative resource name of the migrationExecution to delete, in +// the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions/{migration_execution_id}. +func (r *ProjectsLocationsServicesMigrationExecutionsService) Delete(name string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c := &ProjectsLocationsServicesMigrationExecutionsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": A request ID. Specify a +// unique request ID to allow the server to ignore the request if it has +// completed. The server will ignore subsequent requests that provide a +// duplicate request ID for at least 60 minutes after the first request.For +// example, if an initial request times out, followed by another request with +// the same request ID, the server ignores the second request to prevent the +// creation of duplicate commitments.The request ID must be a valid UUID +// (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format) A zero +// UUID (00000000-0000-0000-0000-000000000000) is not supported. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) RequestId(requestId string) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + 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 +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "metastore.projects.locations.services.migrationExecutions.delete" call. +// 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 *ProjectsLocationsServicesMigrationExecutionsDeleteCall) 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 +} + +type ProjectsLocationsServicesMigrationExecutionsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single migration execution. +// +// - name: The relative resource name of the migration execution to retrieve, +// in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions/{migration_execution_id}. +func (r *ProjectsLocationsServicesMigrationExecutionsService) Get(name string) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c := &ProjectsLocationsServicesMigrationExecutionsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+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 "metastore.projects.locations.services.migrationExecutions.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaMigrationExecution.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsServicesMigrationExecutionsGetCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaMigrationExecution, 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 := &GoogleCloudMetastoreV2betaMigrationExecution{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsServicesMigrationExecutionsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists migration executions on a service. +// +// - parent: The relative resource name of the service whose migration +// executions to list, in the following +// form:projects/{project_number}/locations/{location_id}/services/{service_id +// }/migrationExecutions. +func (r *ProjectsLocationsServicesMigrationExecutionsService) List(parent string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c := &ProjectsLocationsServicesMigrationExecutionsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter to apply to list +// results. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Filter(filter string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Specify the ordering of +// results as described in Sorting Order +// (https://cloud.google.com/apis/design/design_patterns#sorting_order). If not +// specified, the results will be sorted in the default order. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) OrderBy(orderBy string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// migration executions to return. The response may contain less than the +// maximum number. If unspecified, no more than 500 migration executions are +// returned. The maximum value is 1000; values above 1000 are changed to 1000. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageSize(pageSize int64) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A page token, received +// from a previous DataprocMetastore.ListMigrationExecutions call. Provide this +// token to retrieve the subsequent page.To retrieve the first page, supply an +// empty page token.When paginating, other parameters provided to +// DataprocMetastore.ListMigrationExecutions must match the call that provided +// the page token. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) PageToken(pageToken string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Context(ctx context.Context) *ProjectsLocationsServicesMigrationExecutionsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta/{+parent}/migrationExecutions") + 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 "metastore.projects.locations.services.migrationExecutions.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *GoogleCloudMetastoreV2betaListMigrationExecutionsResponse.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 *ProjectsLocationsServicesMigrationExecutionsListCall) Do(opts ...googleapi.CallOption) (*GoogleCloudMetastoreV2betaListMigrationExecutionsResponse, 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 := &GoogleCloudMetastoreV2betaListMigrationExecutionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsServicesMigrationExecutionsListCall) Pages(ctx context.Context, f func(*GoogleCloudMetastoreV2betaListMigrationExecutionsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} diff --git a/networkmanagement/v1/networkmanagement-api.json b/networkmanagement/v1/networkmanagement-api.json index 40fe1467d83..76a51aa343f 100644 --- a/networkmanagement/v1/networkmanagement-api.json +++ b/networkmanagement/v1/networkmanagement-api.json @@ -464,7 +464,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/global/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networkmanagement.projects.locations.global.operations.cancel", @@ -591,7 +591,7 @@ } } }, - "revision": "20241106", + "revision": "20241202", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1003,6 +1003,15 @@ }, "type": "array" }, + "returnReachabilityDetails": { + "$ref": "ReachabilityDetails", + "description": "Output only. The reachability details of this test from the latest run for the return path. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test.", + "readOnly": true + }, + "roundTrip": { + "description": "Whether run analysis for the return path from destination to source. Default value is false.", + "type": "boolean" + }, "source": { "$ref": "Endpoint", "description": "Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test." diff --git a/networkmanagement/v1/networkmanagement-gen.go b/networkmanagement/v1/networkmanagement-gen.go index 147e026ab97..b95b0f0d918 100644 --- a/networkmanagement/v1/networkmanagement-gen.go +++ b/networkmanagement/v1/networkmanagement-gen.go @@ -737,6 +737,14 @@ type ConnectivityTest struct { // analysis. This is applicable to scenarios where a test can cross project // boundaries. RelatedProjects []string `json:"relatedProjects,omitempty"` + // ReturnReachabilityDetails: Output only. The reachability details of this + // test from the latest run for the return path. The details are updated when + // creating a new test, updating an existing test, or triggering a one-time + // rerun of an existing test. + ReturnReachabilityDetails *ReachabilityDetails `json:"returnReachabilityDetails,omitempty"` + // RoundTrip: Whether run analysis for the return path from destination to + // source. Default value is false. + RoundTrip bool `json:"roundTrip,omitempty"` // Source: Required. Source specification of the Connectivity Test. You can use // a combination of source IP address, virtual machine (VM) instance, or // Compute Engine network to uniquely identify the source location. Examples: @@ -4375,7 +4383,7 @@ type ProjectsLocationsGlobalOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/networkmanagement/v1beta1/networkmanagement-api.json b/networkmanagement/v1beta1/networkmanagement-api.json index dd40509efa7..6532ac953c6 100644 --- a/networkmanagement/v1beta1/networkmanagement-api.json +++ b/networkmanagement/v1beta1/networkmanagement-api.json @@ -464,7 +464,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta1/projects/{projectsId}/locations/global/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networkmanagement.projects.locations.global.operations.cancel", @@ -758,7 +758,7 @@ } } }, - "revision": "20241106", + "revision": "20241202", "rootUrl": "https://networkmanagement.googleapis.com/", "schemas": { "AbortInfo": { @@ -1170,6 +1170,15 @@ }, "type": "array" }, + "returnReachabilityDetails": { + "$ref": "ReachabilityDetails", + "description": "Output only. The reachability details of this test from the latest run for the return path. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test.", + "readOnly": true + }, + "roundTrip": { + "description": "Whether run analysis for the return path from destination to source. Default value is false.", + "type": "boolean" + }, "source": { "$ref": "Endpoint", "description": "Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test." diff --git a/networkmanagement/v1beta1/networkmanagement-gen.go b/networkmanagement/v1beta1/networkmanagement-gen.go index 3cbbb5dd700..df2ce81a471 100644 --- a/networkmanagement/v1beta1/networkmanagement-gen.go +++ b/networkmanagement/v1beta1/networkmanagement-gen.go @@ -749,6 +749,14 @@ type ConnectivityTest struct { // analysis. This is applicable to scenarios where a test can cross project // boundaries. RelatedProjects []string `json:"relatedProjects,omitempty"` + // ReturnReachabilityDetails: Output only. The reachability details of this + // test from the latest run for the return path. The details are updated when + // creating a new test, updating an existing test, or triggering a one-time + // rerun of an existing test. + ReturnReachabilityDetails *ReachabilityDetails `json:"returnReachabilityDetails,omitempty"` + // RoundTrip: Whether run analysis for the return path from destination to + // source. Default value is false. + RoundTrip bool `json:"roundTrip,omitempty"` // Source: Required. Source specification of the Connectivity Test. You can use // a combination of source IP address, virtual machine (VM) instance, or // Compute Engine network to uniquely identify the source location. Examples: @@ -4531,7 +4539,7 @@ type ProjectsLocationsGlobalOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/networksecurity/v1/networksecurity-api.json b/networksecurity/v1/networksecurity-api.json index c0cb1881171..4c2e4218081 100644 --- a/networksecurity/v1/networksecurity-api.json +++ b/networksecurity/v1/networksecurity-api.json @@ -586,7 +586,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networksecurity.organizations.locations.operations.cancel", @@ -2743,7 +2743,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networksecurity.projects.locations.operations.cancel", @@ -3431,7 +3431,7 @@ } } }, - "revision": "20241109", + "revision": "20241202", "rootUrl": "https://networksecurity.googleapis.com/", "schemas": { "AddAddressGroupItemsRequest": { @@ -3660,11 +3660,11 @@ "properties": { "from": { "$ref": "AuthzPolicyAuthzRuleFrom", - "description": "Optional. Describes properties of one or more sources of a request." + "description": "Optional. Describes properties of a source of a request." }, "to": { "$ref": "AuthzPolicyAuthzRuleTo", - "description": "Optional. Describes properties of one or more targets of a request." + "description": "Optional. Describes properties of a target of a request." }, "when": { "description": "Optional. CEL expression that describes the conditions to be satisfied for the action. The result of the CEL expression is ANDed with the from and to. Refer to the CEL language reference for a list of available attributes.", @@ -3685,7 +3685,7 @@ "type": "array" }, "sources": { - "description": "Optional. Describes the properties of a request's sources. At least one of sources or notSources must be specified. Limited to 5 sources. A match occurs when ANY source (in sources or notSources) matches the request. Within a single source, the match follows AND semantics across fields and OR semantics within a single field, i.e. a match occurs when ANY principal matches AND ANY ipBlocks match.", + "description": "Optional. Describes the properties of a request's sources. At least one of sources or notSources must be specified. Limited to 1 source. A match occurs when ANY source (in sources or notSources) matches the request. Within a single source, the match follows AND semantics across fields and OR semantics within a single field, i.e. a match occurs when ANY principal matches AND ANY ipBlocks match.", "items": { "$ref": "AuthzPolicyAuthzRuleFromRequestSource" }, @@ -3799,7 +3799,7 @@ "type": "array" }, "operations": { - "description": "Optional. Describes properties of one or more targets of a request. At least one of operations or notOperations must be specified. Limited to 5 operations. A match occurs when ANY operation (in operations or notOperations) matches. Within an operation, the match follows AND semantics across fields and OR semantics within a field, i.e. a match occurs when ANY path matches AND ANY header matches and ANY method matches.", + "description": "Optional. Describes properties of one or more targets of a request. At least one of operations or notOperations must be specified. Limited to 1 operation. A match occurs when ANY operation (in operations or notOperations) matches. Within an operation, the match follows AND semantics across fields and OR semantics within a field, i.e. a match occurs when ANY path matches AND ANY header matches and ANY method matches.", "items": { "$ref": "AuthzPolicyAuthzRuleToRequestOperation" }, @@ -4000,6 +4000,17 @@ }, "type": "object" }, + "CustomInterceptProfile": { + "description": "CustomInterceptProfile defines the Packet Intercept Endpoint Group used to intercept traffic to a third-party firewall in a Firewall rule.", + "id": "CustomInterceptProfile", + "properties": { + "interceptEndpointGroup": { + "description": "Required. The InterceptEndpointGroup to which traffic associated with the SP should be mirrored.", + "type": "string" + } + }, + "type": "object" + }, "CustomMirroringProfile": { "description": "CustomMirroringProfile defines an action for mirroring traffic to a collector's EndpointGroup", "id": "CustomMirroringProfile", @@ -5062,7 +5073,7 @@ "type": "object" }, "SecurityProfile": { - "description": "SecurityProfile is a resource that defines the behavior for one of many ProfileTypes. Next ID: 12", + "description": "SecurityProfile is a resource that defines the behavior for one of many ProfileTypes.", "id": "SecurityProfile", "properties": { "createTime": { @@ -5071,6 +5082,10 @@ "readOnly": true, "type": "string" }, + "customInterceptProfile": { + "$ref": "CustomInterceptProfile", + "description": "The custom TPPI configuration for the SecurityProfile." + }, "customMirroringProfile": { "$ref": "CustomMirroringProfile", "description": "The custom Packet Mirroring v2 configuration for the SecurityProfile." @@ -5104,12 +5119,14 @@ "enum": [ "PROFILE_TYPE_UNSPECIFIED", "THREAT_PREVENTION", - "CUSTOM_MIRRORING" + "CUSTOM_MIRRORING", + "CUSTOM_INTERCEPT" ], "enumDescriptions": [ "Profile type not specified.", "Profile type for threat prevention.", - "Profile type for packet mirroring v2" + "Profile type for packet mirroring v2", + "Profile type for TPPI." ], "type": "string" }, @@ -5123,7 +5140,7 @@ "type": "object" }, "SecurityProfileGroup": { - "description": "SecurityProfileGroup is a resource that defines the behavior for various ProfileTypes. Next ID: 11", + "description": "SecurityProfileGroup is a resource that defines the behavior for various ProfileTypes.", "id": "SecurityProfileGroup", "properties": { "createTime": { @@ -5132,6 +5149,10 @@ "readOnly": true, "type": "string" }, + "customInterceptProfile": { + "description": "Optional. Reference to a SecurityProfile with the CustomIntercept configuration.", + "type": "string" + }, "customMirroringProfile": { "description": "Optional. Reference to a SecurityProfile with the CustomMirroring configuration.", "type": "string" diff --git a/networksecurity/v1/networksecurity-gen.go b/networksecurity/v1/networksecurity-gen.go index 14f8ac4bb04..615ab678022 100644 --- a/networksecurity/v1/networksecurity-gen.go +++ b/networksecurity/v1/networksecurity-gen.go @@ -609,9 +609,9 @@ func (s AuthzPolicy) MarshalJSON() ([]byte, error) { // AuthzPolicyAuthzRule: Conditions to match against the incoming request. type AuthzPolicyAuthzRule struct { - // From: Optional. Describes properties of one or more sources of a request. + // From: Optional. Describes properties of a source of a request. From *AuthzPolicyAuthzRuleFrom `json:"from,omitempty"` - // To: Optional. Describes properties of one or more targets of a request. + // To: Optional. Describes properties of a target of a request. To *AuthzPolicyAuthzRuleTo `json:"to,omitempty"` // When: Optional. CEL expression that describes the conditions to be satisfied // for the action. The result of the CEL expression is ANDed with the from and @@ -643,8 +643,8 @@ type AuthzPolicyAuthzRuleFrom struct { // this field. At least one of sources or notSources must be specified. NotSources []*AuthzPolicyAuthzRuleFromRequestSource `json:"notSources,omitempty"` // Sources: Optional. Describes the properties of a request's sources. At least - // one of sources or notSources must be specified. Limited to 5 sources. A - // match occurs when ANY source (in sources or notSources) matches the request. + // one of sources or notSources must be specified. Limited to 1 source. A match + // occurs when ANY source (in sources or notSources) matches the request. // Within a single source, the match follows AND semantics across fields and OR // semantics within a single field, i.e. a match occurs when ANY principal // matches AND ANY ipBlocks match. @@ -829,7 +829,7 @@ type AuthzPolicyAuthzRuleTo struct { NotOperations []*AuthzPolicyAuthzRuleToRequestOperation `json:"notOperations,omitempty"` // Operations: Optional. Describes properties of one or more targets of a // request. At least one of operations or notOperations must be specified. - // Limited to 5 operations. A match occurs when ANY operation (in operations or + // Limited to 1 operation. A match occurs when ANY operation (in operations or // notOperations) matches. Within an operation, the match follows AND semantics // across fields and OR semantics within a field, i.e. a match occurs when ANY // path matches AND ANY header matches and ANY method matches. @@ -1137,6 +1137,31 @@ func (s CloneAddressGroupItemsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CustomInterceptProfile: CustomInterceptProfile defines the Packet Intercept +// Endpoint Group used to intercept traffic to a third-party firewall in a +// Firewall rule. +type CustomInterceptProfile struct { + // InterceptEndpointGroup: Required. The InterceptEndpointGroup to which + // traffic associated with the SP should be mirrored. + InterceptEndpointGroup string `json:"interceptEndpointGroup,omitempty"` + // ForceSendFields is a list of field names (e.g. "InterceptEndpointGroup") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "InterceptEndpointGroup") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CustomInterceptProfile) MarshalJSON() ([]byte, error) { + type NoMethod CustomInterceptProfile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CustomMirroringProfile: CustomMirroringProfile defines an action for // mirroring traffic to a collector's EndpointGroup type CustomMirroringProfile struct { @@ -2694,10 +2719,13 @@ func (s Rule) MarshalJSON() ([]byte, error) { } // SecurityProfile: SecurityProfile is a resource that defines the behavior for -// one of many ProfileTypes. Next ID: 12 +// one of many ProfileTypes. type SecurityProfile struct { // CreateTime: Output only. Resource creation timestamp. CreateTime string `json:"createTime,omitempty"` + // CustomInterceptProfile: The custom TPPI configuration for the + // SecurityProfile. + CustomInterceptProfile *CustomInterceptProfile `json:"customInterceptProfile,omitempty"` // CustomMirroringProfile: The custom Packet Mirroring v2 configuration for the // SecurityProfile. CustomMirroringProfile *CustomMirroringProfile `json:"customMirroringProfile,omitempty"` @@ -2725,6 +2753,7 @@ type SecurityProfile struct { // "PROFILE_TYPE_UNSPECIFIED" - Profile type not specified. // "THREAT_PREVENTION" - Profile type for threat prevention. // "CUSTOM_MIRRORING" - Profile type for packet mirroring v2 + // "CUSTOM_INTERCEPT" - Profile type for TPPI. Type string `json:"type,omitempty"` // UpdateTime: Output only. Last resource update timestamp. UpdateTime string `json:"updateTime,omitempty"` @@ -2750,10 +2779,13 @@ func (s SecurityProfile) MarshalJSON() ([]byte, error) { } // SecurityProfileGroup: SecurityProfileGroup is a resource that defines the -// behavior for various ProfileTypes. Next ID: 11 +// behavior for various ProfileTypes. type SecurityProfileGroup struct { // CreateTime: Output only. Resource creation timestamp. CreateTime string `json:"createTime,omitempty"` + // CustomInterceptProfile: Optional. Reference to a SecurityProfile with the + // CustomIntercept configuration. + CustomInterceptProfile string `json:"customInterceptProfile,omitempty"` // CustomMirroringProfile: Optional. Reference to a SecurityProfile with the // CustomMirroring configuration. CustomMirroringProfile string `json:"customMirroringProfile,omitempty"` @@ -4949,7 +4981,7 @@ type OrganizationsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -12873,7 +12905,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/networksecurity/v1beta1/networksecurity-api.json b/networksecurity/v1beta1/networksecurity-api.json index 99ddf2d5183..a73c3d03eb5 100644 --- a/networksecurity/v1beta1/networksecurity-api.json +++ b/networksecurity/v1beta1/networksecurity-api.json @@ -586,7 +586,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networksecurity.organizations.locations.operations.cancel", @@ -2740,19 +2740,19 @@ } } }, - "mirroringDeploymentGroups": { + "interceptDeploymentGroups": { "methods": { "create": { - "description": "Creates a new MirroringDeploymentGroup in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups", + "description": "Creates a new InterceptDeploymentGroup in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeploymentGroups", "httpMethod": "POST", - "id": "networksecurity.projects.locations.mirroringDeploymentGroups.create", + "id": "networksecurity.projects.locations.interceptDeploymentGroups.create", "parameterOrder": [ "parent" ], "parameters": { - "mirroringDeploymentGroupId": { - "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_deployment_group_id from the method_signature of Create RPC", + "interceptDeploymentGroupId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and intercept_deployment_group_id from the method_signature of Create RPC", "location": "query", "type": "string" }, @@ -2769,9 +2769,9 @@ "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringDeploymentGroups", + "path": "v1beta1/{+parent}/interceptDeploymentGroups", "request": { - "$ref": "MirroringDeploymentGroup" + "$ref": "InterceptDeploymentGroup" }, "response": { "$ref": "Operation" @@ -2781,10 +2781,10 @@ ] }, "delete": { - "description": "Deletes a single MirroringDeploymentGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", + "description": "Deletes a single InterceptDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeploymentGroups/{interceptDeploymentGroupsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.mirroringDeploymentGroups.delete", + "id": "networksecurity.projects.locations.interceptDeploymentGroups.delete", "parameterOrder": [ "name" ], @@ -2792,7 +2792,7 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeploymentGroups/[^/]+$", "required": true, "type": "string" }, @@ -2811,10 +2811,10 @@ ] }, "get": { - "description": "Gets details of a single MirroringDeploymentGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", + "description": "Gets details of a single InterceptDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeploymentGroups/{interceptDeploymentGroupsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringDeploymentGroups.get", + "id": "networksecurity.projects.locations.interceptDeploymentGroups.get", "parameterOrder": [ "name" ], @@ -2822,24 +2822,24 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeploymentGroups/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "MirroringDeploymentGroup" + "$ref": "InterceptDeploymentGroup" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists MirroringDeploymentGroups in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups", + "description": "Lists InterceptDeploymentGroups in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeploymentGroups", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringDeploymentGroups.list", + "id": "networksecurity.projects.locations.interceptDeploymentGroups.list", "parameterOrder": [ "parent" ], @@ -2866,34 +2866,34 @@ "type": "string" }, "parent": { - "description": "Required. Parent value for ListMirroringDeploymentGroupsRequest", + "description": "Required. Parent value for ListInterceptDeploymentGroupsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringDeploymentGroups", + "path": "v1beta1/{+parent}/interceptDeploymentGroups", "response": { - "$ref": "ListMirroringDeploymentGroupsResponse" + "$ref": "ListInterceptDeploymentGroupsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates a single MirroringDeploymentGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", + "description": "Updates a single InterceptDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeploymentGroups/{interceptDeploymentGroupsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.mirroringDeploymentGroups.patch", + "id": "networksecurity.projects.locations.interceptDeploymentGroups.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Immutable. Identifier. Then name of the MirroringDeploymentGroup.", + "description": "Immutable. Identifier. Then name of the InterceptDeploymentGroup.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeploymentGroups/[^/]+$", "required": true, "type": "string" }, @@ -2903,7 +2903,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringDeploymentGroup 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 InterceptDeploymentGroup 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" @@ -2911,7 +2911,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "MirroringDeploymentGroup" + "$ref": "InterceptDeploymentGroup" }, "response": { "$ref": "Operation" @@ -2922,19 +2922,19 @@ } } }, - "mirroringDeployments": { + "interceptDeployments": { "methods": { "create": { - "description": "Creates a new MirroringDeployment in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments", + "description": "Creates a new InterceptDeployment in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeployments", "httpMethod": "POST", - "id": "networksecurity.projects.locations.mirroringDeployments.create", + "id": "networksecurity.projects.locations.interceptDeployments.create", "parameterOrder": [ "parent" ], "parameters": { - "mirroringDeploymentId": { - "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_deployment_id from the method_signature of Create RPC", + "interceptDeploymentId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and intercept_deployment_id from the method_signature of Create RPC", "location": "query", "type": "string" }, @@ -2951,9 +2951,9 @@ "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringDeployments", + "path": "v1beta1/{+parent}/interceptDeployments", "request": { - "$ref": "MirroringDeployment" + "$ref": "InterceptDeployment" }, "response": { "$ref": "Operation" @@ -2963,10 +2963,10 @@ ] }, "delete": { - "description": "Deletes a single MirroringDeployment.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", + "description": "Deletes a single InterceptDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeployments/{interceptDeploymentsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.mirroringDeployments.delete", + "id": "networksecurity.projects.locations.interceptDeployments.delete", "parameterOrder": [ "name" ], @@ -2974,7 +2974,7 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeployments/[^/]+$", "required": true, "type": "string" }, @@ -2993,10 +2993,10 @@ ] }, "get": { - "description": "Gets details of a single MirroringDeployment.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", + "description": "Gets details of a single InterceptDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeployments/{interceptDeploymentsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringDeployments.get", + "id": "networksecurity.projects.locations.interceptDeployments.get", "parameterOrder": [ "name" ], @@ -3004,24 +3004,24 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeployments/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "MirroringDeployment" + "$ref": "InterceptDeployment" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists MirroringDeployments in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments", + "description": "Lists InterceptDeployments in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeployments", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringDeployments.list", + "id": "networksecurity.projects.locations.interceptDeployments.list", "parameterOrder": [ "parent" ], @@ -3048,34 +3048,34 @@ "type": "string" }, "parent": { - "description": "Required. Parent value for ListMirroringDeploymentsRequest", + "description": "Required. Parent value for ListInterceptDeploymentsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringDeployments", + "path": "v1beta1/{+parent}/interceptDeployments", "response": { - "$ref": "ListMirroringDeploymentsResponse" + "$ref": "ListInterceptDeploymentsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates a single MirroringDeployment.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", + "description": "Updates a single InterceptDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptDeployments/{interceptDeploymentsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.mirroringDeployments.patch", + "id": "networksecurity.projects.locations.interceptDeployments.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Immutable. Identifier. The name of the MirroringDeployment.", + "description": "Immutable. Identifier. The name of the InterceptDeployment.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptDeployments/[^/]+$", "required": true, "type": "string" }, @@ -3085,7 +3085,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringDeployment 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 InterceptDeployment 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" @@ -3093,7 +3093,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "MirroringDeployment" + "$ref": "InterceptDeployment" }, "response": { "$ref": "Operation" @@ -3104,19 +3104,19 @@ } } }, - "mirroringEndpointGroupAssociations": { + "interceptEndpointGroupAssociations": { "methods": { "create": { - "description": "Creates a new MirroringEndpointGroupAssociation in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations", + "description": "Creates a new InterceptEndpointGroupAssociation in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroupAssociations", "httpMethod": "POST", - "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.create", + "id": "networksecurity.projects.locations.interceptEndpointGroupAssociations.create", "parameterOrder": [ "parent" ], "parameters": { - "mirroringEndpointGroupAssociationId": { - "description": "Optional. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_endpoint_group_association_id from the method_signature of Create RPC", + "interceptEndpointGroupAssociationId": { + "description": "Optional. Id of the requesting object If auto-generating Id server-side, remove this field and intercept_endpoint_group_association_id from the method_signature of Create RPC", "location": "query", "type": "string" }, @@ -3133,9 +3133,9 @@ "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringEndpointGroupAssociations", + "path": "v1beta1/{+parent}/interceptEndpointGroupAssociations", "request": { - "$ref": "MirroringEndpointGroupAssociation" + "$ref": "InterceptEndpointGroupAssociation" }, "response": { "$ref": "Operation" @@ -3145,10 +3145,10 @@ ] }, "delete": { - "description": "Deletes a single MirroringEndpointGroupAssociation.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", + "description": "Deletes a single InterceptEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroupAssociations/{interceptEndpointGroupAssociationsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.delete", + "id": "networksecurity.projects.locations.interceptEndpointGroupAssociations.delete", "parameterOrder": [ "name" ], @@ -3156,7 +3156,7 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" }, @@ -3175,10 +3175,10 @@ ] }, "get": { - "description": "Gets details of a single MirroringEndpointGroupAssociation.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", + "description": "Gets details of a single InterceptEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroupAssociations/{interceptEndpointGroupAssociationsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.get", + "id": "networksecurity.projects.locations.interceptEndpointGroupAssociations.get", "parameterOrder": [ "name" ], @@ -3186,24 +3186,24 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "MirroringEndpointGroupAssociation" + "$ref": "InterceptEndpointGroupAssociation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists MirroringEndpointGroupAssociations in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations", + "description": "Lists InterceptEndpointGroupAssociations in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroupAssociations", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.list", + "id": "networksecurity.projects.locations.interceptEndpointGroupAssociations.list", "parameterOrder": [ "parent" ], @@ -3230,34 +3230,34 @@ "type": "string" }, "parent": { - "description": "Required. Parent value for ListMirroringEndpointGroupAssociationsRequest", + "description": "Required. Parent value for ListInterceptEndpointGroupAssociationsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringEndpointGroupAssociations", + "path": "v1beta1/{+parent}/interceptEndpointGroupAssociations", "response": { - "$ref": "ListMirroringEndpointGroupAssociationsResponse" + "$ref": "ListInterceptEndpointGroupAssociationsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates a single MirroringEndpointGroupAssociation.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", + "description": "Updates a single InterceptEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroupAssociations/{interceptEndpointGroupAssociationsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.patch", + "id": "networksecurity.projects.locations.interceptEndpointGroupAssociations.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Immutable. Identifier. The name of the MirroringEndpointGroupAssociation.", + "description": "Immutable. Identifier. The name of the InterceptEndpointGroupAssociation.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" }, @@ -3267,7 +3267,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringEndpointGroupAssociation 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 InterceptEndpointGroupAssociation 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" @@ -3275,7 +3275,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "MirroringEndpointGroupAssociation" + "$ref": "InterceptEndpointGroupAssociation" }, "response": { "$ref": "Operation" @@ -3286,19 +3286,19 @@ } } }, - "mirroringEndpointGroups": { + "interceptEndpointGroups": { "methods": { "create": { - "description": "Creates a new MirroringEndpointGroup in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups", + "description": "Creates a new InterceptEndpointGroup in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroups", "httpMethod": "POST", - "id": "networksecurity.projects.locations.mirroringEndpointGroups.create", + "id": "networksecurity.projects.locations.interceptEndpointGroups.create", "parameterOrder": [ "parent" ], "parameters": { - "mirroringEndpointGroupId": { - "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_endpoint_group_id from the method_signature of Create RPC", + "interceptEndpointGroupId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and intercept_endpoint_group_id from the method_signature of Create RPC", "location": "query", "type": "string" }, @@ -3315,9 +3315,9 @@ "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringEndpointGroups", + "path": "v1beta1/{+parent}/interceptEndpointGroups", "request": { - "$ref": "MirroringEndpointGroup" + "$ref": "InterceptEndpointGroup" }, "response": { "$ref": "Operation" @@ -3327,10 +3327,10 @@ ] }, "delete": { - "description": "Deletes a single MirroringEndpointGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", + "description": "Deletes a single InterceptEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroups/{interceptEndpointGroupsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.mirroringEndpointGroups.delete", + "id": "networksecurity.projects.locations.interceptEndpointGroups.delete", "parameterOrder": [ "name" ], @@ -3338,7 +3338,7 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroups/[^/]+$", "required": true, "type": "string" }, @@ -3357,10 +3357,10 @@ ] }, "get": { - "description": "Gets details of a single MirroringEndpointGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", + "description": "Gets details of a single InterceptEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroups/{interceptEndpointGroupsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringEndpointGroups.get", + "id": "networksecurity.projects.locations.interceptEndpointGroups.get", "parameterOrder": [ "name" ], @@ -3368,24 +3368,24 @@ "name": { "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroups/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "MirroringEndpointGroup" + "$ref": "InterceptEndpointGroup" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists MirroringEndpointGroups in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups", + "description": "Lists InterceptEndpointGroups in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroups", "httpMethod": "GET", - "id": "networksecurity.projects.locations.mirroringEndpointGroups.list", + "id": "networksecurity.projects.locations.interceptEndpointGroups.list", "parameterOrder": [ "parent" ], @@ -3412,34 +3412,34 @@ "type": "string" }, "parent": { - "description": "Required. Parent value for ListMirroringEndpointGroupsRequest", + "description": "Required. Parent value for ListInterceptEndpointGroupsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/mirroringEndpointGroups", + "path": "v1beta1/{+parent}/interceptEndpointGroups", "response": { - "$ref": "ListMirroringEndpointGroupsResponse" + "$ref": "ListInterceptEndpointGroupsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates a single MirroringEndpointGroup.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", + "description": "Updates a single InterceptEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/interceptEndpointGroups/{interceptEndpointGroupsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.mirroringEndpointGroups.patch", + "id": "networksecurity.projects.locations.interceptEndpointGroups.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Immutable. Identifier. Next ID: 11 The name of the MirroringEndpointGroup.", + "description": "Immutable. Identifier. The name of the InterceptEndpointGroup.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/interceptEndpointGroups/[^/]+$", "required": true, "type": "string" }, @@ -3449,7 +3449,7 @@ "type": "string" }, "updateMask": { - "description": "Required. Field mask is used to specify the fields to be overwritten in the MirroringEndpointGroup 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 InterceptEndpointGroup 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" @@ -3457,7 +3457,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "MirroringEndpointGroup" + "$ref": "InterceptEndpointGroup" }, "response": { "$ref": "Operation" @@ -3468,156 +3468,178 @@ } } }, - "operations": { + "mirroringDeploymentGroups": { "methods": { - "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "create": { + "description": "Creates a new MirroringDeploymentGroup in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups", "httpMethod": "POST", - "id": "networksecurity.projects.locations.operations.cancel", + "id": "networksecurity.projects.locations.mirroringDeploymentGroups.create", "parameterOrder": [ - "name" + "parent" ], "parameters": { - "name": { - "description": "The name of the operation resource to be cancelled.", + "mirroringDeploymentGroupId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_deployment_group_id from the method_signature of Create RPC", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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": "v1beta1/{+name}:cancel", + "path": "v1beta1/{+parent}/mirroringDeploymentGroups", "request": { - "$ref": "CancelOperationRequest" + "$ref": "MirroringDeploymentGroup" }, "response": { - "$ref": "Empty" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "delete": { - "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "description": "Deletes a single MirroringDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.operations.delete", + "id": "networksecurity.projects.locations.mirroringDeploymentGroups.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "The name of the operation resource to be deleted.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes after the first request. 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": "v1beta1/{+name}", "response": { - "$ref": "Empty" + "$ref": "Operation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "get": { - "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "description": "Gets details of a single MirroringDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.operations.get", + "id": "networksecurity.projects.locations.mirroringDeploymentGroups.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "The name of the operation resource.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "Operation" + "$ref": "MirroringDeploymentGroup" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", + "description": "Lists MirroringDeploymentGroups in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups", "httpMethod": "GET", - "id": "networksecurity.projects.locations.operations.list", + "id": "networksecurity.projects.locations.mirroringDeploymentGroups.list", "parameterOrder": [ - "name" + "parent" ], "parameters": { "filter": { - "description": "The standard list filter.", + "description": "Optional. Filtering results", "location": "query", "type": "string" }, - "name": { - "description": "The name of the operation's parent resource.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", - "required": true, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", "type": "string" }, "pageSize": { - "description": "The standard list page size.", + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The standard list page token.", + "description": "Optional. A token identifying a page of results the server should return.", "location": "query", "type": "string" + }, + "parent": { + "description": "Required. Parent value for ListMirroringDeploymentGroupsRequest", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" } }, - "path": "v1beta1/{+name}/operations", + "path": "v1beta1/{+parent}/mirroringDeploymentGroups", "response": { - "$ref": "ListOperationsResponse" + "$ref": "ListMirroringDeploymentGroupsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - } - } - }, - "serverTlsPolicies": { - "methods": { - "create": { - "description": "Creates a new ServerTlsPolicy in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", - "httpMethod": "POST", - "id": "networksecurity.projects.locations.serverTlsPolicies.create", + }, + "patch": { + "description": "Updates a single MirroringDeploymentGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeploymentGroups/{mirroringDeploymentGroupsId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.mirroringDeploymentGroups.patch", "parameterOrder": [ - "parent" + "name" ], "parameters": { - "parent": { - "description": "Required. The parent resource of the ServerTlsPolicy. Must be in the format `projects/*/locations/{location}`.", + "name": { + "description": "Immutable. Identifier. Then name of the MirroringDeploymentGroup.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeploymentGroups/[^/]+$", "required": true, "type": "string" }, - "serverTlsPolicyId": { - "description": "Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"server_mtls_policy\".", + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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 MirroringDeploymentGroup 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": "v1beta1/{+parent}/serverTlsPolicies", + "path": "v1beta1/{+name}", "request": { - "$ref": "ServerTlsPolicy" + "$ref": "MirroringDeploymentGroup" }, "response": { "$ref": "Operation" @@ -3625,25 +3647,42 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] - }, - "delete": { - "description": "Deletes a single ServerTlsPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", - "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.serverTlsPolicies.delete", + } + } + }, + "mirroringDeployments": { + "methods": { + "create": { + "description": "Creates a new MirroringDeployment in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.mirroringDeployments.create", "parameterOrder": [ - "name" + "parent" ], "parameters": { - "name": { - "description": "Required. A name of the ServerTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + "mirroringDeploymentId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_deployment_id from the method_signature of Create RPC", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Value for parent.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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": "v1beta1/{+name}", + "path": "v1beta1/{+parent}/mirroringDeployments", + "request": { + "$ref": "MirroringDeployment" + }, "response": { "$ref": "Operation" }, @@ -3651,116 +3690,130 @@ "https://www.googleapis.com/auth/cloud-platform" ] }, - "get": { - "description": "Gets details of a single ServerTlsPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", - "httpMethod": "GET", - "id": "networksecurity.projects.locations.serverTlsPolicies.get", + "delete": { + "description": "Deletes a single MirroringDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.mirroringDeployments.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. A name of the ServerTlsPolicy to get. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes after the first request. 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": "v1beta1/{+name}", "response": { - "$ref": "ServerTlsPolicy" + "$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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:getIamPolicy", + "get": { + "description": "Gets details of a single MirroringDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.serverTlsPolicies.getIamPolicy", + "id": "networksecurity.projects.locations.mirroringDeployments.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. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+resource}:getIamPolicy", + "path": "v1beta1/{+name}", "response": { - "$ref": "GoogleIamV1Policy" + "$ref": "MirroringDeployment" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists ServerTlsPolicies in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", + "description": "Lists MirroringDeployments in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments", "httpMethod": "GET", - "id": "networksecurity.projects.locations.serverTlsPolicies.list", + "id": "networksecurity.projects.locations.mirroringDeployments.list", "parameterOrder": [ "parent" ], "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, "pageSize": { - "description": "Maximum number of ServerTlsPolicies to return per call.", + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The value returned by the last `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListServerTlsPolicies` call, and that the system should return the next page of data.", + "description": "Optional. A token identifying a page of results the server should return.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", + "description": "Required. Parent value for ListMirroringDeploymentsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/serverTlsPolicies", + "path": "v1beta1/{+parent}/mirroringDeployments", "response": { - "$ref": "ListServerTlsPoliciesResponse" + "$ref": "ListMirroringDeploymentsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates the parameters of a single ServerTlsPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + "description": "Updates a single MirroringDeployment.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringDeployments/{mirroringDeploymentsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.serverTlsPolicies.patch", + "id": "networksecurity.projects.locations.mirroringDeployments.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", + "description": "Immutable. Identifier. The name of the MirroringDeployment.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringDeployments/[^/]+$", "required": true, "type": "string" }, + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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": "Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy 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 MirroringDeployment 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" @@ -3768,7 +3821,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "ServerTlsPolicy" + "$ref": "MirroringDeployment" }, "response": { "$ref": "Operation" @@ -3776,92 +3829,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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:setIamPolicy", - "httpMethod": "POST", - "id": "networksecurity.projects.locations.serverTlsPolicies.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/[^/]+/serverTlsPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:setIamPolicy", - "request": { - "$ref": "GoogleIamV1SetIamPolicyRequest" - }, - "response": { - "$ref": "GoogleIamV1Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:testIamPermissions", - "httpMethod": "POST", - "id": "networksecurity.projects.locations.serverTlsPolicies.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/[^/]+/serverTlsPolicies/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:testIamPermissions", - "request": { - "$ref": "GoogleIamV1TestIamPermissionsRequest" - }, - "response": { - "$ref": "GoogleIamV1TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] } } }, - "tlsInspectionPolicies": { + "mirroringEndpointGroupAssociations": { "methods": { "create": { - "description": "Creates a new TlsInspectionPolicy in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + "description": "Creates a new MirroringEndpointGroupAssociation in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations", "httpMethod": "POST", - "id": "networksecurity.projects.locations.tlsInspectionPolicies.create", + "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.create", "parameterOrder": [ "parent" ], "parameters": { + "mirroringEndpointGroupAssociationId": { + "description": "Optional. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_endpoint_group_association_id from the method_signature of Create RPC", + "location": "query", + "type": "string" + }, "parent": { - "description": "Required. The parent resource of the TlsInspectionPolicy. Must be in the format `projects/{project}/locations/{location}`.", + "description": "Required. Value for parent.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" }, - "tlsInspectionPolicyId": { - "description": "Required. Short name of the TlsInspectionPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"tls_inspection_policy1\".", + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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": "v1beta1/{+parent}/tlsInspectionPolicies", + "path": "v1beta1/{+parent}/mirroringEndpointGroupAssociations", "request": { - "$ref": "TlsInspectionPolicy" + "$ref": "MirroringEndpointGroupAssociation" }, "response": { "$ref": "Operation" @@ -3871,25 +3873,25 @@ ] }, "delete": { - "description": "Deletes a single TlsInspectionPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "description": "Deletes a single MirroringEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.tlsInspectionPolicies.delete", + "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.delete", "parameterOrder": [ "name" ], "parameters": { - "force": { - "description": "If set to true, any rules for this TlsInspectionPolicy will also be deleted. (Otherwise, the request will only work if the TlsInspectionPolicy has no rules.)", - "location": "query", - "type": "boolean" - }, "name": { - "description": "Required. A name of the TlsInspectionPolicy to delete. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes after the first request. 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": "v1beta1/{+name}", @@ -3901,84 +3903,99 @@ ] }, "get": { - "description": "Gets details of a single TlsInspectionPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "description": "Gets details of a single MirroringEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.tlsInspectionPolicies.get", + "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. A name of the TlsInspectionPolicy to get. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "TlsInspectionPolicy" + "$ref": "MirroringEndpointGroupAssociation" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists TlsInspectionPolicies in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + "description": "Lists MirroringEndpointGroupAssociations in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations", "httpMethod": "GET", - "id": "networksecurity.projects.locations.tlsInspectionPolicies.list", + "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.list", "parameterOrder": [ "parent" ], "parameters": { - "pageSize": { - "description": "Maximum number of TlsInspectionPolicies to return per call.", - "format": "int32", + "filter": { + "description": "Optional. Filtering results", "location": "query", - "type": "integer" + "type": "string" }, - "pageToken": { - "description": "The value returned by the last 'ListTlsInspectionPoliciesResponse' Indicates that this is a continuation of a prior 'ListTlsInspectionPolicies' call, and that the system should return the next page of data.", + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A token identifying a page of results the server should return.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The project and location from which the TlsInspectionPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", + "description": "Required. Parent value for ListMirroringEndpointGroupAssociationsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/tlsInspectionPolicies", + "path": "v1beta1/{+parent}/mirroringEndpointGroupAssociations", "response": { - "$ref": "ListTlsInspectionPoliciesResponse" + "$ref": "ListMirroringEndpointGroupAssociationsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates the parameters of a single TlsInspectionPolicy.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "description": "Updates a single MirroringEndpointGroupAssociation.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroupAssociations/{mirroringEndpointGroupAssociationsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.tlsInspectionPolicies.patch", + "id": "networksecurity.projects.locations.mirroringEndpointGroupAssociations.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} tls_inspection_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "description": "Immutable. Identifier. The name of the MirroringEndpointGroupAssociation.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroupAssociations/[^/]+$", "required": true, "type": "string" }, + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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": "Optional. Field mask is used to specify the fields to be overwritten in the TlsInspectionPolicy 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 MirroringEndpointGroupAssociation 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" @@ -3986,7 +4003,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "TlsInspectionPolicy" + "$ref": "MirroringEndpointGroupAssociation" }, "response": { "$ref": "Operation" @@ -3997,33 +4014,38 @@ } } }, - "urlLists": { + "mirroringEndpointGroups": { "methods": { "create": { - "description": "Creates a new UrlList in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists", + "description": "Creates a new MirroringEndpointGroup in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups", "httpMethod": "POST", - "id": "networksecurity.projects.locations.urlLists.create", + "id": "networksecurity.projects.locations.mirroringEndpointGroups.create", "parameterOrder": [ "parent" ], "parameters": { + "mirroringEndpointGroupId": { + "description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and mirroring_endpoint_group_id from the method_signature of Create RPC", + "location": "query", + "type": "string" + }, "parent": { - "description": "Required. The parent resource of the UrlList. Must be in the format `projects/*/locations/{location}`.", + "description": "Required. Value for parent.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" }, - "urlListId": { - "description": "Required. Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"url_list\".", + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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": "v1beta1/{+parent}/urlLists", + "path": "v1beta1/{+parent}/mirroringEndpointGroups", "request": { - "$ref": "UrlList" + "$ref": "MirroringEndpointGroup" }, "response": { "$ref": "Operation" @@ -4033,20 +4055,25 @@ ] }, "delete": { - "description": "Deletes a single UrlList.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "description": "Deletes a single MirroringEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", "httpMethod": "DELETE", - "id": "networksecurity.projects.locations.urlLists.delete", + "id": "networksecurity.projects.locations.mirroringEndpointGroups.delete", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. A name of the UrlList to delete. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", "required": true, "type": "string" + }, + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes after the first request. 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": "v1beta1/{+name}", @@ -4058,84 +4085,99 @@ ] }, "get": { - "description": "Gets details of a single UrlList.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "description": "Gets details of a single MirroringEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", "httpMethod": "GET", - "id": "networksecurity.projects.locations.urlLists.get", + "id": "networksecurity.projects.locations.mirroringEndpointGroups.get", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. A name of the UrlList to get. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + "description": "Required. Name of the resource", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", "required": true, "type": "string" } }, "path": "v1beta1/{+name}", "response": { - "$ref": "UrlList" + "$ref": "MirroringEndpointGroup" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "list": { - "description": "Lists UrlLists in a given project and location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists", + "description": "Lists MirroringEndpointGroups in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups", "httpMethod": "GET", - "id": "networksecurity.projects.locations.urlLists.list", + "id": "networksecurity.projects.locations.mirroringEndpointGroups.list", "parameterOrder": [ "parent" ], "parameters": { + "filter": { + "description": "Optional. Filtering results", + "location": "query", + "type": "string" + }, + "orderBy": { + "description": "Optional. Hint for how to order the results", + "location": "query", + "type": "string" + }, "pageSize": { - "description": "Maximum number of UrlLists to return per call.", + "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", "format": "int32", "location": "query", "type": "integer" }, "pageToken": { - "description": "The value returned by the last `ListUrlListsResponse` Indicates that this is a continuation of a prior `ListUrlLists` call, and that the system should return the next page of data.", + "description": "Optional. A token identifying a page of results the server should return.", "location": "query", "type": "string" }, "parent": { - "description": "Required. The project and location from which the UrlLists should be listed, specified in the format `projects/{project}/locations/{location}`.", + "description": "Required. Parent value for ListMirroringEndpointGroupsRequest", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, "type": "string" } }, - "path": "v1beta1/{+parent}/urlLists", + "path": "v1beta1/{+parent}/mirroringEndpointGroups", "response": { - "$ref": "ListUrlListsResponse" + "$ref": "ListMirroringEndpointGroupsResponse" }, "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] }, "patch": { - "description": "Updates the parameters of a single UrlList.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "description": "Updates a single MirroringEndpointGroup.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/mirroringEndpointGroups/{mirroringEndpointGroupsId}", "httpMethod": "PATCH", - "id": "networksecurity.projects.locations.urlLists.patch", + "id": "networksecurity.projects.locations.mirroringEndpointGroups.patch", "parameterOrder": [ "name" ], "parameters": { "name": { - "description": "Required. Name of the resource provided by the user. Name is of the form projects/{project}/locations/{location}/urlLists/{url_list} url_list should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "description": "Immutable. Identifier. Next ID: 11 The name of the MirroringEndpointGroup.", "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "pattern": "^projects/[^/]+/locations/[^/]+/mirroringEndpointGroups/[^/]+$", "required": true, "type": "string" }, + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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": "Optional. Field mask is used to specify the fields to be overwritten in the UrlList 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 MirroringEndpointGroup 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" @@ -4143,7 +4185,7 @@ }, "path": "v1beta1/{+name}", "request": { - "$ref": "UrlList" + "$ref": "MirroringEndpointGroup" }, "response": { "$ref": "Operation" @@ -4153,132 +4195,1210 @@ ] } } - } - } - } - } - } - }, - "revision": "20241109", - "rootUrl": "https://networksecurity.googleapis.com/", - "schemas": { - "AddAddressGroupItemsRequest": { - "description": "Request used by the AddAddressGroupItems method.", - "id": "AddAddressGroupItemsRequest", - "properties": { - "items": { - "description": "Required. List of items to add.", - "items": { - "type": "string" - }, - "type": "array" - }, - "requestId": { - "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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" - } - }, - "type": "object" - }, - "AddressGroup": { - "description": "AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy.", - "id": "AddressGroup", - "properties": { - "capacity": { - "description": "Required. Capacity of the Address Group", - "format": "int32", - "type": "integer" - }, - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. Free-text description of the resource.", - "type": "string" - }, - "items": { - "description": "Optional. List of items.", - "items": { - "type": "string" - }, - "type": "array" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Set of label tags associated with the AddressGroup resource.", - "type": "object" - }, - "name": { - "description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", - "type": "string" - }, - "purpose": { - "description": "Optional. List of supported purposes of the Address Group.", - "items": { - "enum": [ - "PURPOSE_UNSPECIFIED", - "DEFAULT", - "CLOUD_ARMOR" - ], - "enumDescriptions": [ - "Default value. Should never happen.", - "Address Group is distributed to VMC, and is usable in Firewall Policies and other systems that rely on VMC.", - "Address Group is usable in Cloud Armor." - ], - "type": "string" - }, - "type": "array" - }, - "selfLink": { - "description": "Output only. Server-defined fully-qualified URL for this resource.", - "readOnly": true, - "type": "string" - }, - "type": { - "description": "Required. The type of the Address Group. Possible values are \"IPv4\" or \"IPV6\".", - "enum": [ - "TYPE_UNSPECIFIED", - "IPV4", - "IPV6" - ], - "enumDescriptions": [ - "Default value.", - "IP v4 ranges.", - "IP v6 ranges." - ], - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "AuthorizationPolicy": { - "description": "AuthorizationPolicy is a resource that specifies how a server should authorize incoming connections. This resource in itself does not change the configuration unless it's attached to a target https proxy or endpoint config selector resource.", - "id": "AuthorizationPolicy", - "properties": { - "action": { - "description": "Required. The action to take when a rule match is found. Possible values are \"ALLOW\" or \"DENY\".", - "enum": [ - "ACTION_UNSPECIFIED", - "ALLOW", - "DENY" - ], - "enumDescriptions": [ - "Default value.", - "Grant access.", - "Deny access. Deny rules should be avoided unless they are used to provide a default \"deny all\" fallback." - ], - "type": "string" + }, + "operations": { + "methods": { + "cancel": { + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:cancel", + "request": { + "$ref": "CancelOperationRequest" + }, + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "networksecurity.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": "v1beta1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "networksecurity.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": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "networksecurity.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": "v1beta1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "serverTlsPolicies": { + "methods": { + "create": { + "description": "Creates a new ServerTlsPolicy in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.serverTlsPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the ServerTlsPolicy. Must be in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "serverTlsPolicyId": { + "description": "Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"server_mtls_policy\".", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/serverTlsPolicies", + "request": { + "$ref": "ServerTlsPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single ServerTlsPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.serverTlsPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the ServerTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single ServerTlsPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.serverTlsPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the ServerTlsPolicy to get. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "ServerTlsPolicy" + }, + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:getIamPolicy", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.serverTlsPolicies.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/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:getIamPolicy", + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists ServerTlsPolicies in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.serverTlsPolicies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of ServerTlsPolicies to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListServerTlsPolicies` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/serverTlsPolicies", + "response": { + "$ref": "ListServerTlsPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single ServerTlsPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.serverTlsPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy 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": "v1beta1/{+name}", + "request": { + "$ref": "ServerTlsPolicy" + }, + "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:setIamPolicy", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.serverTlsPolicies.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/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:setIamPolicy", + "request": { + "$ref": "GoogleIamV1SetIamPolicyRequest" + }, + "response": { + "$ref": "GoogleIamV1Policy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "testIamPermissions": { + "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:testIamPermissions", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.serverTlsPolicies.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/[^/]+/serverTlsPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+resource}:testIamPermissions", + "request": { + "$ref": "GoogleIamV1TestIamPermissionsRequest" + }, + "response": { + "$ref": "GoogleIamV1TestIamPermissionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "tlsInspectionPolicies": { + "methods": { + "create": { + "description": "Creates a new TlsInspectionPolicy in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the TlsInspectionPolicy. Must be in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "tlsInspectionPolicyId": { + "description": "Required. Short name of the TlsInspectionPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"tls_inspection_policy1\".", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/tlsInspectionPolicies", + "request": { + "$ref": "TlsInspectionPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single TlsInspectionPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "force": { + "description": "If set to true, any rules for this TlsInspectionPolicy will also be deleted. (Otherwise, the request will only work if the TlsInspectionPolicy has no rules.)", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Required. A name of the TlsInspectionPolicy to delete. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single TlsInspectionPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the TlsInspectionPolicy to get. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "TlsInspectionPolicy" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists TlsInspectionPolicies in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of TlsInspectionPolicies to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last 'ListTlsInspectionPoliciesResponse' Indicates that this is a continuation of a prior 'ListTlsInspectionPolicies' call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the TlsInspectionPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/tlsInspectionPolicies", + "response": { + "$ref": "ListTlsInspectionPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single TlsInspectionPolicy.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.tlsInspectionPolicies.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} tls_inspection_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsInspectionPolicy 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": "v1beta1/{+name}", + "request": { + "$ref": "TlsInspectionPolicy" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "urlLists": { + "methods": { + "create": { + "description": "Creates a new UrlList in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists", + "httpMethod": "POST", + "id": "networksecurity.projects.locations.urlLists.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent resource of the UrlList. Must be in the format `projects/*/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "urlListId": { + "description": "Required. Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"url_list\".", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+parent}/urlLists", + "request": { + "$ref": "UrlList" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a single UrlList.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "httpMethod": "DELETE", + "id": "networksecurity.projects.locations.urlLists.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the UrlList to delete. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Gets details of a single UrlList.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.urlLists.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. A name of the UrlList to get. Must be in the format `projects/*/locations/{location}/urlLists/*`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "UrlList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists UrlLists in a given project and location.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists", + "httpMethod": "GET", + "id": "networksecurity.projects.locations.urlLists.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "Maximum number of UrlLists to return per call.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListUrlListsResponse` Indicates that this is a continuation of a prior `ListUrlLists` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The project and location from which the UrlLists should be listed, specified in the format `projects/{project}/locations/{location}`.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/urlLists", + "response": { + "$ref": "ListUrlListsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the parameters of a single UrlList.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", + "httpMethod": "PATCH", + "id": "networksecurity.projects.locations.urlLists.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the resource provided by the user. Name is of the form projects/{project}/locations/{location}/urlLists/{url_list} url_list should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Optional. Field mask is used to specify the fields to be overwritten in the UrlList 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": "v1beta1/{+name}", + "request": { + "$ref": "UrlList" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20241202", + "rootUrl": "https://networksecurity.googleapis.com/", + "schemas": { + "AddAddressGroupItemsRequest": { + "description": "Request used by the AddAddressGroupItems method.", + "id": "AddAddressGroupItemsRequest", + "properties": { + "items": { + "description": "Required. List of items to add.", + "items": { + "type": "string" + }, + "type": "array" + }, + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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" + } + }, + "type": "object" + }, + "AddressGroup": { + "description": "AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy.", + "id": "AddressGroup", + "properties": { + "capacity": { + "description": "Required. Capacity of the Address Group", + "format": "int32", + "type": "integer" + }, + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Free-text description of the resource.", + "type": "string" + }, + "items": { + "description": "Optional. List of items.", + "items": { + "type": "string" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the AddressGroup resource.", + "type": "object" + }, + "name": { + "description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", + "type": "string" + }, + "purpose": { + "description": "Optional. List of supported purposes of the Address Group.", + "items": { + "enum": [ + "PURPOSE_UNSPECIFIED", + "DEFAULT", + "CLOUD_ARMOR" + ], + "enumDescriptions": [ + "Default value. Should never happen.", + "Address Group is distributed to VMC, and is usable in Firewall Policies and other systems that rely on VMC.", + "Address Group is usable in Cloud Armor." + ], + "type": "string" + }, + "type": "array" + }, + "selfLink": { + "description": "Output only. Server-defined fully-qualified URL for this resource.", + "readOnly": true, + "type": "string" + }, + "type": { + "description": "Required. The type of the Address Group. Possible values are \"IPv4\" or \"IPV6\".", + "enum": [ + "TYPE_UNSPECIFIED", + "IPV4", + "IPV6" + ], + "enumDescriptions": [ + "Default value.", + "IP v4 ranges.", + "IP v6 ranges." + ], + "type": "string" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AuthorizationPolicy": { + "description": "AuthorizationPolicy is a resource that specifies how a server should authorize incoming connections. This resource in itself does not change the configuration unless it's attached to a target https proxy or endpoint config selector resource.", + "id": "AuthorizationPolicy", + "properties": { + "action": { + "description": "Required. The action to take when a rule match is found. Possible values are \"ALLOW\" or \"DENY\".", + "enum": [ + "ACTION_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "enumDescriptions": [ + "Default value.", + "Grant access.", + "Deny access. Deny rules should be avoided unless they are used to provide a default \"deny all\" fallback." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Free-text description of the resource.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of label tags associated with the AuthorizationPolicy resource.", + "type": "object" + }, + "name": { + "description": "Required. Name of the AuthorizationPolicy resource. It matches pattern `projects/{project}/locations/{location}/authorizationPolicies/`.", + "type": "string" + }, + "rules": { + "description": "Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the `action` field will be applied on every request.", + "items": { + "$ref": "Rule" + }, + "type": "array" + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AuthzPolicy": { + "description": "`AuthzPolicy` is a resource that allows to forward traffic to a callout backend designed to scan the traffic for security purposes.", + "id": "AuthzPolicy", + "properties": { + "action": { + "description": "Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`. When the action is `CUSTOM`, `customProvider` must be specified. When the action is `ALLOW`, only requests matching the policy will be allowed. When the action is `DENY`, only requests matching the policy will be denied. When a request arrives, the policies are evaluated in the following order: 1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM` policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request. 2. If there are any `DENY` policies that match the request, the request is denied. 3. If there are no `ALLOW` policies for the resource or if any of the `ALLOW` policies match the request, the request is allowed. 4. Else the request is denied by default if none of the configured AuthzPolicies with `ALLOW` action match the request.", + "enum": [ + "AUTHZ_ACTION_UNSPECIFIED", + "ALLOW", + "DENY", + "CUSTOM" + ], + "enumDescriptions": [ + "Unspecified action.", + "Allow request to pass through to the backend.", + "Deny the request and return a HTTP 404 to the client.", + "Delegate the authorization decision to an external authorization engine." + ], + "type": "string" + }, + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "customProvider": { + "$ref": "AuthzPolicyCustomProvider", + "description": "Optional. Required if the action is `CUSTOM`. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One of `cloudIap` or `authzExtension` must be specified." + }, + "description": { + "description": "Optional. A human-readable description of the resource.", + "type": "string" + }, + "httpRules": { + "description": "Optional. A list of authorization HTTP rules to match against the incoming request. A policy match occurs when at least one HTTP rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow or Deny Action. Limited to 5 rules.", + "items": { + "$ref": "AuthzPolicyAuthzRule" + }, + "type": "array" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Set of labels associated with the `AuthzPolicy` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "type": "object" + }, + "name": { + "description": "Required. Identifier. Name of the `AuthzPolicy` resource in the following format: `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`.", + "type": "string" + }, + "target": { + "$ref": "AuthzPolicyTarget", + "description": "Required. Specifies the set of resources to which this policy should be applied to." + }, + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRule": { + "description": "Conditions to match against the incoming request.", + "id": "AuthzPolicyAuthzRule", + "properties": { + "from": { + "$ref": "AuthzPolicyAuthzRuleFrom", + "description": "Optional. Describes properties of a source of a request." + }, + "to": { + "$ref": "AuthzPolicyAuthzRuleTo", + "description": "Optional. Describes properties of a target of a request." + }, + "when": { + "description": "Optional. CEL expression that describes the conditions to be satisfied for the action. The result of the CEL expression is ANDed with the from and to. Refer to the CEL language reference for a list of available attributes.", + "type": "string" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleFrom": { + "description": "Describes properties of one or more sources of a request.", + "id": "AuthzPolicyAuthzRuleFrom", + "properties": { + "notSources": { + "description": "Optional. Describes the negated properties of request sources. Matches requests from sources that do not match the criteria specified in this field. At least one of sources or notSources must be specified.", + "items": { + "$ref": "AuthzPolicyAuthzRuleFromRequestSource" + }, + "type": "array" + }, + "sources": { + "description": "Optional. Describes the properties of a request's sources. At least one of sources or notSources must be specified. Limited to 1 source. A match occurs when ANY source (in sources or notSources) matches the request. Within a single source, the match follows AND semantics across fields and OR semantics within a single field, i.e. a match occurs when ANY principal matches AND ANY ipBlocks match.", + "items": { + "$ref": "AuthzPolicyAuthzRuleFromRequestSource" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleFromRequestSource": { + "description": "Describes the properties of a single source.", + "id": "AuthzPolicyAuthzRuleFromRequestSource", + "properties": { + "principals": { + "description": "Optional. A list of identities derived from the client's certificate. This field will not match on a request unless mutual TLS is enabled for the Forwarding rule or Gateway. Each identity is a string whose value is matched against the URI SAN, or DNS SAN or the subject field in the client's certificate. The match can be exact, prefix, suffix or a substring match. One of exact, prefix, suffix or contains must be specified. Limited to 5 principals.", + "items": { + "$ref": "AuthzPolicyAuthzRuleStringMatch" + }, + "type": "array" + }, + "resources": { + "description": "Optional. A list of resources to match against the resource of the source VM of a request. Limited to 5 resources.", + "items": { + "$ref": "AuthzPolicyAuthzRuleRequestResource" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleHeaderMatch": { + "description": "Determines how a HTTP header should be matched.", + "id": "AuthzPolicyAuthzRuleHeaderMatch", + "properties": { + "name": { + "description": "Optional. Specifies the name of the header in the request.", + "type": "string" + }, + "value": { + "$ref": "AuthzPolicyAuthzRuleStringMatch", + "description": "Optional. Specifies how the header match will be performed." + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleRequestResource": { + "description": "Describes the properties of a client VM resource accessing the internal application load balancers.", + "id": "AuthzPolicyAuthzRuleRequestResource", + "properties": { + "iamServiceAccount": { + "$ref": "AuthzPolicyAuthzRuleStringMatch", + "description": "Optional. An IAM service account to match against the source service account of the VM sending the request." + }, + "tagValueIdSet": { + "$ref": "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet", + "description": "Optional. A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request." + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet": { + "description": "Describes a set of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request.", + "id": "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet", + "properties": { + "ids": { + "description": "Required. A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request. The match follows AND semantics which means all the ids must match. Limited to 5 matches.", + "items": { + "format": "int64", + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleStringMatch": { + "description": "Determines how a string value should be matched.", + "id": "AuthzPolicyAuthzRuleStringMatch", + "properties": { + "contains": { + "description": "The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``", + "type": "string" + }, + "exact": { + "description": "The input string must match exactly the string specified here. Examples: * ``abc`` only matches the value ``abc``.", + "type": "string" + }, + "ignoreCase": { + "description": "If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if set to true.", + "type": "boolean" + }, + "prefix": { + "description": "The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``abc.xyz``", + "type": "string" + }, + "suffix": { + "description": "The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc``", + "type": "string" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleTo": { + "description": "Describes properties of one or more targets of a request.", + "id": "AuthzPolicyAuthzRuleTo", + "properties": { + "notOperations": { + "description": "Optional. Describes the negated properties of the targets of a request. Matches requests for operations that do not match the criteria specified in this field. At least one of operations or notOperations must be specified.", + "items": { + "$ref": "AuthzPolicyAuthzRuleToRequestOperation" + }, + "type": "array" + }, + "operations": { + "description": "Optional. Describes properties of one or more targets of a request. At least one of operations or notOperations must be specified. Limited to 1 operation. A match occurs when ANY operation (in operations or notOperations) matches. Within an operation, the match follows AND semantics across fields and OR semantics within a field, i.e. a match occurs when ANY path matches AND ANY header matches and ANY method matches.", + "items": { + "$ref": "AuthzPolicyAuthzRuleToRequestOperation" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleToRequestOperation": { + "description": "Describes properties of one or more targets of a request.", + "id": "AuthzPolicyAuthzRuleToRequestOperation", + "properties": { + "headerSet": { + "$ref": "AuthzPolicyAuthzRuleToRequestOperationHeaderSet", + "description": "Optional. A list of headers to match against in http header." + }, + "hosts": { + "description": "Optional. A list of HTTP Hosts to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches.", + "items": { + "$ref": "AuthzPolicyAuthzRuleStringMatch" + }, + "type": "array" + }, + "methods": { + "description": "Optional. A list of HTTP methods to match against. Each entry must be a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, OPTIONS). It only allows exact match and is always case sensitive.", + "items": { + "type": "string" + }, + "type": "array" + }, + "paths": { + "description": "Optional. A list of paths to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches. Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method.", + "items": { + "$ref": "AuthzPolicyAuthzRuleStringMatch" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyAuthzRuleToRequestOperationHeaderSet": { + "description": "Describes a set of HTTP headers to match against.", + "id": "AuthzPolicyAuthzRuleToRequestOperationHeaderSet", + "properties": { + "headers": { + "description": "Required. A list of headers to match against in http header. The match can be one of exact, prefix, suffix, or contains (substring match). The match follows AND semantics which means all the headers must match. Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches.", + "items": { + "$ref": "AuthzPolicyAuthzRuleHeaderMatch" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyCustomProvider": { + "description": "Allows delegating authorization decisions to Cloud IAP or to Service Extensions.", + "id": "AuthzPolicyCustomProvider", + "properties": { + "authzExtension": { + "$ref": "AuthzPolicyCustomProviderAuthzExtension", + "description": "Optional. Delegate authorization decision to user authored Service Extension. Only one of cloudIap or authzExtension can be specified." + }, + "cloudIap": { + "$ref": "AuthzPolicyCustomProviderCloudIap", + "description": "Optional. Delegates authorization decisions to Cloud IAP. Applicable only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy level is not compatible with Cloud IAP settings in the BackendService. Enabling IAP in both places will result in request failure. Ensure that IAP is enabled in either the AuthzPolicy or the BackendService but not in both places." + } + }, + "type": "object" + }, + "AuthzPolicyCustomProviderAuthzExtension": { + "description": "Optional. Delegate authorization decision to user authored extension. Only one of cloudIap or authzExtension can be specified.", + "id": "AuthzPolicyCustomProviderAuthzExtension", + "properties": { + "resources": { + "description": "Required. A list of references to authorization extensions that will be invoked for requests matching this policy. Limited to 1 custom provider.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "AuthzPolicyCustomProviderCloudIap": { + "description": "Optional. Delegates authorization decisions to Cloud IAP. Applicable only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy level is not compatible with Cloud IAP settings in the BackendService. Enabling IAP in both places will result in request failure. Ensure that IAP is enabled in either the AuthzPolicy or the BackendService but not in both places.", + "id": "AuthzPolicyCustomProviderCloudIap", + "properties": {}, + "type": "object" + }, + "AuthzPolicyTarget": { + "description": "Specifies the set of targets to which this policy should be applied to.", + "id": "AuthzPolicyTarget", + "properties": { + "loadBalancingScheme": { + "description": "Required. All gateways and forwarding rules referenced by this policy and extensions must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to [Backend services overview](https://cloud.google.com/load-balancing/docs/backend-service).", + "enum": [ + "LOAD_BALANCING_SCHEME_UNSPECIFIED", + "INTERNAL_MANAGED", + "EXTERNAL_MANAGED", + "INTERNAL_SELF_MANAGED" + ], + "enumDescriptions": [ + "Default value. Do not use.", + "Signifies that this is used for Regional internal or Cross-region internal Application Load Balancing.", + "Signifies that this is used for Global external or Regional external Application Load Balancing.", + "Signifies that this is used for Cloud Service Mesh. Meant for use by CSM GKE controller only." + ], + "type": "string" + }, + "resources": { + "description": "Required. A list of references to the Forwarding Rules on which this policy will be applied.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "CancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "CancelOperationRequest", + "properties": {}, + "type": "object" + }, + "CertificateProviderInstance": { + "description": "Specification of a TLS certificate provider instance. Workloads may have one or more CertificateProvider instances (plugins) and one of them is enabled and configured by specifying this message. Workloads use the values from this message to locate and load the CertificateProvider instance configuration.", + "id": "CertificateProviderInstance", + "properties": { + "pluginInstance": { + "description": "Required. Plugin instance name, used to locate and load CertificateProvider instance configuration. Set to \"google_cloud_private_spiffe\" to use Certificate Authority Service certificate provider instance.", + "type": "string" + } + }, + "type": "object" + }, + "ClientTlsPolicy": { + "description": "ClientTlsPolicy is a resource that specifies how a client should authenticate connections to backends of a service. This resource itself does not affect configuration unless it is attached to a backend service resource.", + "id": "ClientTlsPolicy", + "properties": { + "clientCertificate": { + "$ref": "GoogleCloudNetworksecurityV1beta1CertificateProvider", + "description": "Optional. Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS." }, "createTime": { "description": "Output only. The timestamp when the resource was created.", @@ -4294,20 +5414,24 @@ "additionalProperties": { "type": "string" }, - "description": "Optional. Set of label tags associated with the AuthorizationPolicy resource.", + "description": "Optional. Set of label tags associated with the resource.", "type": "object" }, "name": { - "description": "Required. Name of the AuthorizationPolicy resource. It matches pattern `projects/{project}/locations/{location}/authorizationPolicies/`.", + "description": "Required. Name of the ClientTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}`", "type": "string" }, - "rules": { - "description": "Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the `action` field will be applied on every request.", + "serverValidationCa": { + "description": "Optional. Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.", "items": { - "$ref": "Rule" + "$ref": "ValidationCA" }, "type": "array" }, + "sni": { + "description": "Optional. Server Name Indication string to present to the server during TLS handshake. E.g: \"secure.example.com\".", + "type": "string" + }, "updateTime": { "description": "Output only. The timestamp when the resource was updated.", "format": "google-datetime", @@ -4317,64 +5441,249 @@ }, "type": "object" }, - "AuthzPolicy": { - "description": "`AuthzPolicy` is a resource that allows to forward traffic to a callout backend designed to scan the traffic for security purposes.", - "id": "AuthzPolicy", + "CloneAddressGroupItemsRequest": { + "description": "Request used by the CloneAddressGroupItems method.", + "id": "CloneAddressGroupItemsRequest", "properties": { - "action": { - "description": "Required. Can be one of `ALLOW`, `DENY`, `CUSTOM`. When the action is `CUSTOM`, `customProvider` must be specified. When the action is `ALLOW`, only requests matching the policy will be allowed. When the action is `DENY`, only requests matching the policy will be denied. When a request arrives, the policies are evaluated in the following order: 1. If there is a `CUSTOM` policy that matches the request, the `CUSTOM` policy is evaluated using the custom authorization providers and the request is denied if the provider rejects the request. 2. If there are any `DENY` policies that match the request, the request is denied. 3. If there are no `ALLOW` policies for the resource or if any of the `ALLOW` policies match the request, the request is allowed. 4. Else the request is denied by default if none of the configured AuthzPolicies with `ALLOW` action match the request.", + "requestId": { + "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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" + }, + "sourceAddressGroup": { + "description": "Required. Source address group to clone items from.", + "type": "string" + } + }, + "type": "object" + }, + "CustomInterceptProfile": { + "description": "CustomInterceptProfile defines the Packet Intercept Endpoint Group used to intercept traffic to a third-party firewall in a Firewall rule.", + "id": "CustomInterceptProfile", + "properties": { + "interceptEndpointGroup": { + "description": "Required. The InterceptEndpointGroup to which traffic associated with the SP should be mirrored.", + "type": "string" + } + }, + "type": "object" + }, + "CustomMirroringProfile": { + "description": "CustomMirroringProfile defines an action for mirroring traffic to a collector's EndpointGroup", + "id": "CustomMirroringProfile", + "properties": { + "mirroringEndpointGroup": { + "description": "Required. The MirroringEndpointGroup to which traffic associated with the SP should be mirrored.", + "type": "string" + } + }, + "type": "object" + }, + "Destination": { + "description": "Specification of traffic destination attributes.", + "id": "Destination", + "properties": { + "hosts": { + "description": "Required. List of host names to match. Matched against the \":authority\" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example \"mydomain.*\") or a suffix match (example \"*.myorg.com\") or a presence (any) match \"*\".", + "items": { + "type": "string" + }, + "type": "array" + }, + "httpHeaderMatch": { + "$ref": "HttpHeaderMatch", + "description": "Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy." + }, + "methods": { + "description": "Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.", + "items": { + "type": "string" + }, + "type": "array" + }, + "ports": { + "description": "Required. List of destination ports to match. At least one port should match.", + "items": { + "format": "uint32", + "type": "integer" + }, + "type": "array" + } + }, + "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" + }, + "FirewallEndpoint": { + "description": "Message describing Endpoint object", + "id": "FirewallEndpoint", + "properties": { + "associatedNetworks": { + "deprecated": true, + "description": "Output only. List of networks that are associated with this endpoint in the local zone. This is a projection of the FirewallEndpointAssociations pointing at this endpoint. A network will only appear in this list after traffic routing is fully configured. Format: projects/{project}/global/networks/{name}.", + "items": { + "type": "string" + }, + "readOnly": true, + "type": "array" + }, + "associations": { + "description": "Output only. List of FirewallEndpointAssociations that are associated to this endpoint. An association will only appear in this list after traffic routing is fully configured.", + "items": { + "$ref": "FirewallEndpointAssociationReference" + }, + "readOnly": true, + "type": "array" + }, + "billingProjectId": { + "description": "Required. Project to bill on endpoint uptime usage.", + "type": "string" + }, + "createTime": { + "description": "Output only. Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "Optional. Description of the firewall endpoint. Max length 2048 characters.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs", + "type": "object" + }, + "name": { + "description": "Immutable. Identifier. name of resource", + "type": "string" + }, + "reconciling": { + "description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", + "readOnly": true, + "type": "boolean" + }, + "state": { + "description": "Output only. Current state of the endpoint.", "enum": [ - "AUTHZ_ACTION_UNSPECIFIED", - "ALLOW", - "DENY", - "CUSTOM" + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "INACTIVE" ], "enumDescriptions": [ - "Unspecified action.", - "Allow request to pass through to the backend.", - "Deny the request and return a HTTP 404 to the client.", - "Delegate the authorization decision to an external authorization engine." + "Not set.", + "Being created.", + "Processing configuration updates.", + "Being deleted.", + "Down or in an error state." ], + "readOnly": true, "type": "string" }, + "updateTime": { + "description": "Output only. Update time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "FirewallEndpointAssociation": { + "description": "Message describing Association object", + "id": "FirewallEndpointAssociation", + "properties": { "createTime": { - "description": "Output only. The timestamp when the resource was created.", + "description": "Output only. Create time stamp", "format": "google-datetime", "readOnly": true, "type": "string" }, - "customProvider": { - "$ref": "AuthzPolicyCustomProvider", - "description": "Optional. Required if the action is `CUSTOM`. Allows delegating authorization decisions to Cloud IAP or to Service Extensions. One of `cloudIap` or `authzExtension` must be specified." + "disabled": { + "description": "Optional. Whether the association is disabled. True indicates that traffic won't be intercepted", + "type": "boolean" }, - "description": { - "description": "Optional. A human-readable description of the resource.", + "firewallEndpoint": { + "description": "Required. The URL of the FirewallEndpoint that is being associated.", "type": "string" }, - "httpRules": { - "description": "Optional. A list of authorization HTTP rules to match against the incoming request. A policy match occurs when at least one HTTP rule matches the request or when no HTTP rules are specified in the policy. At least one HTTP Rule is required for Allow or Deny Action. Limited to 5 rules.", - "items": { - "$ref": "AuthzPolicyAuthzRule" - }, - "type": "array" - }, "labels": { "additionalProperties": { "type": "string" }, - "description": "Optional. Set of labels associated with the `AuthzPolicy` resource. The format must comply with [the following requirements](/compute/docs/labeling-resources#requirements).", + "description": "Optional. Labels as key value pairs", "type": "object" }, "name": { - "description": "Required. Identifier. Name of the `AuthzPolicy` resource in the following format: `projects/{project}/locations/{location}/authzPolicies/{authz_policy}`.", + "description": "Immutable. Identifier. name of resource", + "type": "string" + }, + "network": { + "description": "Required. The URL of the network that is being associated.", + "type": "string" + }, + "reconciling": { + "description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", + "readOnly": true, + "type": "boolean" + }, + "state": { + "description": "Output only. Current state of the association.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "ACTIVE", + "DELETING", + "INACTIVE", + "ORPHAN" + ], + "enumDescriptions": [ + "Not set.", + "Being created.", + "Active and ready for traffic.", + "Being deleted.", + "Down or in an error state.", + "The project that housed the association has been deleted." + ], + "readOnly": true, "type": "string" }, - "target": { - "$ref": "AuthzPolicyTarget", - "description": "Required. Specifies the set of resources to which this policy should be applied to." + "tlsInspectionPolicy": { + "description": "Optional. The URL of the TlsInspectionPolicy that is being associated.", + "type": "string" }, "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", + "description": "Output only. Update time stamp", "format": "google-datetime", "readOnly": true, "type": "string" @@ -4382,458 +5691,318 @@ }, "type": "object" }, - "AuthzPolicyAuthzRule": { - "description": "Conditions to match against the incoming request.", - "id": "AuthzPolicyAuthzRule", + "FirewallEndpointAssociationReference": { + "description": "This is a subset of the FirewallEndpointAssociation message, containing fields to be used by the consumer.", + "id": "FirewallEndpointAssociationReference", "properties": { - "from": { - "$ref": "AuthzPolicyAuthzRuleFrom", - "description": "Optional. Describes properties of one or more sources of a request." - }, - "to": { - "$ref": "AuthzPolicyAuthzRuleTo", - "description": "Optional. Describes properties of one or more targets of a request." + "name": { + "description": "Output only. The resource name of the FirewallEndpointAssociation. Format: projects/{project}/locations/{location}/firewallEndpointAssociations/{id}", + "readOnly": true, + "type": "string" }, - "when": { - "description": "Optional. CEL expression that describes the conditions to be satisfied for the action. The result of the CEL expression is ANDed with the from and to. Refer to the CEL language reference for a list of available attributes.", + "network": { + "description": "Output only. The VPC network associated. Format: projects/{project}/global/networks/{name}.", + "readOnly": true, "type": "string" } }, "type": "object" }, - "AuthzPolicyAuthzRuleFrom": { - "description": "Describes properties of one or more sources of a request.", - "id": "AuthzPolicyAuthzRuleFrom", + "GatewaySecurityPolicy": { + "description": "The GatewaySecurityPolicy resource contains a collection of GatewaySecurityPolicyRules and associated metadata.", + "id": "GatewaySecurityPolicy", "properties": { - "notSources": { - "description": "Optional. Describes the negated properties of request sources. Matches requests from sources that do not match the criteria specified in this field. At least one of sources or notSources must be specified.", - "items": { - "$ref": "AuthzPolicyAuthzRuleFromRequestSource" - }, - "type": "array" + "createTime": { + "description": "Output only. The timestamp when the resource was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, - "sources": { - "description": "Optional. Describes the properties of a request's sources. At least one of sources or notSources must be specified. Limited to 5 sources. A match occurs when ANY source (in sources or notSources) matches the request. Within a single source, the match follows AND semantics across fields and OR semantics within a single field, i.e. a match occurs when ANY principal matches AND ANY ipBlocks match.", - "items": { - "$ref": "AuthzPolicyAuthzRuleFromRequestSource" - }, - "type": "array" - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleFromRequestSource": { - "description": "Describes the properties of a single source.", - "id": "AuthzPolicyAuthzRuleFromRequestSource", - "properties": { - "principals": { - "description": "Optional. A list of identities derived from the client's certificate. This field will not match on a request unless mutual TLS is enabled for the Forwarding rule or Gateway. Each identity is a string whose value is matched against the URI SAN, or DNS SAN or the subject field in the client's certificate. The match can be exact, prefix, suffix or a substring match. One of exact, prefix, suffix or contains must be specified. Limited to 5 principals.", - "items": { - "$ref": "AuthzPolicyAuthzRuleStringMatch" - }, - "type": "array" + "description": { + "description": "Optional. Free-text description of the resource.", + "type": "string" }, - "resources": { - "description": "Optional. A list of resources to match against the resource of the source VM of a request. Limited to 5 resources.", - "items": { - "$ref": "AuthzPolicyAuthzRuleRequestResource" - }, - "type": "array" - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleHeaderMatch": { - "description": "Determines how a HTTP header should be matched.", - "id": "AuthzPolicyAuthzRuleHeaderMatch", - "properties": { "name": { - "description": "Optional. Specifies the name of the header in the request.", + "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} gateway_security_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", "type": "string" }, - "value": { - "$ref": "AuthzPolicyAuthzRuleStringMatch", - "description": "Optional. Specifies how the header match will be performed." - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleRequestResource": { - "description": "Describes the properties of a client VM resource accessing the internal application load balancers.", - "id": "AuthzPolicyAuthzRuleRequestResource", - "properties": { - "iamServiceAccount": { - "$ref": "AuthzPolicyAuthzRuleStringMatch", - "description": "Optional. An IAM service account to match against the source service account of the VM sending the request." + "tlsInspectionPolicy": { + "description": "Optional. Name of a TLS Inspection Policy resource that defines how TLS inspection will be performed for any rule(s) which enables it.", + "type": "string" }, - "tagValueIdSet": { - "$ref": "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet", - "description": "Optional. A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request." - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet": { - "description": "Describes a set of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request.", - "id": "AuthzPolicyAuthzRuleRequestResourceTagValueIdSet", - "properties": { - "ids": { - "description": "Required. A list of resource tag value permanent IDs to match against the resource manager tags value associated with the source VM of a request. The match follows AND semantics which means all the ids must match. Limited to 5 matches.", - "items": { - "format": "int64", - "type": "string" - }, - "type": "array" + "updateTime": { + "description": "Output only. The timestamp when the resource was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" }, - "AuthzPolicyAuthzRuleStringMatch": { - "description": "Determines how a string value should be matched.", - "id": "AuthzPolicyAuthzRuleStringMatch", + "GatewaySecurityPolicyRule": { + "description": "The GatewaySecurityPolicyRule resource is in a nested collection within a GatewaySecurityPolicy and represents a traffic matching condition and associated action to perform.", + "id": "GatewaySecurityPolicyRule", "properties": { - "contains": { - "description": "The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``", + "applicationMatcher": { + "description": "Optional. CEL expression for matching on L7/application level criteria.", "type": "string" }, - "exact": { - "description": "The input string must match exactly the string specified here. Examples: * ``abc`` only matches the value ``abc``.", + "basicProfile": { + "description": "Required. Profile which tells what the primitive action should be.", + "enum": [ + "BASIC_PROFILE_UNSPECIFIED", + "ALLOW", + "DENY" + ], + "enumDescriptions": [ + "If there is not a mentioned action for the target.", + "Allow the matched traffic.", + "Deny the matched traffic." + ], "type": "string" }, - "ignoreCase": { - "description": "If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if set to true.", - "type": "boolean" + "createTime": { + "description": "Output only. Time when the rule was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, - "prefix": { - "description": "The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``abc.xyz``", + "description": { + "description": "Optional. Free-text description of the resource.", "type": "string" }, - "suffix": { - "description": "The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc``", + "enabled": { + "description": "Required. Whether the rule is enforced.", + "type": "boolean" + }, + "name": { + "description": "Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", "type": "string" - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleTo": { - "description": "Describes properties of one or more targets of a request.", - "id": "AuthzPolicyAuthzRuleTo", - "properties": { - "notOperations": { - "description": "Optional. Describes the negated properties of the targets of a request. Matches requests for operations that do not match the criteria specified in this field. At least one of operations or notOperations must be specified.", - "items": { - "$ref": "AuthzPolicyAuthzRuleToRequestOperation" - }, - "type": "array" }, - "operations": { - "description": "Optional. Describes properties of one or more targets of a request. At least one of operations or notOperations must be specified. Limited to 5 operations. A match occurs when ANY operation (in operations or notOperations) matches. Within an operation, the match follows AND semantics across fields and OR semantics within a field, i.e. a match occurs when ANY path matches AND ANY header matches and ANY method matches.", - "items": { - "$ref": "AuthzPolicyAuthzRuleToRequestOperation" - }, - "type": "array" - } - }, - "type": "object" - }, - "AuthzPolicyAuthzRuleToRequestOperation": { - "description": "Describes properties of one or more targets of a request.", - "id": "AuthzPolicyAuthzRuleToRequestOperation", - "properties": { - "headerSet": { - "$ref": "AuthzPolicyAuthzRuleToRequestOperationHeaderSet", - "description": "Optional. A list of headers to match against in http header." + "priority": { + "description": "Required. Priority of the rule. Lower number corresponds to higher precedence.", + "format": "int32", + "type": "integer" }, - "hosts": { - "description": "Optional. A list of HTTP Hosts to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches.", - "items": { - "$ref": "AuthzPolicyAuthzRuleStringMatch" - }, - "type": "array" + "sessionMatcher": { + "description": "Required. CEL expression for matching on session criteria.", + "type": "string" }, - "methods": { - "description": "Optional. A list of HTTP methods to match against. Each entry must be a valid HTTP method name (GET, PUT, POST, HEAD, PATCH, DELETE, OPTIONS). It only allows exact match and is always case sensitive.", - "items": { - "type": "string" - }, - "type": "array" + "tlsInspectionEnabled": { + "description": "Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.", + "type": "boolean" }, - "paths": { - "description": "Optional. A list of paths to match against. The match can be one of exact, prefix, suffix, or contains (substring match). Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches. Note that this path match includes the query parameters. For gRPC services, this should be a fully-qualified name of the form /package.service/method.", - "items": { - "$ref": "AuthzPolicyAuthzRuleStringMatch" - }, - "type": "array" + "updateTime": { + "description": "Output only. Time when the rule was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" } }, "type": "object" }, - "AuthzPolicyAuthzRuleToRequestOperationHeaderSet": { - "description": "Describes a set of HTTP headers to match against.", - "id": "AuthzPolicyAuthzRuleToRequestOperationHeaderSet", - "properties": { - "headers": { - "description": "Required. A list of headers to match against in http header. The match can be one of exact, prefix, suffix, or contains (substring match). The match follows AND semantics which means all the headers must match. Matches are always case sensitive unless the ignoreCase is set. Limited to 5 matches.", - "items": { - "$ref": "AuthzPolicyAuthzRuleHeaderMatch" - }, - "type": "array" + "GoogleCloudNetworksecurityV1beta1CertificateProvider": { + "description": "Specification of certificate provider. Defines the mechanism to obtain the certificate and private key for peer to peer authentication.", + "id": "GoogleCloudNetworksecurityV1beta1CertificateProvider", + "properties": { + "certificateProviderInstance": { + "$ref": "CertificateProviderInstance", + "description": "The certificate provider instance specification that will be passed to the data plane, which will be used to load necessary credential information." + }, + "grpcEndpoint": { + "$ref": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", + "description": "gRPC specific configuration to access the gRPC server to obtain the cert and private key." } }, "type": "object" }, - "AuthzPolicyCustomProvider": { - "description": "Allows delegating authorization decisions to Cloud IAP or to Service Extensions.", - "id": "AuthzPolicyCustomProvider", + "GoogleCloudNetworksecurityV1beta1GrpcEndpoint": { + "description": "Specification of the GRPC Endpoint.", + "id": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", "properties": { - "authzExtension": { - "$ref": "AuthzPolicyCustomProviderAuthzExtension", - "description": "Optional. Delegate authorization decision to user authored Service Extension. Only one of cloudIap or authzExtension can be specified." - }, - "cloudIap": { - "$ref": "AuthzPolicyCustomProviderCloudIap", - "description": "Optional. Delegates authorization decisions to Cloud IAP. Applicable only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy level is not compatible with Cloud IAP settings in the BackendService. Enabling IAP in both places will result in request failure. Ensure that IAP is enabled in either the AuthzPolicy or the BackendService but not in both places." + "targetUri": { + "description": "Required. The target URI of the gRPC endpoint. Only UDS path is supported, and should start with \"unix:\".", + "type": "string" } }, "type": "object" }, - "AuthzPolicyCustomProviderAuthzExtension": { - "description": "Optional. Delegate authorization decision to user authored extension. Only one of cloudIap or authzExtension can be specified.", - "id": "AuthzPolicyCustomProviderAuthzExtension", + "GoogleIamV1AuditConfig": { + "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", + "id": "GoogleIamV1AuditConfig", "properties": { - "resources": { - "description": "Required. A list of references to authorization extensions that will be invoked for requests matching this policy. Limited to 1 custom provider.", + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", "items": { - "type": "string" + "$ref": "GoogleIamV1AuditLogConfig" }, "type": "array" + }, + "service": { + "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", + "type": "string" } }, "type": "object" }, - "AuthzPolicyCustomProviderCloudIap": { - "description": "Optional. Delegates authorization decisions to Cloud IAP. Applicable only for managed load balancers. Enabling Cloud IAP at the AuthzPolicy level is not compatible with Cloud IAP settings in the BackendService. Enabling IAP in both places will result in request failure. Ensure that IAP is enabled in either the AuthzPolicy or the BackendService but not in both places.", - "id": "AuthzPolicyCustomProviderCloudIap", - "properties": {}, - "type": "object" - }, - "AuthzPolicyTarget": { - "description": "Specifies the set of targets to which this policy should be applied to.", - "id": "AuthzPolicyTarget", + "GoogleIamV1AuditLogConfig": { + "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", + "id": "GoogleIamV1AuditLogConfig", "properties": { - "loadBalancingScheme": { - "description": "Required. All gateways and forwarding rules referenced by this policy and extensions must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED` and `EXTERNAL_MANAGED`. For more information, refer to [Backend services overview](https://cloud.google.com/load-balancing/docs/backend-service).", + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", "enum": [ - "LOAD_BALANCING_SCHEME_UNSPECIFIED", - "INTERNAL_MANAGED", - "EXTERNAL_MANAGED", - "INTERNAL_SELF_MANAGED" + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" ], "enumDescriptions": [ - "Default value. Do not use.", - "Signifies that this is used for Regional internal or Cross-region internal Application Load Balancing.", - "Signifies that this is used for Global external or Regional external Application Load Balancing.", - "Signifies that this is used for Cloud Service Mesh. Meant for use by CSM GKE controller only." + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" ], "type": "string" - }, - "resources": { - "description": "Required. A list of references to the Forwarding Rules on which this policy will be applied.", - "items": { - "type": "string" - }, - "type": "array" } }, "type": "object" }, - "CancelOperationRequest": { - "description": "The request message for Operations.CancelOperation.", - "id": "CancelOperationRequest", - "properties": {}, - "type": "object" - }, - "CertificateProviderInstance": { - "description": "Specification of a TLS certificate provider instance. Workloads may have one or more CertificateProvider instances (plugins) and one of them is enabled and configured by specifying this message. Workloads use the values from this message to locate and load the CertificateProvider instance configuration.", - "id": "CertificateProviderInstance", + "GoogleIamV1Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "GoogleIamV1Binding", "properties": { - "pluginInstance": { - "description": "Required. Plugin instance name, used to locate and load CertificateProvider instance configuration. Set to \"google_cloud_private_spiffe\" to use Certificate Authority Service certificate provider instance.", + "condition": { + "$ref": "Expr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", "type": "string" } }, "type": "object" }, - "ClientTlsPolicy": { - "description": "ClientTlsPolicy is a resource that specifies how a client should authenticate connections to backends of a service. This resource itself does not affect configuration unless it is attached to a backend service resource.", - "id": "ClientTlsPolicy", + "GoogleIamV1Policy": { + "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", + "id": "GoogleIamV1Policy", "properties": { - "clientCertificate": { - "$ref": "GoogleCloudNetworksecurityV1beta1CertificateProvider", - "description": "Optional. Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS." - }, - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. Free-text description of the resource.", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "GoogleIamV1AuditConfig" }, - "description": "Optional. Set of label tags associated with the resource.", - "type": "object" - }, - "name": { - "description": "Required. Name of the ClientTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}`", - "type": "string" + "type": "array" }, - "serverValidationCa": { - "description": "Optional. Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.", + "bindings": { + "description": "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`.", "items": { - "$ref": "ValidationCA" + "$ref": "GoogleIamV1Binding" }, "type": "array" }, - "sni": { - "description": "Optional. Server Name Indication string to present to the server during TLS handshake. E.g: \"secure.example.com\".", + "etag": { + "description": "`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.", + "format": "byte", "type": "string" }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", - "readOnly": true, - "type": "string" + "version": { + "description": "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).", + "format": "int32", + "type": "integer" } }, "type": "object" }, - "CloneAddressGroupItemsRequest": { - "description": "Request used by the CloneAddressGroupItems method.", - "id": "CloneAddressGroupItemsRequest", + "GoogleIamV1SetIamPolicyRequest": { + "description": "Request message for `SetIamPolicy` method.", + "id": "GoogleIamV1SetIamPolicyRequest", "properties": { - "requestId": { - "description": "Optional. An optional 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 will guarantee that for at least 60 minutes since the first request. 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" + "policy": { + "$ref": "GoogleIamV1Policy", + "description": "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." }, - "sourceAddressGroup": { - "description": "Required. Source address group to clone items from.", + "updateMask": { + "description": "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\"`", + "format": "google-fieldmask", "type": "string" } }, "type": "object" }, - "CustomMirroringProfile": { - "description": "CustomMirroringProfile defines an action for mirroring traffic to a collector's EndpointGroup", - "id": "CustomMirroringProfile", + "GoogleIamV1TestIamPermissionsRequest": { + "description": "Request message for `TestIamPermissions` method.", + "id": "GoogleIamV1TestIamPermissionsRequest", "properties": { - "mirroringEndpointGroup": { - "description": "Required. The MirroringEndpointGroup to which traffic associated with the SP should be mirrored.", - "type": "string" + "permissions": { + "description": "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).", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" }, - "Destination": { - "description": "Specification of traffic destination attributes.", - "id": "Destination", + "GoogleIamV1TestIamPermissionsResponse": { + "description": "Response message for `TestIamPermissions` method.", + "id": "GoogleIamV1TestIamPermissionsResponse", "properties": { - "hosts": { - "description": "Required. List of host names to match. Matched against the \":authority\" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example \"mydomain.*\") or a suffix match (example \"*.myorg.com\") or a presence (any) match \"*\".", - "items": { - "type": "string" - }, - "type": "array" - }, - "httpHeaderMatch": { - "$ref": "HttpHeaderMatch", - "description": "Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy." - }, - "methods": { - "description": "Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.", + "permissions": { + "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", "items": { "type": "string" }, "type": "array" - }, - "ports": { - "description": "Required. List of destination ports to match. At least one port should match.", - "items": { - "format": "uint32", - "type": "integer" - }, - "type": "array" } }, "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", + "HttpHeaderMatch": { + "description": "Specification of HTTP header match attributes.", + "id": "HttpHeaderMatch", "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.", + "headerName": { + "description": "Required. The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name \":authority\". For matching a request's method, use the headerName \":method\".", "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.", + }, + "regexMatch": { + "description": "Required. The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to Host and a regular expression that satisfies the RFC2616 Host header's port specifier.", "type": "string" } }, "type": "object" }, - "FirewallEndpoint": { - "description": "Message describing Endpoint object", - "id": "FirewallEndpoint", + "InterceptDeployment": { + "description": "Message describing InterceptDeployment object", + "id": "InterceptDeployment", "properties": { - "associatedNetworks": { - "deprecated": true, - "description": "Output only. List of networks that are associated with this endpoint in the local zone. This is a projection of the FirewallEndpointAssociations pointing at this endpoint. A network will only appear in this list after traffic routing is fully configured. Format: projects/{project}/global/networks/{name}.", - "items": { - "type": "string" - }, - "readOnly": true, - "type": "array" - }, - "associations": { - "description": "Output only. List of FirewallEndpointAssociations that are associated to this endpoint. An association will only appear in this list after traffic routing is fully configured.", - "items": { - "$ref": "FirewallEndpointAssociationReference" - }, - "readOnly": true, - "type": "array" - }, - "billingProjectId": { - "description": "Required. Project to bill on endpoint uptime usage.", - "type": "string" - }, "createTime": { - "description": "Output only. Create time stamp", + "description": "Output only. [Output only] Create time stamp", "format": "google-datetime", "readOnly": true, "type": "string" }, - "description": { - "description": "Optional. Description of the firewall endpoint. Max length 2048 characters.", + "forwardingRule": { + "description": "Required. Immutable. The regional load balancer which the intercepted traffic should be forwarded to. Format is: projects/{project}/regions/{region}/forwardingRules/{forwardingRule}", + "type": "string" + }, + "interceptDeploymentGroup": { + "description": "Required. Immutable. The Intercept Deployment Group that this resource is part of. Format is: `projects/{project}/locations/global/interceptDeploymentGroups/{interceptDeploymentGroup}`", "type": "string" }, "labels": { @@ -4844,7 +6013,7 @@ "type": "object" }, "name": { - "description": "Immutable. Identifier. name of resource", + "description": "Immutable. Identifier. The name of the InterceptDeployment.", "type": "string" }, "reconciling": { @@ -4853,26 +6022,28 @@ "type": "boolean" }, "state": { - "description": "Output only. Current state of the endpoint.", + "description": "Output only. Current state of the deployment.", "enum": [ "STATE_UNSPECIFIED", - "CREATING", "ACTIVE", + "CREATING", "DELETING", - "INACTIVE" + "OUT_OF_SYNC", + "DELETE_FAILED" ], "enumDescriptions": [ "Not set.", + "Ready.", "Being created.", - "Processing configuration updates.", "Being deleted.", - "Down or in an error state." + "The underlying data plane is out of sync with the deployment. The deployment is not expected to be usable. This state can result in undefined behavior.", + "An attempt to delete the deployment has failed. This is a terminal state and the deployment is not expected to be usable as some of its resources have been deleted. The only permitted operation is to retry deleting the deployment." ], "readOnly": true, "type": "string" }, "updateTime": { - "description": "Output only. Update time stamp", + "description": "Output only. [Output only] Update time stamp", "format": "google-datetime", "readOnly": true, "type": "string" @@ -4880,24 +6051,24 @@ }, "type": "object" }, - "FirewallEndpointAssociation": { - "description": "Message describing Association object", - "id": "FirewallEndpointAssociation", + "InterceptDeploymentGroup": { + "description": "Message describing InterceptDeploymentGroup object", + "id": "InterceptDeploymentGroup", "properties": { + "connectedEndpointGroups": { + "description": "Output only. The list of Intercept Endpoint Groups that are connected to this resource.", + "items": { + "$ref": "InterceptDeploymentGroupConnectedEndpointGroup" + }, + "readOnly": true, + "type": "array" + }, "createTime": { - "description": "Output only. Create time stamp", + "description": "Output only. [Output only] Create time stamp", "format": "google-datetime", "readOnly": true, "type": "string" }, - "disabled": { - "description": "Optional. Whether the association is disabled. True indicates that traffic won't be intercepted", - "type": "boolean" - }, - "firewallEndpoint": { - "description": "Required. The URL of the FirewallEndpoint that is being associated.", - "type": "string" - }, "labels": { "additionalProperties": { "type": "string" @@ -4906,11 +6077,11 @@ "type": "object" }, "name": { - "description": "Immutable. Identifier. name of resource", + "description": "Immutable. Identifier. Then name of the InterceptDeploymentGroup.", "type": "string" }, "network": { - "description": "Required. The URL of the network that is being associated.", + "description": "Required. Immutable. The network that is being used for the deployment. Format is: projects/{project}/global/networks/{network}.", "type": "string" }, "reconciling": { @@ -4919,32 +6090,24 @@ "type": "boolean" }, "state": { - "description": "Output only. Current state of the association.", + "description": "Output only. Current state of the deployment group.", "enum": [ "STATE_UNSPECIFIED", - "CREATING", "ACTIVE", - "DELETING", - "INACTIVE", - "ORPHAN" + "CREATING", + "DELETING" ], "enumDescriptions": [ "Not set.", + "Ready.", "Being created.", - "Active and ready for traffic.", - "Being deleted.", - "Down or in an error state.", - "The project that housed the association has been deleted." + "Being deleted." ], "readOnly": true, "type": "string" }, - "tlsInspectionPolicy": { - "description": "Optional. The URL of the TlsInspectionPolicy that is being associated.", - "type": "string" - }, "updateTime": { - "description": "Output only. Update time stamp", + "description": "Output only. [Output only] Update time stamp", "format": "google-datetime", "readOnly": true, "type": "string" @@ -4952,297 +6115,228 @@ }, "type": "object" }, - "FirewallEndpointAssociationReference": { - "description": "This is a subset of the FirewallEndpointAssociation message, containing fields to be used by the consumer.", - "id": "FirewallEndpointAssociationReference", + "InterceptDeploymentGroupConnectedEndpointGroup": { + "description": "An endpoint group connected to this deployment group.", + "id": "InterceptDeploymentGroupConnectedEndpointGroup", "properties": { "name": { - "description": "Output only. The resource name of the FirewallEndpointAssociation. Format: projects/{project}/locations/{location}/firewallEndpointAssociations/{id}", - "readOnly": true, - "type": "string" - }, - "network": { - "description": "Output only. The VPC network associated. Format: projects/{project}/global/networks/{name}.", + "description": "Output only. A connected intercept endpoint group.", "readOnly": true, "type": "string" } }, "type": "object" }, - "GatewaySecurityPolicy": { - "description": "The GatewaySecurityPolicy resource contains a collection of GatewaySecurityPolicyRules and associated metadata.", - "id": "GatewaySecurityPolicy", + "InterceptEndpointGroup": { + "description": "Message describing InterceptEndpointGroup object.", + "id": "InterceptEndpointGroup", "properties": { - "createTime": { - "description": "Output only. The timestamp when the resource was created.", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. Free-text description of the resource.", - "type": "string" - }, - "name": { - "description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} gateway_security_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", - "type": "string" - }, - "tlsInspectionPolicy": { - "description": "Optional. Name of a TLS Inspection Policy resource that defines how TLS inspection will be performed for any rule(s) which enables it.", - "type": "string" - }, - "updateTime": { - "description": "Output only. The timestamp when the resource was updated.", - "format": "google-datetime", + "associations": { + "description": "Output only. List of Intercept Endpoint Group Associations that are associated to this endpoint group.", + "items": { + "$ref": "InterceptEndpointGroupAssociationDetails" + }, "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GatewaySecurityPolicyRule": { - "description": "The GatewaySecurityPolicyRule resource is in a nested collection within a GatewaySecurityPolicy and represents a traffic matching condition and associated action to perform.", - "id": "GatewaySecurityPolicyRule", - "properties": { - "applicationMatcher": { - "description": "Optional. CEL expression for matching on L7/application level criteria.", - "type": "string" - }, - "basicProfile": { - "description": "Required. Profile which tells what the primitive action should be.", - "enum": [ - "BASIC_PROFILE_UNSPECIFIED", - "ALLOW", - "DENY" - ], - "enumDescriptions": [ - "If there is not a mentioned action for the target.", - "Allow the matched traffic.", - "Deny the matched traffic." - ], - "type": "string" + "type": "array" }, "createTime": { - "description": "Output only. Time when the rule was created.", + "description": "Output only. [Output only] Create time stamp", "format": "google-datetime", "readOnly": true, "type": "string" }, "description": { - "description": "Optional. Free-text description of the resource.", + "description": "Optional. User-provided description of the endpoint group. Used as additional context for the endpoint group.", "type": "string" }, - "enabled": { - "description": "Required. Whether the rule is enforced.", - "type": "boolean" - }, - "name": { - "description": "Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", + "interceptDeploymentGroup": { + "description": "Required. Immutable. The Intercept Deployment Group that this resource is connected to. Format is: `projects/{project}/locations/global/interceptDeploymentGroups/{interceptDeploymentGroup}`", "type": "string" }, - "priority": { - "description": "Required. Priority of the rule. Lower number corresponds to higher precedence.", - "format": "int32", - "type": "integer" + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Optional. Labels as key value pairs", + "type": "object" }, - "sessionMatcher": { - "description": "Required. CEL expression for matching on session criteria.", + "name": { + "description": "Immutable. Identifier. The name of the InterceptEndpointGroup.", "type": "string" }, - "tlsInspectionEnabled": { - "description": "Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.", - "type": "boolean" - }, - "updateTime": { - "description": "Output only. Time when the rule was updated.", - "format": "google-datetime", + "reconciling": { + "description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", "readOnly": true, - "type": "string" - } - }, - "type": "object" - }, - "GoogleCloudNetworksecurityV1beta1CertificateProvider": { - "description": "Specification of certificate provider. Defines the mechanism to obtain the certificate and private key for peer to peer authentication.", - "id": "GoogleCloudNetworksecurityV1beta1CertificateProvider", - "properties": { - "certificateProviderInstance": { - "$ref": "CertificateProviderInstance", - "description": "The certificate provider instance specification that will be passed to the data plane, which will be used to load necessary credential information." - }, - "grpcEndpoint": { - "$ref": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", - "description": "gRPC specific configuration to access the gRPC server to obtain the cert and private key." - } - }, - "type": "object" - }, - "GoogleCloudNetworksecurityV1beta1GrpcEndpoint": { - "description": "Specification of the GRPC Endpoint.", - "id": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", - "properties": { - "targetUri": { - "description": "Required. The target URI of the gRPC endpoint. Only UDS path is supported, and should start with \"unix:\".", - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamV1AuditConfig": { - "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", - "id": "GoogleIamV1AuditConfig", - "properties": { - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.", - "items": { - "$ref": "GoogleIamV1AuditLogConfig" - }, - "type": "array" - }, - "service": { - "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamV1AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", - "id": "GoogleIamV1AuditLogConfig", - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" + "type": "boolean" }, - "logType": { - "description": "The log type that this config enables.", + "state": { + "description": "Output only. Current state of the endpoint group.", "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" + "STATE_UNSPECIFIED", + "ACTIVE", + "CLOSED", + "CREATING", + "DELETING", + "OUT_OF_SYNC", + "DELETE_FAILED" ], "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" + "Not set.", + "Ready.", + "The deployment group has been deleted and intercept is disabled.", + "Being created.", + "Being deleted.", + "The underlying data plane is out of sync with the endpoint group. Some associations might not be usable.", + "An attempt to delete the endpoint group has failed. This is a terminal state and the endpoint group is not expected to be usable as some of its resources have been deleted. The only permitted operation is to retry deleting the endpoint group." ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. [Output only] Update time stamp", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleIamV1Binding": { - "description": "Associates `members`, or principals, with a `role`.", - "id": "GoogleIamV1Binding", + "InterceptEndpointGroupAssociation": { + "description": "Message describing InterceptEndpointGroupAssociation object", + "id": "InterceptEndpointGroupAssociation", "properties": { - "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + "createTime": { + "description": "Output only. [Output only] Create time stamp", + "format": "google-datetime", + "readOnly": true, + "type": "string" }, - "members": { - "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", - "items": { + "interceptEndpointGroup": { + "description": "Required. Immutable. The Intercept Endpoint Group that this resource is connected to. Format is: `projects/{project}/locations/global/interceptEndpointGroups/{interceptEndpointGroup}`", + "type": "string" + }, + "labels": { + "additionalProperties": { "type": "string" }, - "type": "array" + "description": "Optional. Labels as key value pairs", + "type": "object" }, - "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamV1Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", - "id": "GoogleIamV1Policy", - "properties": { - "auditConfigs": { - "description": "Specifies cloud audit logging configuration for this policy.", + "locationsDetails": { + "description": "Output only. The list of locations that this association is in and its details.", "items": { - "$ref": "GoogleIamV1AuditConfig" + "$ref": "InterceptEndpointGroupAssociationLocationDetails" }, + "readOnly": true, "type": "array" }, - "bindings": { - "description": "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`.", - "items": { - "$ref": "GoogleIamV1Binding" - }, - "type": "array" + "name": { + "description": "Immutable. Identifier. The name of the InterceptEndpointGroupAssociation.", + "type": "string" }, - "etag": { - "description": "`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.", - "format": "byte", + "network": { + "description": "Required. Immutable. The VPC network associated. Format: projects/{project}/global/networks/{network}.", "type": "string" }, - "version": { - "description": "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).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleIamV1SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "id": "GoogleIamV1SetIamPolicyRequest", - "properties": { - "policy": { - "$ref": "GoogleIamV1Policy", - "description": "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." + "reconciling": { + "description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", + "readOnly": true, + "type": "boolean" }, - "updateMask": { - "description": "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\"`", - "format": "google-fieldmask", + "state": { + "description": "Output only. Current state of the endpoint group association.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "DELETING", + "CLOSED", + "OUT_OF_SYNC", + "DELETE_FAILED" + ], + "enumDescriptions": [ + "Not set.", + "Ready.", + "Being created.", + "Being deleted.", + "Intercept is disabled due to an operation on another resource.", + "The underlying data plane is out of sync with the association. The association is not expected to be usable. This state can result in undefined behavior. See the `locations_details` field for more details.", + "An attempt to delete the association has failed. This is a terminal state and the association is not expected to be usable as some of its resources have been deleted. The only permitted operation is to retry deleting the association." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. [Output only] Update time stamp", + "format": "google-datetime", + "readOnly": true, "type": "string" } }, "type": "object" }, - "GoogleIamV1TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "id": "GoogleIamV1TestIamPermissionsRequest", - "properties": { - "permissions": { - "description": "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).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleIamV1TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "id": "GoogleIamV1TestIamPermissionsResponse", + "InterceptEndpointGroupAssociationDetails": { + "description": "This is a subset of the InterceptEndpointGroupAssociation message, containing fields to be used by the consumer.", + "id": "InterceptEndpointGroupAssociationDetails", "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", - "items": { - "type": "string" - }, - "type": "array" + "name": { + "description": "Output only. The resource name of the InterceptEndpointGroupAssociation. Format: projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{interceptEndpointGroupAssociation}", + "readOnly": true, + "type": "string" + }, + "network": { + "description": "Output only. The VPC network associated. Format: projects/{project}/global/networks/{name}.", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. Current state of the association.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "CREATING", + "DELETING", + "CLOSED", + "OUT_OF_SYNC", + "DELETE_FAILED" + ], + "enumDescriptions": [ + "Not set.", + "Ready.", + "Being created.", + "Being deleted.", + "Intercept is disabled due to an operation on another resource.", + "The underlying data plane is out of sync with the association. The association is not expected to be usable. This state can result in undefined behavior. See the `locations_details` field for more details.", + "An attempt to delete the association has failed. This is a terminal state and the association is not expected to be usable as some of its resources have been deleted. The only permitted operation is to retry deleting the association." + ], + "readOnly": true, + "type": "string" } }, "type": "object" }, - "HttpHeaderMatch": { - "description": "Specification of HTTP header match attributes.", - "id": "HttpHeaderMatch", + "InterceptEndpointGroupAssociationLocationDetails": { + "description": "Details about the association status in a specific cloud location.", + "id": "InterceptEndpointGroupAssociationLocationDetails", "properties": { - "headerName": { - "description": "Required. The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name \":authority\". For matching a request's method, use the headerName \":method\".", + "location": { + "description": "Output only. The cloud location.", + "readOnly": true, "type": "string" }, - "regexMatch": { - "description": "Required. The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to Host and a regular expression that satisfies the RFC2616 Host header's port specifier.", + "state": { + "description": "Output only. The association state in this location.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "OUT_OF_SYNC" + ], + "enumDescriptions": [ + "Not set.", + "Ready.", + "The data plane is out of sync with the association in this location." + ], + "readOnly": true, "type": "string" } }, @@ -5465,6 +6559,85 @@ }, "type": "object" }, + "ListInterceptDeploymentGroupsResponse": { + "description": "Message for response to listing InterceptDeploymentGroups", + "id": "ListInterceptDeploymentGroupsResponse", + "properties": { + "interceptDeploymentGroups": { + "description": "The list of InterceptDeploymentGroup", + "items": { + "$ref": "InterceptDeploymentGroup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListInterceptDeploymentsResponse": { + "description": "Message for response to listing InterceptDeployments", + "id": "ListInterceptDeploymentsResponse", + "properties": { + "interceptDeployments": { + "description": "The list of InterceptDeployment", + "items": { + "$ref": "InterceptDeployment" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListInterceptEndpointGroupAssociationsResponse": { + "description": "Message for response to listing InterceptEndpointGroupAssociations", + "id": "ListInterceptEndpointGroupAssociationsResponse", + "properties": { + "interceptEndpointGroupAssociations": { + "description": "The list of InterceptEndpointGroupAssociation", + "items": { + "$ref": "InterceptEndpointGroupAssociation" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, + "ListInterceptEndpointGroupsResponse": { + "description": "Message for response to listing InterceptEndpointGroups", + "id": "ListInterceptEndpointGroupsResponse", + "properties": { + "interceptEndpointGroups": { + "description": "The list of InterceptEndpointGroup", + "items": { + "$ref": "InterceptEndpointGroup" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token identifying a page of results the server should return.", + "type": "string" + } + }, + "type": "object" + }, "ListLocationsResponse": { "description": "The response message for Locations.ListLocations.", "id": "ListLocationsResponse", @@ -5815,7 +6988,7 @@ "type": "object" }, "MirroringDeploymentGroup": { - "description": "Message describing MirroringDeploymentGroup object", + "description": "Message describing MirroringDeploymentGroup object NEXT ID: 10", "id": "MirroringDeploymentGroup", "properties": { "connectedEndpointGroups": { @@ -6172,7 +7345,7 @@ "type": "object" }, "SecurityProfile": { - "description": "SecurityProfile is a resource that defines the behavior for one of many ProfileTypes. Next ID: 12", + "description": "SecurityProfile is a resource that defines the behavior for one of many ProfileTypes.", "id": "SecurityProfile", "properties": { "createTime": { @@ -6181,6 +7354,10 @@ "readOnly": true, "type": "string" }, + "customInterceptProfile": { + "$ref": "CustomInterceptProfile", + "description": "The custom TPPI configuration for the SecurityProfile." + }, "customMirroringProfile": { "$ref": "CustomMirroringProfile", "description": "The custom Packet Mirroring v2 configuration for the SecurityProfile." @@ -6214,12 +7391,14 @@ "enum": [ "PROFILE_TYPE_UNSPECIFIED", "THREAT_PREVENTION", - "CUSTOM_MIRRORING" + "CUSTOM_MIRRORING", + "CUSTOM_INTERCEPT" ], "enumDescriptions": [ "Profile type not specified.", "Profile type for threat prevention.", - "Profile type for packet mirroring v2" + "Profile type for packet mirroring v2", + "Profile type for TPPI." ], "type": "string" }, @@ -6233,7 +7412,7 @@ "type": "object" }, "SecurityProfileGroup": { - "description": "SecurityProfileGroup is a resource that defines the behavior for various ProfileTypes. Next ID: 11", + "description": "SecurityProfileGroup is a resource that defines the behavior for various ProfileTypes.", "id": "SecurityProfileGroup", "properties": { "createTime": { @@ -6242,6 +7421,10 @@ "readOnly": true, "type": "string" }, + "customInterceptProfile": { + "description": "Optional. Reference to a SecurityProfile with the CustomIntercept configuration.", + "type": "string" + }, "customMirroringProfile": { "description": "Optional. Reference to a SecurityProfile with the CustomMirroring configuration.", "type": "string" diff --git a/networksecurity/v1beta1/networksecurity-gen.go b/networksecurity/v1beta1/networksecurity-gen.go index 771055a563c..8a16220b089 100644 --- a/networksecurity/v1beta1/networksecurity-gen.go +++ b/networksecurity/v1beta1/networksecurity-gen.go @@ -258,6 +258,10 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs.ClientTlsPolicies = NewProjectsLocationsClientTlsPoliciesService(s) rs.FirewallEndpointAssociations = NewProjectsLocationsFirewallEndpointAssociationsService(s) rs.GatewaySecurityPolicies = NewProjectsLocationsGatewaySecurityPoliciesService(s) + rs.InterceptDeploymentGroups = NewProjectsLocationsInterceptDeploymentGroupsService(s) + rs.InterceptDeployments = NewProjectsLocationsInterceptDeploymentsService(s) + rs.InterceptEndpointGroupAssociations = NewProjectsLocationsInterceptEndpointGroupAssociationsService(s) + rs.InterceptEndpointGroups = NewProjectsLocationsInterceptEndpointGroupsService(s) rs.MirroringDeploymentGroups = NewProjectsLocationsMirroringDeploymentGroupsService(s) rs.MirroringDeployments = NewProjectsLocationsMirroringDeploymentsService(s) rs.MirroringEndpointGroupAssociations = NewProjectsLocationsMirroringEndpointGroupAssociationsService(s) @@ -284,6 +288,14 @@ type ProjectsLocationsService struct { GatewaySecurityPolicies *ProjectsLocationsGatewaySecurityPoliciesService + InterceptDeploymentGroups *ProjectsLocationsInterceptDeploymentGroupsService + + InterceptDeployments *ProjectsLocationsInterceptDeploymentsService + + InterceptEndpointGroupAssociations *ProjectsLocationsInterceptEndpointGroupAssociationsService + + InterceptEndpointGroups *ProjectsLocationsInterceptEndpointGroupsService + MirroringDeploymentGroups *ProjectsLocationsMirroringDeploymentGroupsService MirroringDeployments *ProjectsLocationsMirroringDeploymentsService @@ -367,6 +379,42 @@ type ProjectsLocationsGatewaySecurityPoliciesRulesService struct { s *Service } +func NewProjectsLocationsInterceptDeploymentGroupsService(s *Service) *ProjectsLocationsInterceptDeploymentGroupsService { + rs := &ProjectsLocationsInterceptDeploymentGroupsService{s: s} + return rs +} + +type ProjectsLocationsInterceptDeploymentGroupsService struct { + s *Service +} + +func NewProjectsLocationsInterceptDeploymentsService(s *Service) *ProjectsLocationsInterceptDeploymentsService { + rs := &ProjectsLocationsInterceptDeploymentsService{s: s} + return rs +} + +type ProjectsLocationsInterceptDeploymentsService struct { + s *Service +} + +func NewProjectsLocationsInterceptEndpointGroupAssociationsService(s *Service) *ProjectsLocationsInterceptEndpointGroupAssociationsService { + rs := &ProjectsLocationsInterceptEndpointGroupAssociationsService{s: s} + return rs +} + +type ProjectsLocationsInterceptEndpointGroupAssociationsService struct { + s *Service +} + +func NewProjectsLocationsInterceptEndpointGroupsService(s *Service) *ProjectsLocationsInterceptEndpointGroupsService { + rs := &ProjectsLocationsInterceptEndpointGroupsService{s: s} + return rs +} + +type ProjectsLocationsInterceptEndpointGroupsService struct { + s *Service +} + func NewProjectsLocationsMirroringDeploymentGroupsService(s *Service) *ProjectsLocationsMirroringDeploymentGroupsService { rs := &ProjectsLocationsMirroringDeploymentGroupsService{s: s} return rs @@ -657,9 +705,9 @@ func (s AuthzPolicy) MarshalJSON() ([]byte, error) { // AuthzPolicyAuthzRule: Conditions to match against the incoming request. type AuthzPolicyAuthzRule struct { - // From: Optional. Describes properties of one or more sources of a request. + // From: Optional. Describes properties of a source of a request. From *AuthzPolicyAuthzRuleFrom `json:"from,omitempty"` - // To: Optional. Describes properties of one or more targets of a request. + // To: Optional. Describes properties of a target of a request. To *AuthzPolicyAuthzRuleTo `json:"to,omitempty"` // When: Optional. CEL expression that describes the conditions to be satisfied // for the action. The result of the CEL expression is ANDed with the from and @@ -691,8 +739,8 @@ type AuthzPolicyAuthzRuleFrom struct { // this field. At least one of sources or notSources must be specified. NotSources []*AuthzPolicyAuthzRuleFromRequestSource `json:"notSources,omitempty"` // Sources: Optional. Describes the properties of a request's sources. At least - // one of sources or notSources must be specified. Limited to 5 sources. A - // match occurs when ANY source (in sources or notSources) matches the request. + // one of sources or notSources must be specified. Limited to 1 source. A match + // occurs when ANY source (in sources or notSources) matches the request. // Within a single source, the match follows AND semantics across fields and OR // semantics within a single field, i.e. a match occurs when ANY principal // matches AND ANY ipBlocks match. @@ -877,7 +925,7 @@ type AuthzPolicyAuthzRuleTo struct { NotOperations []*AuthzPolicyAuthzRuleToRequestOperation `json:"notOperations,omitempty"` // Operations: Optional. Describes properties of one or more targets of a // request. At least one of operations or notOperations must be specified. - // Limited to 5 operations. A match occurs when ANY operation (in operations or + // Limited to 1 operation. A match occurs when ANY operation (in operations or // notOperations) matches. Within an operation, the match follows AND semantics // across fields and OR semantics within a field, i.e. a match occurs when ANY // path matches AND ANY header matches and ANY method matches. @@ -1185,6 +1233,31 @@ func (s CloneAddressGroupItemsRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// CustomInterceptProfile: CustomInterceptProfile defines the Packet Intercept +// Endpoint Group used to intercept traffic to a third-party firewall in a +// Firewall rule. +type CustomInterceptProfile struct { + // InterceptEndpointGroup: Required. The InterceptEndpointGroup to which + // traffic associated with the SP should be mirrored. + InterceptEndpointGroup string `json:"interceptEndpointGroup,omitempty"` + // ForceSendFields is a list of field names (e.g. "InterceptEndpointGroup") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "InterceptEndpointGroup") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s CustomInterceptProfile) MarshalJSON() ([]byte, error) { + type NoMethod CustomInterceptProfile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // CustomMirroringProfile: CustomMirroringProfile defines an action for // mirroring traffic to a collector's EndpointGroup type CustomMirroringProfile struct { @@ -1977,131 +2050,463 @@ func (s HttpHeaderMatch) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListAddressGroupReferencesResponse: Response of the -// ListAddressGroupReferences method. -type ListAddressGroupReferencesResponse struct { - // AddressGroupReferences: A list of references that matches the specified - // filter in the request. - AddressGroupReferences []*ListAddressGroupReferencesResponseAddressGroupReference `json:"addressGroupReferences,omitempty"` - // NextPageToken: If there might be more results than those appearing in this - // response, then `next_page_token` is included. To get the next set of - // results, call this method again using the value of `next_page_token` as - // `page_token`. - NextPageToken string `json:"nextPageToken,omitempty"` +// InterceptDeployment: Message describing InterceptDeployment object +type InterceptDeployment struct { + // CreateTime: Output only. [Output only] Create time stamp + CreateTime string `json:"createTime,omitempty"` + // ForwardingRule: Required. Immutable. The regional load balancer which the + // intercepted traffic should be forwarded to. Format is: + // projects/{project}/regions/{region}/forwardingRules/{forwardingRule} + ForwardingRule string `json:"forwardingRule,omitempty"` + // InterceptDeploymentGroup: Required. Immutable. The Intercept Deployment + // Group that this resource is part of. Format is: + // `projects/{project}/locations/global/interceptDeploymentGroups/{interceptDepl + // oymentGroup}` + InterceptDeploymentGroup string `json:"interceptDeploymentGroup,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // Name: Immutable. Identifier. The name of the InterceptDeployment. + Name string `json:"name,omitempty"` + // Reconciling: Output only. Whether reconciling is in progress, recommended + // per https://google.aip.dev/128. + Reconciling bool `json:"reconciling,omitempty"` + // State: Output only. Current state of the deployment. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "CREATING" - Being created. + // "DELETING" - Being deleted. + // "OUT_OF_SYNC" - The underlying data plane is out of sync with the + // deployment. The deployment is not expected to be usable. This state can + // result in undefined behavior. + // "DELETE_FAILED" - An attempt to delete the deployment has failed. This is + // a terminal state and the deployment is not expected to be usable as some of + // its resources have been deleted. The only permitted operation is to retry + // deleting the deployment. + State string `json:"state,omitempty"` + // UpdateTime: Output only. [Output only] Update time stamp + 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. "AddressGroupReferences") 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddressGroupReferences") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListAddressGroupReferencesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAddressGroupReferencesResponse +func (s InterceptDeployment) MarshalJSON() ([]byte, error) { + type NoMethod InterceptDeployment return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListAddressGroupReferencesResponseAddressGroupReference: The Reference of -// AddressGroup. -type ListAddressGroupReferencesResponseAddressGroupReference struct { - // FirewallPolicy: FirewallPolicy that is using the Address Group. - FirewallPolicy string `json:"firewallPolicy,omitempty"` - // RulePriority: Rule priority of the FirewallPolicy that is using the Address - // Group. - RulePriority int64 `json:"rulePriority,omitempty"` - // SecurityPolicy: Cloud Armor SecurityPolicy that is using the Address Group. - SecurityPolicy string `json:"securityPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. "FirewallPolicy") to +// InterceptDeploymentGroup: Message describing InterceptDeploymentGroup object +type InterceptDeploymentGroup struct { + // ConnectedEndpointGroups: Output only. The list of Intercept Endpoint Groups + // that are connected to this resource. + ConnectedEndpointGroups []*InterceptDeploymentGroupConnectedEndpointGroup `json:"connectedEndpointGroups,omitempty"` + // CreateTime: Output only. [Output only] Create time stamp + CreateTime string `json:"createTime,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // Name: Immutable. Identifier. Then name of the InterceptDeploymentGroup. + Name string `json:"name,omitempty"` + // Network: Required. Immutable. The network that is being used for the + // deployment. Format is: projects/{project}/global/networks/{network}. + Network string `json:"network,omitempty"` + // Reconciling: Output only. Whether reconciling is in progress, recommended + // per https://google.aip.dev/128. + Reconciling bool `json:"reconciling,omitempty"` + // State: Output only. Current state of the deployment group. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "CREATING" - Being created. + // "DELETING" - Being deleted. + State string `json:"state,omitempty"` + // UpdateTime: Output only. [Output only] Update time stamp + 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. "ConnectedEndpointGroups") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "FirewallPolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See + // NullFields is a list of field names (e.g. "ConnectedEndpointGroups") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListAddressGroupReferencesResponseAddressGroupReference) MarshalJSON() ([]byte, error) { - type NoMethod ListAddressGroupReferencesResponseAddressGroupReference +func (s InterceptDeploymentGroup) MarshalJSON() ([]byte, error) { + type NoMethod InterceptDeploymentGroup return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListAddressGroupsResponse: Response returned by the ListAddressGroups -// method. -type ListAddressGroupsResponse struct { - // AddressGroups: List of AddressGroups resources. - AddressGroups []*AddressGroup `json:"addressGroups,omitempty"` - // NextPageToken: If there might be more results than those appearing in this - // response, then `next_page_token` is included. To get the next set of - // results, call this method again using the value of `next_page_token` as - // `page_token`. - NextPageToken string `json:"nextPageToken,omitempty"` +// InterceptDeploymentGroupConnectedEndpointGroup: An endpoint group connected +// to this deployment group. +type InterceptDeploymentGroupConnectedEndpointGroup struct { + // Name: Output only. A connected intercept endpoint group. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InterceptDeploymentGroupConnectedEndpointGroup) MarshalJSON() ([]byte, error) { + type NoMethod InterceptDeploymentGroupConnectedEndpointGroup + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// InterceptEndpointGroup: Message describing InterceptEndpointGroup object. +type InterceptEndpointGroup struct { + // Associations: Output only. List of Intercept Endpoint Group Associations + // that are associated to this endpoint group. + Associations []*InterceptEndpointGroupAssociationDetails `json:"associations,omitempty"` + // CreateTime: Output only. [Output only] Create time stamp + CreateTime string `json:"createTime,omitempty"` + // Description: Optional. User-provided description of the endpoint group. Used + // as additional context for the endpoint group. + Description string `json:"description,omitempty"` + // InterceptDeploymentGroup: Required. Immutable. The Intercept Deployment + // Group that this resource is connected to. Format is: + // `projects/{project}/locations/global/interceptDeploymentGroups/{interceptDepl + // oymentGroup}` + InterceptDeploymentGroup string `json:"interceptDeploymentGroup,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // Name: Immutable. Identifier. The name of the InterceptEndpointGroup. + Name string `json:"name,omitempty"` + // Reconciling: Output only. Whether reconciling is in progress, recommended + // per https://google.aip.dev/128. + Reconciling bool `json:"reconciling,omitempty"` + // State: Output only. Current state of the endpoint group. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "CLOSED" - The deployment group has been deleted and intercept is + // disabled. + // "CREATING" - Being created. + // "DELETING" - Being deleted. + // "OUT_OF_SYNC" - The underlying data plane is out of sync with the endpoint + // group. Some associations might not be usable. + // "DELETE_FAILED" - An attempt to delete the endpoint group has failed. This + // is a terminal state and the endpoint group is not expected to be usable as + // some of its resources have been deleted. The only permitted operation is to + // retry deleting the endpoint group. + State string `json:"state,omitempty"` + // UpdateTime: Output only. [Output only] Update time stamp + 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. "AddressGroups") to + // ForceSendFields is a list of field names (e.g. "Associations") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AddressGroups") to include in API + // NullFields is a list of field names (e.g. "Associations") to include in API // requests with the JSON null value. By default, fields with empty values are // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListAddressGroupsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAddressGroupsResponse +func (s InterceptEndpointGroup) MarshalJSON() ([]byte, error) { + type NoMethod InterceptEndpointGroup return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListAuthorizationPoliciesResponse: Response returned by the -// ListAuthorizationPolicies method. -type ListAuthorizationPoliciesResponse struct { - // AuthorizationPolicies: List of AuthorizationPolicies resources. - AuthorizationPolicies []*AuthorizationPolicy `json:"authorizationPolicies,omitempty"` - // NextPageToken: If there might be more results than those appearing in this - // response, then `next_page_token` is included. To get the next set of - // results, call this method again using the value of `next_page_token` as - // `page_token`. - NextPageToken string `json:"nextPageToken,omitempty"` +// InterceptEndpointGroupAssociation: Message describing +// InterceptEndpointGroupAssociation object +type InterceptEndpointGroupAssociation struct { + // CreateTime: Output only. [Output only] Create time stamp + CreateTime string `json:"createTime,omitempty"` + // InterceptEndpointGroup: Required. Immutable. The Intercept Endpoint Group + // that this resource is connected to. Format is: + // `projects/{project}/locations/global/interceptEndpointGroups/{interceptEndpoi + // ntGroup}` + InterceptEndpointGroup string `json:"interceptEndpointGroup,omitempty"` + // Labels: Optional. Labels as key value pairs + Labels map[string]string `json:"labels,omitempty"` + // LocationsDetails: Output only. The list of locations that this association + // is in and its details. + LocationsDetails []*InterceptEndpointGroupAssociationLocationDetails `json:"locationsDetails,omitempty"` + // Name: Immutable. Identifier. The name of the + // InterceptEndpointGroupAssociation. + Name string `json:"name,omitempty"` + // Network: Required. Immutable. The VPC network associated. Format: + // projects/{project}/global/networks/{network}. + Network string `json:"network,omitempty"` + // Reconciling: Output only. Whether reconciling is in progress, recommended + // per https://google.aip.dev/128. + Reconciling bool `json:"reconciling,omitempty"` + // State: Output only. Current state of the endpoint group association. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "CREATING" - Being created. + // "DELETING" - Being deleted. + // "CLOSED" - Intercept is disabled due to an operation on another resource. + // "OUT_OF_SYNC" - The underlying data plane is out of sync with the + // association. The association is not expected to be usable. This state can + // result in undefined behavior. See the `locations_details` field for more + // details. + // "DELETE_FAILED" - An attempt to delete the association has failed. This is + // a terminal state and the association is not expected to be usable as some of + // its resources have been deleted. The only permitted operation is to retry + // deleting the association. + State string `json:"state,omitempty"` + // UpdateTime: Output only. [Output only] Update time stamp + 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. "AuthorizationPolicies") 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. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuthorizationPolicies") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListAuthorizationPoliciesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListAuthorizationPoliciesResponse +func (s InterceptEndpointGroupAssociation) MarshalJSON() ([]byte, error) { + type NoMethod InterceptEndpointGroupAssociation return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListAuthzPoliciesResponse: Message for response to listing `AuthzPolicy` -// resources. -type ListAuthzPoliciesResponse struct { +// InterceptEndpointGroupAssociationDetails: This is a subset of the +// InterceptEndpointGroupAssociation message, containing fields to be used by +// the consumer. +type InterceptEndpointGroupAssociationDetails struct { + // Name: Output only. The resource name of the + // InterceptEndpointGroupAssociation. Format: + // projects/{project}/locations/{location}/interceptEndpointGroupAssociations/{i + // nterceptEndpointGroupAssociation} + Name string `json:"name,omitempty"` + // Network: Output only. The VPC network associated. Format: + // projects/{project}/global/networks/{name}. + Network string `json:"network,omitempty"` + // State: Output only. Current state of the association. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "CREATING" - Being created. + // "DELETING" - Being deleted. + // "CLOSED" - Intercept is disabled due to an operation on another resource. + // "OUT_OF_SYNC" - The underlying data plane is out of sync with the + // association. The association is not expected to be usable. This state can + // result in undefined behavior. See the `locations_details` field for more + // details. + // "DELETE_FAILED" - An attempt to delete the association has failed. This is + // a terminal state and the association is not expected to be usable as some of + // its resources have been deleted. The only permitted operation is to retry + // deleting the association. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InterceptEndpointGroupAssociationDetails) MarshalJSON() ([]byte, error) { + type NoMethod InterceptEndpointGroupAssociationDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// InterceptEndpointGroupAssociationLocationDetails: Details about the +// association status in a specific cloud location. +type InterceptEndpointGroupAssociationLocationDetails struct { + // Location: Output only. The cloud location. + Location string `json:"location,omitempty"` + // State: Output only. The association state in this location. + // + // Possible values: + // "STATE_UNSPECIFIED" - Not set. + // "ACTIVE" - Ready. + // "OUT_OF_SYNC" - The data plane is out of sync with the association in this + // location. + State string `json:"state,omitempty"` + // ForceSendFields is a list of field names (e.g. "Location") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Location") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InterceptEndpointGroupAssociationLocationDetails) MarshalJSON() ([]byte, error) { + type NoMethod InterceptEndpointGroupAssociationLocationDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAddressGroupReferencesResponse: Response of the +// ListAddressGroupReferences method. +type ListAddressGroupReferencesResponse struct { + // AddressGroupReferences: A list of references that matches the specified + // filter in the request. + AddressGroupReferences []*ListAddressGroupReferencesResponseAddressGroupReference `json:"addressGroupReferences,omitempty"` + // NextPageToken: If there might be more results than those appearing in this + // response, then `next_page_token` is included. To get the next set of + // results, call this method again using the value of `next_page_token` as + // `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. "AddressGroupReferences") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AddressGroupReferences") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAddressGroupReferencesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAddressGroupReferencesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAddressGroupReferencesResponseAddressGroupReference: The Reference of +// AddressGroup. +type ListAddressGroupReferencesResponseAddressGroupReference struct { + // FirewallPolicy: FirewallPolicy that is using the Address Group. + FirewallPolicy string `json:"firewallPolicy,omitempty"` + // RulePriority: Rule priority of the FirewallPolicy that is using the Address + // Group. + RulePriority int64 `json:"rulePriority,omitempty"` + // SecurityPolicy: Cloud Armor SecurityPolicy that is using the Address Group. + SecurityPolicy string `json:"securityPolicy,omitempty"` + // ForceSendFields is a list of field names (e.g. "FirewallPolicy") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "FirewallPolicy") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAddressGroupReferencesResponseAddressGroupReference) MarshalJSON() ([]byte, error) { + type NoMethod ListAddressGroupReferencesResponseAddressGroupReference + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAddressGroupsResponse: Response returned by the ListAddressGroups +// method. +type ListAddressGroupsResponse struct { + // AddressGroups: List of AddressGroups resources. + AddressGroups []*AddressGroup `json:"addressGroups,omitempty"` + // NextPageToken: If there might be more results than those appearing in this + // response, then `next_page_token` is included. To get the next set of + // results, call this method again using the value of `next_page_token` as + // `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. "AddressGroups") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AddressGroups") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAddressGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAddressGroupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAuthorizationPoliciesResponse: Response returned by the +// ListAuthorizationPolicies method. +type ListAuthorizationPoliciesResponse struct { + // AuthorizationPolicies: List of AuthorizationPolicies resources. + AuthorizationPolicies []*AuthorizationPolicy `json:"authorizationPolicies,omitempty"` + // NextPageToken: If there might be more results than those appearing in this + // response, then `next_page_token` is included. To get the next set of + // results, call this method again using the value of `next_page_token` as + // `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. "AuthorizationPolicies") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AuthorizationPolicies") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListAuthorizationPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListAuthorizationPoliciesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListAuthzPoliciesResponse: Message for response to listing `AuthzPolicy` +// resources. +type ListAuthzPoliciesResponse struct { // AuthzPolicies: The list of `AuthzPolicy` resources. AuthzPolicies []*AuthzPolicy `json:"authzPolicies,omitempty"` // NextPageToken: A token identifying a page of results that the server @@ -2288,68 +2693,40 @@ func (s ListGatewaySecurityPolicyRulesResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), 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"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Locations") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListLocationsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ListMirroringDeploymentGroupsResponse: Message for response to listing -// MirroringDeploymentGroups -type ListMirroringDeploymentGroupsResponse struct { - // MirroringDeploymentGroups: The list of MirroringDeploymentGroup - MirroringDeploymentGroups []*MirroringDeploymentGroup `json:"mirroringDeploymentGroups,omitempty"` +// ListInterceptDeploymentGroupsResponse: Message for response to listing +// InterceptDeploymentGroups +type ListInterceptDeploymentGroupsResponse struct { + // InterceptDeploymentGroups: The list of InterceptDeploymentGroup + InterceptDeploymentGroups []*InterceptDeploymentGroup `json:"interceptDeploymentGroups,omitempty"` // NextPageToken: A token identifying a page of results the server should // return. 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. "MirroringDeploymentGroups") + // ForceSendFields is a list of field names (e.g. "InterceptDeploymentGroups") // to unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MirroringDeploymentGroups") to + // NullFields is a list of field names (e.g. "InterceptDeploymentGroups") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListMirroringDeploymentGroupsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMirroringDeploymentGroupsResponse +func (s ListInterceptDeploymentGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInterceptDeploymentGroupsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListMirroringDeploymentsResponse: Message for response to listing -// MirroringDeployments -type ListMirroringDeploymentsResponse struct { - // MirroringDeployments: The list of MirroringDeployment - MirroringDeployments []*MirroringDeployment `json:"mirroringDeployments,omitempty"` +// ListInterceptDeploymentsResponse: Message for response to listing +// InterceptDeployments +type ListInterceptDeploymentsResponse struct { + // InterceptDeployments: The list of InterceptDeployment + InterceptDeployments []*InterceptDeployment `json:"interceptDeployments,omitempty"` // NextPageToken: A token identifying a page of results the server should // return. NextPageToken string `json:"nextPageToken,omitempty"` @@ -2358,30 +2735,30 @@ type ListMirroringDeploymentsResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "MirroringDeployments") to + // ForceSendFields is a list of field names (e.g. "InterceptDeployments") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MirroringDeployments") to include + // NullFields is a list of field names (e.g. "InterceptDeployments") to include // in API requests with the JSON null value. By default, fields with empty // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListMirroringDeploymentsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMirroringDeploymentsResponse +func (s ListInterceptDeploymentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInterceptDeploymentsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListMirroringEndpointGroupAssociationsResponse: Message for response to -// listing MirroringEndpointGroupAssociations -type ListMirroringEndpointGroupAssociationsResponse struct { - // MirroringEndpointGroupAssociations: The list of - // MirroringEndpointGroupAssociation - MirroringEndpointGroupAssociations []*MirroringEndpointGroupAssociation `json:"mirroringEndpointGroupAssociations,omitempty"` +// ListInterceptEndpointGroupAssociationsResponse: Message for response to +// listing InterceptEndpointGroupAssociations +type ListInterceptEndpointGroupAssociationsResponse struct { + // InterceptEndpointGroupAssociations: The list of + // InterceptEndpointGroupAssociation + InterceptEndpointGroupAssociations []*InterceptEndpointGroupAssociation `json:"interceptEndpointGroupAssociations,omitempty"` // NextPageToken: A token identifying a page of results the server should // return. NextPageToken string `json:"nextPageToken,omitempty"` @@ -2389,57 +2766,206 @@ type ListMirroringEndpointGroupAssociationsResponse struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` // ForceSendFields is a list of field names (e.g. - // "MirroringEndpointGroupAssociations") to unconditionally include in API + // "InterceptEndpointGroupAssociations") to unconditionally include in API // requests. By default, fields with empty or default values are omitted from // API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` // NullFields is a list of field names (e.g. - // "MirroringEndpointGroupAssociations") to include in API requests with the + // "InterceptEndpointGroupAssociations") to include in API requests with the // JSON null value. By default, fields with empty values are omitted from API // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for // more details. NullFields []string `json:"-"` } -func (s ListMirroringEndpointGroupAssociationsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMirroringEndpointGroupAssociationsResponse +func (s ListInterceptEndpointGroupAssociationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInterceptEndpointGroupAssociationsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListMirroringEndpointGroupsResponse: Message for response to listing -// MirroringEndpointGroups -type ListMirroringEndpointGroupsResponse struct { - // MirroringEndpointGroups: The list of MirroringEndpointGroup - MirroringEndpointGroups []*MirroringEndpointGroup `json:"mirroringEndpointGroups,omitempty"` +// ListInterceptEndpointGroupsResponse: Message for response to listing +// InterceptEndpointGroups +type ListInterceptEndpointGroupsResponse struct { + // InterceptEndpointGroups: The list of InterceptEndpointGroup + InterceptEndpointGroups []*InterceptEndpointGroup `json:"interceptEndpointGroups,omitempty"` // NextPageToken: A token identifying a page of results the server should // return. 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. "MirroringEndpointGroups") to + // ForceSendFields is a list of field names (e.g. "InterceptEndpointGroups") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "MirroringEndpointGroups") to + // NullFields is a list of field names (e.g. "InterceptEndpointGroups") to // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } -func (s ListMirroringEndpointGroupsResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListMirroringEndpointGroupsResponse +func (s ListInterceptEndpointGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListInterceptEndpointGroupsResponse return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListOperationsResponse: The response message for Operations.ListOperations. -type ListOperationsResponse struct { - // NextPageToken: The standard List next-page token. +// 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"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Locations") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListLocationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListLocationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListMirroringDeploymentGroupsResponse: Message for response to listing +// MirroringDeploymentGroups +type ListMirroringDeploymentGroupsResponse struct { + // MirroringDeploymentGroups: The list of MirroringDeploymentGroup + MirroringDeploymentGroups []*MirroringDeploymentGroup `json:"mirroringDeploymentGroups,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "MirroringDeploymentGroups") + // to unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MirroringDeploymentGroups") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListMirroringDeploymentGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMirroringDeploymentGroupsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListMirroringDeploymentsResponse: Message for response to listing +// MirroringDeployments +type ListMirroringDeploymentsResponse struct { + // MirroringDeployments: The list of MirroringDeployment + MirroringDeployments []*MirroringDeployment `json:"mirroringDeployments,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + NextPageToken string `json:"nextPageToken,omitempty"` + // Unreachable: Locations that could not be reached. + 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. "MirroringDeployments") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MirroringDeployments") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListMirroringDeploymentsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMirroringDeploymentsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListMirroringEndpointGroupAssociationsResponse: Message for response to +// listing MirroringEndpointGroupAssociations +type ListMirroringEndpointGroupAssociationsResponse struct { + // MirroringEndpointGroupAssociations: The list of + // MirroringEndpointGroupAssociation + MirroringEndpointGroupAssociations []*MirroringEndpointGroupAssociation `json:"mirroringEndpointGroupAssociations,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. + // "MirroringEndpointGroupAssociations") to unconditionally include in API + // requests. By default, fields with empty or default values are omitted from + // API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. + // "MirroringEndpointGroupAssociations") to include in API requests with the + // JSON null value. By default, fields with empty values are omitted from API + // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for + // more details. + NullFields []string `json:"-"` +} + +func (s ListMirroringEndpointGroupAssociationsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMirroringEndpointGroupAssociationsResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// ListMirroringEndpointGroupsResponse: Message for response to listing +// MirroringEndpointGroups +type ListMirroringEndpointGroupsResponse struct { + // MirroringEndpointGroups: The list of MirroringEndpointGroup + MirroringEndpointGroups []*MirroringEndpointGroup `json:"mirroringEndpointGroups,omitempty"` + // NextPageToken: A token identifying a page of results the server should + // return. + 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. "MirroringEndpointGroups") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MirroringEndpointGroups") to + // include in API requests with the JSON null value. By default, fields with + // empty values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ListMirroringEndpointGroupsResponse) MarshalJSON() ([]byte, error) { + type NoMethod ListMirroringEndpointGroupsResponse + return gensupport.MarshalJSON(NoMethod(s), 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"` // Operations: A list of operations that matches the specified filter in the // request. @@ -2770,6 +3296,7 @@ func (s MirroringDeployment) MarshalJSON() ([]byte, error) { } // MirroringDeploymentGroup: Message describing MirroringDeploymentGroup object +// NEXT ID: 10 type MirroringDeploymentGroup struct { // ConnectedEndpointGroups: Output only. The list of Mirroring Endpoint Groups // that are connected to this resource. @@ -3143,10 +3670,13 @@ func (s Rule) MarshalJSON() ([]byte, error) { } // SecurityProfile: SecurityProfile is a resource that defines the behavior for -// one of many ProfileTypes. Next ID: 12 +// one of many ProfileTypes. type SecurityProfile struct { // CreateTime: Output only. Resource creation timestamp. CreateTime string `json:"createTime,omitempty"` + // CustomInterceptProfile: The custom TPPI configuration for the + // SecurityProfile. + CustomInterceptProfile *CustomInterceptProfile `json:"customInterceptProfile,omitempty"` // CustomMirroringProfile: The custom Packet Mirroring v2 configuration for the // SecurityProfile. CustomMirroringProfile *CustomMirroringProfile `json:"customMirroringProfile,omitempty"` @@ -3174,6 +3704,7 @@ type SecurityProfile struct { // "PROFILE_TYPE_UNSPECIFIED" - Profile type not specified. // "THREAT_PREVENTION" - Profile type for threat prevention. // "CUSTOM_MIRRORING" - Profile type for packet mirroring v2 + // "CUSTOM_INTERCEPT" - Profile type for TPPI. Type string `json:"type,omitempty"` // UpdateTime: Output only. Last resource update timestamp. UpdateTime string `json:"updateTime,omitempty"` @@ -3199,10 +3730,13 @@ func (s SecurityProfile) MarshalJSON() ([]byte, error) { } // SecurityProfileGroup: SecurityProfileGroup is a resource that defines the -// behavior for various ProfileTypes. Next ID: 11 +// behavior for various ProfileTypes. type SecurityProfileGroup struct { // CreateTime: Output only. Resource creation timestamp. CreateTime string `json:"createTime,omitempty"` + // CustomInterceptProfile: Optional. Reference to a SecurityProfile with the + // CustomIntercept configuration. + CustomInterceptProfile string `json:"customInterceptProfile,omitempty"` // CustomMirroringProfile: Optional. Reference to a SecurityProfile with the // CustomMirroring configuration. CustomMirroringProfile string `json:"customMirroringProfile,omitempty"` @@ -5398,7 +5932,7 @@ type OrganizationsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -11524,23 +12058,2444 @@ type ProjectsLocationsFirewallEndpointAssociationsCreateCall struct { header_ http.Header } -// Create: Creates a new FirewallEndpointAssociation in a given project and -// location. +// Create: Creates a new FirewallEndpointAssociation in a given project and +// location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsFirewallEndpointAssociationsService) Create(parent string, firewallendpointassociation *FirewallEndpointAssociation) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { + c := &ProjectsLocationsFirewallEndpointAssociationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.firewallendpointassociation = firewallendpointassociation + return c +} + +// FirewallEndpointAssociationId sets the optional parameter +// "firewallEndpointAssociationId": Id of the requesting object. If +// auto-generating Id server-side, remove this field and +// firewall_endpoint_association_id from the method_signature of Create RPC. +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) FirewallEndpointAssociationId(firewallEndpointAssociationId string) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { + c.urlParams_.Set("firewallEndpointAssociationId", firewallEndpointAssociationId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes since +// the first request. 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 *ProjectsLocationsFirewallEndpointAssociationsCreateCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { + 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 +// details. +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallendpointassociation) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/firewallEndpointAssociations") + 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 "networksecurity.projects.locations.firewallEndpointAssociations.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsFirewallEndpointAssociationsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single FirewallEndpointAssociation. +// +// - name: Name of the resource. +func (r *ProjectsLocationsFirewallEndpointAssociationsService) Delete(name string) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { + c := &ProjectsLocationsFirewallEndpointAssociationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes after +// the first request. 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 *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { + 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 +// details. +func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsFirewallEndpointAssociationsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single FirewallEndpointAssociation. +// +// - name: Name of the resource. +func (r *ProjectsLocationsFirewallEndpointAssociationsService) Get(name string) *ProjectsLocationsFirewallEndpointAssociationsGetCall { + c := &ProjectsLocationsFirewallEndpointAssociationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFirewallEndpointAssociationsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *FirewallEndpointAssociation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Do(opts ...googleapi.CallOption) (*FirewallEndpointAssociation, 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 := &FirewallEndpointAssociation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsFirewallEndpointAssociationsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists Associations in a given project and location. +// +// - parent: Parent value for ListAssociationsRequest. +func (r *ProjectsLocationsFirewallEndpointAssociationsService) List(parent string) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c := &ProjectsLocationsFirewallEndpointAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Filter(filter string) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) OrderBy(orderBy string) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) PageSize(pageSize int64) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) PageToken(pageToken string) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/firewallEndpointAssociations") + 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 "networksecurity.projects.locations.firewallEndpointAssociations.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListFirewallEndpointAssociationsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Do(opts ...googleapi.CallOption) (*ListFirewallEndpointAssociationsResponse, 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 := &ListFirewallEndpointAssociationsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Pages(ctx context.Context, f func(*ListFirewallEndpointAssociationsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsFirewallEndpointAssociationsPatchCall struct { + s *Service + name string + firewallendpointassociation *FirewallEndpointAssociation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Update a single FirewallEndpointAssociation. +// +// - name: Immutable. Identifier. name of resource. +func (r *ProjectsLocationsFirewallEndpointAssociationsService) Patch(name string, firewallendpointassociation *FirewallEndpointAssociation) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { + c := &ProjectsLocationsFirewallEndpointAssociationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.firewallendpointassociation = firewallendpointassociation + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes since +// the first request. 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 *ProjectsLocationsFirewallEndpointAssociationsPatchCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { + 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 Association 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 *ProjectsLocationsFirewallEndpointAssociationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallendpointassociation) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGatewaySecurityPoliciesCreateCall struct { + s *Service + parent string + gatewaysecuritypolicy *GatewaySecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new GatewaySecurityPolicy in a given project and location. +// +// - parent: The parent resource of the GatewaySecurityPolicy. Must be in the +// format `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Create(parent string, gatewaysecuritypolicy *GatewaySecurityPolicy) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { + c := &ProjectsLocationsGatewaySecurityPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.gatewaysecuritypolicy = gatewaysecuritypolicy + return c +} + +// GatewaySecurityPolicyId sets the optional parameter +// "gatewaySecurityPolicyId": Required. Short name of the GatewaySecurityPolicy +// resource to be created. This value should be 1-63 characters long, +// containing only letters, numbers, hyphens, and underscores, and should not +// start with a number. E.g. "gateway_security_policy1". +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) GatewaySecurityPolicyId(gatewaySecurityPolicyId string) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { + c.urlParams_.Set("gatewaySecurityPolicyId", gatewaySecurityPolicyId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gatewaySecurityPolicies") + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGatewaySecurityPoliciesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single GatewaySecurityPolicy. +// +// - name: A name of the GatewaySecurityPolicy to delete. Must be in the format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Delete(name string) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { + c := &ProjectsLocationsGatewaySecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGatewaySecurityPoliciesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single GatewaySecurityPolicy. +// +// - name: A name of the GatewaySecurityPolicy to get. Must be in the format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Get(name string) *ProjectsLocationsGatewaySecurityPoliciesGetCall { + c := &ProjectsLocationsGatewaySecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GatewaySecurityPolicy.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*GatewaySecurityPolicy, 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 := &GatewaySecurityPolicy{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGatewaySecurityPoliciesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists GatewaySecurityPolicies in a given project and location. +// +// - parent: The project and location from which the GatewaySecurityPolicies +// should be listed, specified in the format +// `projects/{project}/locations/{location}`. +func (r *ProjectsLocationsGatewaySecurityPoliciesService) List(parent string) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c := &ProjectsLocationsGatewaySecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// GatewaySecurityPolicies to return per call. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned by the +// last 'ListGatewaySecurityPoliciesResponse' Indicates that this is a +// continuation of a prior 'ListGatewaySecurityPolicies' call, and that the +// system should return the next page of data. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gatewaySecurityPolicies") + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListGatewaySecurityPoliciesResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListGatewaySecurityPoliciesResponse, 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 := &ListGatewaySecurityPoliciesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Pages(ctx context.Context, f func(*ListGatewaySecurityPoliciesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsGatewaySecurityPoliciesPatchCall struct { + s *Service + name string + gatewaysecuritypolicy *GatewaySecurityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single GatewaySecurityPolicy. +// +// - name: Name of the resource. Name is of the form +// projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_se +// curity_policy} gateway_security_policy should match the pattern:(^a-z +// ([a-z0-9-]{0,61}[a-z0-9])?$). +func (r *ProjectsLocationsGatewaySecurityPoliciesService) Patch(name string, gatewaysecuritypolicy *GatewaySecurityPolicy) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { + c := &ProjectsLocationsGatewaySecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.gatewaysecuritypolicy = gatewaysecuritypolicy + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the GatewaySecurityPolicy 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 *ProjectsLocationsGatewaySecurityPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicy) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall struct { + s *Service + parent string + gatewaysecuritypolicyrule *GatewaySecurityPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new GatewaySecurityPolicy in a given project and location. +// +// - parent: The parent where this rule will be created. Format : +// projects/{project}/location/{location}/gatewaySecurityPolicies/*. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Create(parent string, gatewaysecuritypolicyrule *GatewaySecurityPolicyRule) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.gatewaysecuritypolicyrule = gatewaysecuritypolicyrule + return c +} + +// GatewaySecurityPolicyRuleId sets the optional parameter +// "gatewaySecurityPolicyRuleId": The ID to use for the rule, which will become +// the final component of the rule's resource name. This value should be 4-63 +// characters, and valid characters are /a-z-/. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) GatewaySecurityPolicyRuleId(gatewaySecurityPolicyRuleId string) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { + c.urlParams_.Set("gatewaySecurityPolicyRuleId", gatewaySecurityPolicyRuleId) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicyrule) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/rules") + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.rules.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single GatewaySecurityPolicyRule. +// +// - name: A name of the GatewaySecurityPolicyRule to delete. Must be in the +// format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySe +// curityPolicy}/rules/*`. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Delete(name string) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGatewaySecurityPoliciesRulesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single GatewaySecurityPolicyRule. +// +// - name: The name of the GatewaySecurityPolicyRule to retrieve. Format: +// projects/{project}/location/{location}/gatewaySecurityPolicies/*/rules/*. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Get(name string) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *GatewaySecurityPolicyRule.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Do(opts ...googleapi.CallOption) (*GatewaySecurityPolicyRule, 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 := &GatewaySecurityPolicyRule{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsGatewaySecurityPoliciesRulesListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists GatewaySecurityPolicyRules in a given project and location. +// +// - parent: The project, location and GatewaySecurityPolicy from which the +// GatewaySecurityPolicyRules should be listed, specified in the format +// `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySe +// curityPolicy}`. +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) List(parent string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// GatewaySecurityPolicyRules to return per call. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned by the +// last 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a +// continuation of a prior 'ListGatewaySecurityPolicyRules' call, and that the +// system should return the next page of data. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageToken(pageToken string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/rules") + 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 "networksecurity.projects.locations.gatewaySecurityPolicies.rules.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListGatewaySecurityPolicyRulesResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Do(opts ...googleapi.CallOption) (*ListGatewaySecurityPolicyRulesResponse, 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 := &ListGatewaySecurityPolicyRulesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Pages(ctx context.Context, f func(*ListGatewaySecurityPolicyRulesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall struct { + s *Service + name string + gatewaysecuritypolicyrule *GatewaySecurityPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the parameters of a single GatewaySecurityPolicyRule. +// +// - name: Immutable. Name of the resource. ame is the full resource name so +// projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_se +// curity_policy}/rules/{rule} rule should match the pattern: (^a-z +// ([a-z0-9-]{0,61}[a-z0-9])?$). +func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Patch(name string, gatewaysecuritypolicyrule *GatewaySecurityPolicyRule) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { + c := &ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.gatewaysecuritypolicyrule = gatewaysecuritypolicyrule + return c +} + +// UpdateMask sets the optional parameter "updateMask": Field mask is used to +// specify the fields to be overwritten in the GatewaySecurityPolicy 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 *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicyrule) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsInterceptDeploymentGroupsCreateCall struct { + s *Service + parent string + interceptdeploymentgroup *InterceptDeploymentGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new InterceptDeploymentGroup in a given project and +// location. +// +// - parent: Value for parent. +func (r *ProjectsLocationsInterceptDeploymentGroupsService) Create(parent string, interceptdeploymentgroup *InterceptDeploymentGroup) *ProjectsLocationsInterceptDeploymentGroupsCreateCall { + c := &ProjectsLocationsInterceptDeploymentGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.interceptdeploymentgroup = interceptdeploymentgroup + return c +} + +// InterceptDeploymentGroupId sets the optional parameter +// "interceptDeploymentGroupId": Required. Id of the requesting object If +// auto-generating Id server-side, remove this field and +// intercept_deployment_group_id from the method_signature of Create RPC +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) InterceptDeploymentGroupId(interceptDeploymentGroupId string) *ProjectsLocationsInterceptDeploymentGroupsCreateCall { + c.urlParams_.Set("interceptDeploymentGroupId", interceptDeploymentGroupId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes since +// the first request. 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 *ProjectsLocationsInterceptDeploymentGroupsCreateCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentGroupsCreateCall { + 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 +// details. +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentGroupsCreateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentGroupsCreateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptdeploymentgroup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptDeploymentGroups") + 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 "networksecurity.projects.locations.interceptDeploymentGroups.create" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsInterceptDeploymentGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsInterceptDeploymentGroupsDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes a single InterceptDeploymentGroup. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptDeploymentGroupsService) Delete(name string) *ProjectsLocationsInterceptDeploymentGroupsDeleteCall { + c := &ProjectsLocationsInterceptDeploymentGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes after +// the first request. 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 *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentGroupsDeleteCall { + 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 +// details. +func (c *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentGroupsDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentGroupsDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("DELETE", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.interceptDeploymentGroups.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsInterceptDeploymentGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsInterceptDeploymentGroupsGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Gets details of a single InterceptDeploymentGroup. +// +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptDeploymentGroupsService) Get(name string) *ProjectsLocationsInterceptDeploymentGroupsGetCall { + c := &ProjectsLocationsInterceptDeploymentGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInterceptDeploymentGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentGroupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsInterceptDeploymentGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptDeploymentGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInterceptDeploymentGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentGroupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInterceptDeploymentGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInterceptDeploymentGroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.interceptDeploymentGroups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *InterceptDeploymentGroup.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsInterceptDeploymentGroupsGetCall) Do(opts ...googleapi.CallOption) (*InterceptDeploymentGroup, 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 := &InterceptDeploymentGroup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsInterceptDeploymentGroupsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists InterceptDeploymentGroups in a given project and location. +// +// - parent: Parent value for ListInterceptDeploymentGroupsRequest. +func (r *ProjectsLocationsInterceptDeploymentGroupsService) List(parent string) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c := &ProjectsLocationsInterceptDeploymentGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) Filter(filter string) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) PageToken(pageToken string) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentGroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptDeploymentGroups") + 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 "networksecurity.projects.locations.interceptDeploymentGroups.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListInterceptDeploymentGroupsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInterceptDeploymentGroupsResponse, 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 := &ListInterceptDeploymentGroupsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsInterceptDeploymentGroupsListCall) Pages(ctx context.Context, f func(*ListInterceptDeploymentGroupsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type ProjectsLocationsInterceptDeploymentGroupsPatchCall struct { + s *Service + name string + interceptdeploymentgroup *InterceptDeploymentGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a single InterceptDeploymentGroup. +// +// - name: Immutable. Identifier. Then name of the InterceptDeploymentGroup. +func (r *ProjectsLocationsInterceptDeploymentGroupsService) Patch(name string, interceptdeploymentgroup *InterceptDeploymentGroup) *ProjectsLocationsInterceptDeploymentGroupsPatchCall { + c := &ProjectsLocationsInterceptDeploymentGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.interceptdeploymentgroup = interceptdeploymentgroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes since +// the first request. 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 *ProjectsLocationsInterceptDeploymentGroupsPatchCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentGroupsPatchCall { + 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 InterceptDeploymentGroup +// 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 *ProjectsLocationsInterceptDeploymentGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInterceptDeploymentGroupsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsInterceptDeploymentGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentGroupsPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsInterceptDeploymentGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentGroupsPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsInterceptDeploymentGroupsPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsInterceptDeploymentGroupsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptdeploymentgroup) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("PATCH", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "name": c.name, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "networksecurity.projects.locations.interceptDeploymentGroups.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsInterceptDeploymentGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type ProjectsLocationsInterceptDeploymentsCreateCall struct { + s *Service + parent string + interceptdeployment *InterceptDeployment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Create: Creates a new InterceptDeployment in a given project and location. // // - parent: Value for parent. -func (r *ProjectsLocationsFirewallEndpointAssociationsService) Create(parent string, firewallendpointassociation *FirewallEndpointAssociation) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { - c := &ProjectsLocationsFirewallEndpointAssociationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsInterceptDeploymentsService) Create(parent string, interceptdeployment *InterceptDeployment) *ProjectsLocationsInterceptDeploymentsCreateCall { + c := &ProjectsLocationsInterceptDeploymentsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.firewallendpointassociation = firewallendpointassociation + c.interceptdeployment = interceptdeployment return c } -// FirewallEndpointAssociationId sets the optional parameter -// "firewallEndpointAssociationId": Id of the requesting object. If -// auto-generating Id server-side, remove this field and -// firewall_endpoint_association_id from the method_signature of Create RPC. -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) FirewallEndpointAssociationId(firewallEndpointAssociationId string) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { - c.urlParams_.Set("firewallEndpointAssociationId", firewallEndpointAssociationId) +// InterceptDeploymentId sets the optional parameter "interceptDeploymentId": +// Required. Id of the requesting object If auto-generating Id server-side, +// remove this field and intercept_deployment_id from the method_signature of +// Create RPC +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) InterceptDeploymentId(interceptDeploymentId string) *ProjectsLocationsInterceptDeploymentsCreateCall { + c.urlParams_.Set("interceptDeploymentId", interceptDeploymentId) return c } @@ -11555,7 +14510,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) FirewallEndpoi // 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 *ProjectsLocationsFirewallEndpointAssociationsCreateCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentsCreateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -11563,36 +14518,36 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) RequestId(requ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsCreateCall { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Header() http.Header { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallendpointassociation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptdeployment) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/firewallEndpointAssociations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptDeployments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -11605,12 +14560,12 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.create" call. +// Do executes the "networksecurity.projects.locations.interceptDeployments.create" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptDeploymentsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11642,7 +14597,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsCreateCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsFirewallEndpointAssociationsDeleteCall struct { +type ProjectsLocationsInterceptDeploymentsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11650,11 +14605,11 @@ type ProjectsLocationsFirewallEndpointAssociationsDeleteCall struct { header_ http.Header } -// Delete: Deletes a single FirewallEndpointAssociation. +// Delete: Deletes a single InterceptDeployment. // // - name: Name of the resource. -func (r *ProjectsLocationsFirewallEndpointAssociationsService) Delete(name string) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { - c := &ProjectsLocationsFirewallEndpointAssociationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsInterceptDeploymentsService) Delete(name string) *ProjectsLocationsInterceptDeploymentsDeleteCall { + c := &ProjectsLocationsInterceptDeploymentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11670,7 +14625,7 @@ func (r *ProjectsLocationsFirewallEndpointAssociationsService) Delete(name strin // 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 *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -11678,27 +14633,27 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) RequestId(requ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsDeleteCall { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Header() http.Header { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -11716,12 +14671,12 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.delete" call. +// Do executes the "networksecurity.projects.locations.interceptDeployments.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptDeploymentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11753,7 +14708,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsDeleteCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsFirewallEndpointAssociationsGetCall struct { +type ProjectsLocationsInterceptDeploymentsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -11762,11 +14717,11 @@ type ProjectsLocationsFirewallEndpointAssociationsGetCall struct { header_ http.Header } -// Get: Gets details of a single FirewallEndpointAssociation. +// Get: Gets details of a single InterceptDeployment. // // - name: Name of the resource. -func (r *ProjectsLocationsFirewallEndpointAssociationsService) Get(name string) *ProjectsLocationsFirewallEndpointAssociationsGetCall { - c := &ProjectsLocationsFirewallEndpointAssociationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsInterceptDeploymentsService) Get(name string) *ProjectsLocationsInterceptDeploymentsGetCall { + c := &ProjectsLocationsInterceptDeploymentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -11774,7 +14729,7 @@ func (r *ProjectsLocationsFirewallEndpointAssociationsService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsGetCall { +func (c *ProjectsLocationsInterceptDeploymentsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11782,27 +14737,27 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsFirewallEndpointAssociationsGetCall { +func (c *ProjectsLocationsInterceptDeploymentsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptDeploymentsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsGetCall { +func (c *ProjectsLocationsInterceptDeploymentsGetCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Header() http.Header { +func (c *ProjectsLocationsInterceptDeploymentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptDeploymentsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -11823,13 +14778,13 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.get" call. +// Do executes the "networksecurity.projects.locations.interceptDeployments.get" call. // Any non-2xx status code is an error. Response headers are in either -// *FirewallEndpointAssociation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Do(opts ...googleapi.CallOption) (*FirewallEndpointAssociation, error) { +// *InterceptDeployment.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsInterceptDeploymentsGetCall) Do(opts ...googleapi.CallOption) (*InterceptDeployment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11848,7 +14803,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallEndpointAssociation{ + ret := &InterceptDeployment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -11861,7 +14816,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsFirewallEndpointAssociationsListCall struct { +type ProjectsLocationsInterceptDeploymentsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -11870,24 +14825,24 @@ type ProjectsLocationsFirewallEndpointAssociationsListCall struct { header_ http.Header } -// List: Lists Associations in a given project and location. +// List: Lists InterceptDeployments in a given project and location. // -// - parent: Parent value for ListAssociationsRequest. -func (r *ProjectsLocationsFirewallEndpointAssociationsService) List(parent string) *ProjectsLocationsFirewallEndpointAssociationsListCall { - c := &ProjectsLocationsFirewallEndpointAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent value for ListInterceptDeploymentsRequest. +func (r *ProjectsLocationsInterceptDeploymentsService) List(parent string) *ProjectsLocationsInterceptDeploymentsListCall { + c := &ProjectsLocationsInterceptDeploymentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } // Filter sets the optional parameter "filter": Filtering results -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Filter(filter string) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Filter(filter string) *ProjectsLocationsInterceptDeploymentsListCall { c.urlParams_.Set("filter", filter) return c } // OrderBy sets the optional parameter "orderBy": Hint for how to order the // results -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) OrderBy(orderBy string) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) OrderBy(orderBy string) *ProjectsLocationsInterceptDeploymentsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -11895,14 +14850,14 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) OrderBy(orderBy // PageSize sets the optional parameter "pageSize": Requested page size. Server // may return fewer items than requested. If unspecified, server will pick an // appropriate default. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) PageSize(pageSize int64) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) PageSize(pageSize int64) *ProjectsLocationsInterceptDeploymentsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } // PageToken sets the optional parameter "pageToken": A token identifying a // page of results the server should return. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) PageToken(pageToken string) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) PageToken(pageToken string) *ProjectsLocationsInterceptDeploymentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -11910,7 +14865,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -11918,27 +14873,27 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptDeploymentsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsListCall { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Header() http.Header { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptDeploymentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -11946,7 +14901,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/firewallEndpointAssociations") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptDeployments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -11959,13 +14914,13 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.list" call. +// Do executes the "networksecurity.projects.locations.interceptDeployments.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListFirewallEndpointAssociationsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *ListInterceptDeploymentsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Do(opts ...googleapi.CallOption) (*ListFirewallEndpointAssociationsResponse, error) { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Do(opts ...googleapi.CallOption) (*ListInterceptDeploymentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -11984,7 +14939,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListFirewallEndpointAssociationsResponse{ + ret := &ListInterceptDeploymentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12000,7 +14955,7 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) 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 *ProjectsLocationsFirewallEndpointAssociationsListCall) Pages(ctx context.Context, f func(*ListFirewallEndpointAssociationsResponse) error) error { +func (c *ProjectsLocationsInterceptDeploymentsListCall) Pages(ctx context.Context, f func(*ListInterceptDeploymentsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -12018,22 +14973,22 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsListCall) Pages(ctx contex } } -type ProjectsLocationsFirewallEndpointAssociationsPatchCall struct { - s *Service - name string - firewallendpointassociation *FirewallEndpointAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInterceptDeploymentsPatchCall struct { + s *Service + name string + interceptdeployment *InterceptDeployment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Update a single FirewallEndpointAssociation. +// Patch: Updates a single InterceptDeployment. // -// - name: Immutable. Identifier. name of resource. -func (r *ProjectsLocationsFirewallEndpointAssociationsService) Patch(name string, firewallendpointassociation *FirewallEndpointAssociation) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { - c := &ProjectsLocationsFirewallEndpointAssociationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Identifier. The name of the InterceptDeployment. +func (r *ProjectsLocationsInterceptDeploymentsService) Patch(name string, interceptdeployment *InterceptDeployment) *ProjectsLocationsInterceptDeploymentsPatchCall { + c := &ProjectsLocationsInterceptDeploymentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.firewallendpointassociation = firewallendpointassociation + c.interceptdeployment = interceptdeployment return c } @@ -12048,18 +15003,18 @@ func (r *ProjectsLocationsFirewallEndpointAssociationsService) Patch(name string // 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 *ProjectsLocationsFirewallEndpointAssociationsPatchCall) RequestId(requestId string) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) RequestId(requestId string) *ProjectsLocationsInterceptDeploymentsPatchCall { 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 Association 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 +// used to specify the fields to be overwritten in the InterceptDeployment +// 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 *ProjectsLocationsFirewallEndpointAssociationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInterceptDeploymentsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -12067,30 +15022,30 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) UpdateMask(upda // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptDeploymentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Context(ctx context.Context) *ProjectsLocationsFirewallEndpointAssociationsPatchCall { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) Context(ctx context.Context) *ProjectsLocationsInterceptDeploymentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Header() http.Header { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallendpointassociation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptdeployment) if err != nil { return nil, err } @@ -12109,12 +15064,12 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.firewallEndpointAssociations.patch" call. +// Do executes the "networksecurity.projects.locations.interceptDeployments.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptDeploymentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12146,69 +15101,85 @@ func (c *ProjectsLocationsFirewallEndpointAssociationsPatchCall) Do(opts ...goog return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesCreateCall struct { - s *Service - parent string - gatewaysecuritypolicy *GatewaySecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall struct { + s *Service + parent string + interceptendpointgroupassociation *InterceptEndpointGroupAssociation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new GatewaySecurityPolicy in a given project and location. +// Create: Creates a new InterceptEndpointGroupAssociation in a given project +// and location. // -// - parent: The parent resource of the GatewaySecurityPolicy. Must be in the -// format `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsGatewaySecurityPoliciesService) Create(parent string, gatewaysecuritypolicy *GatewaySecurityPolicy) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { - c := &ProjectsLocationsGatewaySecurityPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Value for parent. +func (r *ProjectsLocationsInterceptEndpointGroupAssociationsService) Create(parent string, interceptendpointgroupassociation *InterceptEndpointGroupAssociation) *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall { + c := &ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.gatewaysecuritypolicy = gatewaysecuritypolicy + c.interceptendpointgroupassociation = interceptendpointgroupassociation return c } -// GatewaySecurityPolicyId sets the optional parameter -// "gatewaySecurityPolicyId": Required. Short name of the GatewaySecurityPolicy -// resource to be created. This value should be 1-63 characters long, -// containing only letters, numbers, hyphens, and underscores, and should not -// start with a number. E.g. "gateway_security_policy1". -func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) GatewaySecurityPolicyId(gatewaySecurityPolicyId string) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { - c.urlParams_.Set("gatewaySecurityPolicyId", gatewaySecurityPolicyId) +// InterceptEndpointGroupAssociationId sets the optional parameter +// "interceptEndpointGroupAssociationId": Id of the requesting object If +// auto-generating Id server-side, remove this field and +// intercept_endpoint_group_association_id from the method_signature of Create +// RPC +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) InterceptEndpointGroupAssociationId(interceptEndpointGroupAssociationId string) *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall { + c.urlParams_.Set("interceptEndpointGroupAssociationId", interceptEndpointGroupAssociationId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes since +// the first request. 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 *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall { + 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 // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesCreateCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptendpointgroupassociation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gatewaySecurityPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptEndpointGroupAssociations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12221,12 +15192,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.create" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroupAssociations.create" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12258,7 +15229,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesCreateCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesDeleteCall struct { +type ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12266,40 +15237,55 @@ type ProjectsLocationsGatewaySecurityPoliciesDeleteCall struct { header_ http.Header } -// Delete: Deletes a single GatewaySecurityPolicy. +// Delete: Deletes a single InterceptEndpointGroupAssociation. // -// - name: A name of the GatewaySecurityPolicy to delete. Must be in the format -// `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. -func (r *ProjectsLocationsGatewaySecurityPoliciesService) Delete(name string) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { - c := &ProjectsLocationsGatewaySecurityPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptEndpointGroupAssociationsService) Delete(name string) *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall { + c := &ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes after +// the first request. 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 *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall { + 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 // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesDeleteCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -12317,12 +15303,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.delete" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroupAssociations.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12354,7 +15340,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesDeleteCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesGetCall struct { +type ProjectsLocationsInterceptEndpointGroupAssociationsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12363,12 +15349,11 @@ type ProjectsLocationsGatewaySecurityPoliciesGetCall struct { header_ http.Header } -// Get: Gets details of a single GatewaySecurityPolicy. +// Get: Gets details of a single InterceptEndpointGroupAssociation. // -// - name: A name of the GatewaySecurityPolicy to get. Must be in the format -// `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`. -func (r *ProjectsLocationsGatewaySecurityPoliciesService) Get(name string) *ProjectsLocationsGatewaySecurityPoliciesGetCall { - c := &ProjectsLocationsGatewaySecurityPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptEndpointGroupAssociationsService) Get(name string) *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall { + c := &ProjectsLocationsInterceptEndpointGroupAssociationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12376,7 +15361,7 @@ func (r *ProjectsLocationsGatewaySecurityPoliciesService) Get(name string) *Proj // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12384,27 +15369,27 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Fields(s ...googleapi. // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -12425,13 +15410,13 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.get" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroupAssociations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GatewaySecurityPolicy.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Do(opts ...googleapi.CallOption) (*GatewaySecurityPolicy, error) { +// *InterceptEndpointGroupAssociation.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsGetCall) Do(opts ...googleapi.CallOption) (*InterceptEndpointGroupAssociation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12450,7 +15435,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GatewaySecurityPolicy{ + ret := &InterceptEndpointGroupAssociation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12463,7 +15448,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesGetCall) Do(opts ...googleapi.C return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesListCall struct { +type ProjectsLocationsInterceptEndpointGroupAssociationsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -12472,29 +15457,40 @@ type ProjectsLocationsGatewaySecurityPoliciesListCall struct { header_ http.Header } -// List: Lists GatewaySecurityPolicies in a given project and location. +// List: Lists InterceptEndpointGroupAssociations in a given project and +// location. // -// - parent: The project and location from which the GatewaySecurityPolicies -// should be listed, specified in the format -// `projects/{project}/locations/{location}`. -func (r *ProjectsLocationsGatewaySecurityPoliciesService) List(parent string) *ProjectsLocationsGatewaySecurityPoliciesListCall { - c := &ProjectsLocationsGatewaySecurityPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent value for ListInterceptEndpointGroupAssociationsRequest. +func (r *ProjectsLocationsInterceptEndpointGroupAssociationsService) List(parent string) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { + c := &ProjectsLocationsInterceptEndpointGroupAssociationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// GatewaySecurityPolicies to return per call. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaySecurityPoliciesListCall { +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Filter(filter string) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) OrderBy(orderBy string) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) PageSize(pageSize int64) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The value returned by the -// last 'ListGatewaySecurityPoliciesResponse' Indicates that this is a -// continuation of a prior 'ListGatewaySecurityPolicies' call, and that the -// system should return the next page of data. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsGatewaySecurityPoliciesListCall { +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) PageToken(pageToken string) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -12502,7 +15498,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) PageToken(pageToken s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12510,27 +15506,27 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Fields(s ...googleapi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupAssociationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -12538,7 +15534,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) doRequest(alt string) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/gatewaySecurityPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptEndpointGroupAssociations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -12551,13 +15547,13 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.list" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroupAssociations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListGatewaySecurityPoliciesResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *ListInterceptEndpointGroupAssociationsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListGatewaySecurityPoliciesResponse, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Do(opts ...googleapi.CallOption) (*ListInterceptEndpointGroupAssociationsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12576,7 +15572,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Do(opts ...googleapi. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListGatewaySecurityPoliciesResponse{ + ret := &ListInterceptEndpointGroupAssociationsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -12592,7 +15588,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Do(opts ...googleapi. // 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 *ProjectsLocationsGatewaySecurityPoliciesListCall) Pages(ctx context.Context, f func(*ListGatewaySecurityPoliciesResponse) error) error { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsListCall) Pages(ctx context.Context, f func(*ListInterceptEndpointGroupAssociationsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -12610,35 +15606,49 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesListCall) Pages(ctx context.Con } } -type ProjectsLocationsGatewaySecurityPoliciesPatchCall struct { - s *Service - name string - gatewaysecuritypolicy *GatewaySecurityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall struct { + s *Service + name string + interceptendpointgroupassociation *InterceptEndpointGroupAssociation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single GatewaySecurityPolicy. +// Patch: Updates a single InterceptEndpointGroupAssociation. // -// - name: Name of the resource. Name is of the form -// projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_se -// curity_policy} gateway_security_policy should match the pattern:(^a-z -// ([a-z0-9-]{0,61}[a-z0-9])?$). -func (r *ProjectsLocationsGatewaySecurityPoliciesService) Patch(name string, gatewaysecuritypolicy *GatewaySecurityPolicy) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { - c := &ProjectsLocationsGatewaySecurityPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Identifier. The name of the +// InterceptEndpointGroupAssociation. +func (r *ProjectsLocationsInterceptEndpointGroupAssociationsService) Patch(name string, interceptendpointgroupassociation *InterceptEndpointGroupAssociation) *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall { + c := &ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.gatewaysecuritypolicy = gatewaysecuritypolicy + c.interceptendpointgroupassociation = interceptendpointgroupassociation return c } -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the GatewaySecurityPolicy 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 *ProjectsLocationsGatewaySecurityPoliciesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes since +// the first request. 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 *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall { + 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 +// InterceptEndpointGroupAssociation 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 *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -12646,30 +15656,30 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) UpdateMask(updateMas // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesPatchCall { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptendpointgroupassociation) if err != nil { return nil, err } @@ -12688,12 +15698,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.patch" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroupAssociations.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupAssociationsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12725,68 +15735,84 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesPatchCall) Do(opts ...googleapi return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall struct { - s *Service - parent string - gatewaysecuritypolicyrule *GatewaySecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInterceptEndpointGroupsCreateCall struct { + s *Service + parent string + interceptendpointgroup *InterceptEndpointGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Create: Creates a new GatewaySecurityPolicy in a given project and location. +// Create: Creates a new InterceptEndpointGroup in a given project and +// location. // -// - parent: The parent where this rule will be created. Format : -// projects/{project}/location/{location}/gatewaySecurityPolicies/*. -func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Create(parent string, gatewaysecuritypolicyrule *GatewaySecurityPolicyRule) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { - c := &ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Value for parent. +func (r *ProjectsLocationsInterceptEndpointGroupsService) Create(parent string, interceptendpointgroup *InterceptEndpointGroup) *ProjectsLocationsInterceptEndpointGroupsCreateCall { + c := &ProjectsLocationsInterceptEndpointGroupsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent - c.gatewaysecuritypolicyrule = gatewaysecuritypolicyrule + c.interceptendpointgroup = interceptendpointgroup return c } -// GatewaySecurityPolicyRuleId sets the optional parameter -// "gatewaySecurityPolicyRuleId": The ID to use for the rule, which will become -// the final component of the rule's resource name. This value should be 4-63 -// characters, and valid characters are /a-z-/. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) GatewaySecurityPolicyRuleId(gatewaySecurityPolicyRuleId string) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { - c.urlParams_.Set("gatewaySecurityPolicyRuleId", gatewaySecurityPolicyRuleId) +// InterceptEndpointGroupId sets the optional parameter +// "interceptEndpointGroupId": Required. Id of the requesting object If +// auto-generating Id server-side, remove this field and +// intercept_endpoint_group_id from the method_signature of Create RPC +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) InterceptEndpointGroupId(interceptEndpointGroupId string) *ProjectsLocationsInterceptEndpointGroupsCreateCall { + c.urlParams_.Set("interceptEndpointGroupId", interceptEndpointGroupId) + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes since +// the first request. 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 *ProjectsLocationsInterceptEndpointGroupsCreateCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupsCreateCall { + 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 // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupsCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall { +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupsCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicyrule) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptendpointgroup) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/rules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptEndpointGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -12799,12 +15825,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.create" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroups.create" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12836,7 +15862,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesCreateCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall struct { +type ProjectsLocationsInterceptEndpointGroupsDeleteCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12844,42 +15870,55 @@ type ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall struct { header_ http.Header } -// Delete: Deletes a single GatewaySecurityPolicyRule. +// Delete: Deletes a single InterceptEndpointGroup. // -// - name: A name of the GatewaySecurityPolicyRule to delete. Must be in the -// format -// `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySe -// curityPolicy}/rules/*`. -func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Delete(name string) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { - c := &ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptEndpointGroupsService) Delete(name string) *ProjectsLocationsInterceptEndpointGroupsDeleteCall { + c := &ProjectsLocationsInterceptEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes after +// the first request. 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 *ProjectsLocationsInterceptEndpointGroupsDeleteCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupsDeleteCall { + 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 // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { +func (c *ProjectsLocationsInterceptEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall { +func (c *ProjectsLocationsInterceptEndpointGroupsDeleteCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) @@ -12897,12 +15936,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.delete" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroups.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -12934,7 +15973,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesDeleteCall) Do(opts ...goo return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesRulesGetCall struct { +type ProjectsLocationsInterceptEndpointGroupsGetCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -12943,12 +15982,11 @@ type ProjectsLocationsGatewaySecurityPoliciesRulesGetCall struct { header_ http.Header } -// Get: Gets details of a single GatewaySecurityPolicyRule. +// Get: Gets details of a single InterceptEndpointGroup. // -// - name: The name of the GatewaySecurityPolicyRule to retrieve. Format: -// projects/{project}/location/{location}/gatewaySecurityPolicies/*/rules/*. -func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Get(name string) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { - c := &ProjectsLocationsGatewaySecurityPoliciesRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Name of the resource. +func (r *ProjectsLocationsInterceptEndpointGroupsService) Get(name string) *ProjectsLocationsInterceptEndpointGroupsGetCall { + c := &ProjectsLocationsInterceptEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } @@ -12956,7 +15994,7 @@ func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Get(name string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -12964,27 +16002,27 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptEndpointGroupsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall { +func (c *ProjectsLocationsInterceptEndpointGroupsGetCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -13005,13 +16043,13 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) doRequest(alt str return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.get" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroups.get" call. // Any non-2xx status code is an error. Response headers are in either -// *GatewaySecurityPolicyRule.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Do(opts ...googleapi.CallOption) (*GatewaySecurityPolicyRule, error) { +// *InterceptEndpointGroup.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *ProjectsLocationsInterceptEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*InterceptEndpointGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13030,7 +16068,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GatewaySecurityPolicyRule{ + ret := &InterceptEndpointGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13043,7 +16081,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesGetCall) Do(opts ...google return ret, nil } -type ProjectsLocationsGatewaySecurityPoliciesRulesListCall struct { +type ProjectsLocationsInterceptEndpointGroupsListCall struct { s *Service parent string urlParams_ gensupport.URLParams @@ -13052,30 +16090,39 @@ type ProjectsLocationsGatewaySecurityPoliciesRulesListCall struct { header_ http.Header } -// List: Lists GatewaySecurityPolicyRules in a given project and location. +// List: Lists InterceptEndpointGroups in a given project and location. // -// - parent: The project, location and GatewaySecurityPolicy from which the -// GatewaySecurityPolicyRules should be listed, specified in the format -// `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySe -// curityPolicy}`. -func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) List(parent string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { - c := &ProjectsLocationsGatewaySecurityPoliciesRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - parent: Parent value for ListInterceptEndpointGroupsRequest. +func (r *ProjectsLocationsInterceptEndpointGroupsService) List(parent string) *ProjectsLocationsInterceptEndpointGroupsListCall { + c := &ProjectsLocationsInterceptEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// GatewaySecurityPolicyRules to return per call. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageSize(pageSize int64) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { +// Filter sets the optional parameter "filter": Filtering results +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Filter(filter string) *ProjectsLocationsInterceptEndpointGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": Hint for how to order the +// results +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) OrderBy(orderBy string) *ProjectsLocationsInterceptEndpointGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Requested page size. Server +// may return fewer items than requested. If unspecified, server will pick an +// appropriate default. +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) PageSize(pageSize int64) *ProjectsLocationsInterceptEndpointGroupsListCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } -// PageToken sets the optional parameter "pageToken": The value returned by the -// last 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a -// continuation of a prior 'ListGatewaySecurityPolicyRules' call, and that the -// system should return the next page of data. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageToken(pageToken string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { +// PageToken sets the optional parameter "pageToken": A token identifying a +// page of results the server should return. +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) PageToken(pageToken string) *ProjectsLocationsInterceptEndpointGroupsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -13083,7 +16130,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) PageToken(pageTo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -13091,27 +16138,27 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Fields(s ...goog // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsInterceptEndpointGroupsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesListCall { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -13119,7 +16166,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) doRequest(alt st var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/rules") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/interceptEndpointGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -13132,13 +16179,13 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.list" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroups.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ListGatewaySecurityPolicyRulesResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *ListInterceptEndpointGroupsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Do(opts ...googleapi.CallOption) (*ListGatewaySecurityPolicyRulesResponse, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*ListInterceptEndpointGroupsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -13157,7 +16204,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ListGatewaySecurityPolicyRulesResponse{ + ret := &ListInterceptEndpointGroupsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -13173,7 +16220,7 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) 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 *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Pages(ctx context.Context, f func(*ListGatewaySecurityPolicyRulesResponse) error) error { +func (c *ProjectsLocationsInterceptEndpointGroupsListCall) Pages(ctx context.Context, f func(*ListInterceptEndpointGroupsResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -13191,35 +16238,48 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesListCall) Pages(ctx contex } } -type ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall struct { - s *Service - name string - gatewaysecuritypolicyrule *GatewaySecurityPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsInterceptEndpointGroupsPatchCall struct { + s *Service + name string + interceptendpointgroup *InterceptEndpointGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the parameters of a single GatewaySecurityPolicyRule. +// Patch: Updates a single InterceptEndpointGroup. // -// - name: Immutable. Name of the resource. ame is the full resource name so -// projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_se -// curity_policy}/rules/{rule} rule should match the pattern: (^a-z -// ([a-z0-9-]{0,61}[a-z0-9])?$). -func (r *ProjectsLocationsGatewaySecurityPoliciesRulesService) Patch(name string, gatewaysecuritypolicyrule *GatewaySecurityPolicyRule) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { - c := &ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Immutable. Identifier. The name of the InterceptEndpointGroup. +func (r *ProjectsLocationsInterceptEndpointGroupsService) Patch(name string, interceptendpointgroup *InterceptEndpointGroup) *ProjectsLocationsInterceptEndpointGroupsPatchCall { + c := &ProjectsLocationsInterceptEndpointGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.gatewaysecuritypolicyrule = gatewaysecuritypolicyrule + c.interceptendpointgroup = interceptendpointgroup return c } -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the GatewaySecurityPolicy 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 +// RequestId sets the optional parameter "requestId": An optional 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 will guarantee that for at least 60 minutes since +// the first request. 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 *ProjectsLocationsInterceptEndpointGroupsPatchCall) RequestId(requestId string) *ProjectsLocationsInterceptEndpointGroupsPatchCall { + 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 InterceptEndpointGroup +// 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 *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) UpdateMask(updateMask string) *ProjectsLocationsInterceptEndpointGroupsPatchCall { c.urlParams_.Set("updateMask", updateMask) return c } @@ -13227,30 +16287,30 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) UpdateMask(upda // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsInterceptEndpointGroupsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Context(ctx context.Context) *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) Context(ctx context.Context) *ProjectsLocationsInterceptEndpointGroupsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Header() http.Header { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.gatewaysecuritypolicyrule) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interceptendpointgroup) if err != nil { return nil, err } @@ -13269,12 +16329,12 @@ func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "networksecurity.projects.locations.gatewaySecurityPolicies.rules.patch" call. +// Do executes the "networksecurity.projects.locations.interceptEndpointGroups.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsGatewaySecurityPoliciesRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsLocationsInterceptEndpointGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -15849,7 +18909,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/networkservices/v1/networkservices-api.json b/networkservices/v1/networkservices-api.json index 362c7c267d5..4ae77063e8d 100644 --- a/networkservices/v1/networkservices-api.json +++ b/networkservices/v1/networkservices-api.json @@ -1918,7 +1918,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "networkservices.projects.locations.operations.cancel", @@ -2934,7 +2934,7 @@ } } }, - "revision": "20241109", + "revision": "20241118", "rootUrl": "https://networkservices.googleapis.com/", "schemas": { "AuditConfig": { @@ -4909,7 +4909,7 @@ "type": "object" }, "LoggingConfig": { - "description": "The configuration for Platform Telemetry logging for Eventarc Avdvanced resources.", + "description": "The configuration for Platform Telemetry logging for Eventarc Advanced resources.", "id": "LoggingConfig", "properties": { "logSeverity": { diff --git a/networkservices/v1/networkservices-gen.go b/networkservices/v1/networkservices-gen.go index ade2fd4ab2c..baa8da225db 100644 --- a/networkservices/v1/networkservices-gen.go +++ b/networkservices/v1/networkservices-gen.go @@ -3159,7 +3159,7 @@ func (s Location) MarshalJSON() ([]byte, error) { } // LoggingConfig: The configuration for Platform Telemetry logging for Eventarc -// Avdvanced resources. +// Advanced resources. type LoggingConfig struct { // LogSeverity: Optional. The minimum severity of logs that will be sent to // Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be @@ -11003,7 +11003,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/orgpolicy/v2/orgpolicy-api.json b/orgpolicy/v2/orgpolicy-api.json index d529ce4df38..589882cb0f7 100644 --- a/orgpolicy/v2/orgpolicy-api.json +++ b/orgpolicy/v2/orgpolicy-api.json @@ -930,7 +930,7 @@ } } }, - "revision": "20241021", + "revision": "20241129", "rootUrl": "https://orgpolicy.googleapis.com/", "schemas": { "GoogleCloudOrgpolicyV2AlternatePolicySpec": { @@ -989,6 +989,10 @@ "supportsDryRun": { "description": "Shows if dry run is supported for this constraint or not.", "type": "boolean" + }, + "supportsSimulation": { + "description": "Shows if simulation is supported for this constraint or not.", + "type": "boolean" } }, "type": "object" @@ -1350,6 +1354,14 @@ "description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", "type": "boolean" }, + "parameters": { + "additionalProperties": { + "description": "Properties of the object.", + "type": "any" + }, + "description": "Optional. Required for GMCs if parameters defined in constraints. Pass parameter values when policy enforcement is enabled. Ensure that parameter value types match those defined in the constraint definition. For example: { \"allowedLocations\" : [\"us-east1\", \"us-west1\"], \"allowAll\" : true }", + "type": "object" + }, "values": { "$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", "description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." diff --git a/orgpolicy/v2/orgpolicy-gen.go b/orgpolicy/v2/orgpolicy-gen.go index 2afecd91d38..aab16aea919 100644 --- a/orgpolicy/v2/orgpolicy-gen.go +++ b/orgpolicy/v2/orgpolicy-gen.go @@ -340,6 +340,9 @@ type GoogleCloudOrgpolicyV2Constraint struct { Name string `json:"name,omitempty"` // SupportsDryRun: Shows if dry run is supported for this constraint or not. SupportsDryRun bool `json:"supportsDryRun,omitempty"` + // SupportsSimulation: Shows if simulation is supported for this constraint or + // not. + SupportsSimulation bool `json:"supportsSimulation,omitempty"` // ForceSendFields is a list of field names (e.g. "BooleanConstraint") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -827,6 +830,12 @@ type GoogleCloudOrgpolicyV2PolicySpecPolicyRule struct { // configuration is acceptable. This field can be set only in policies for // boolean constraints. Enforce bool `json:"enforce,omitempty"` + // Parameters: Optional. Required for GMCs if parameters defined in + // constraints. Pass parameter values when policy enforcement is enabled. + // Ensure that parameter value types match those defined in the constraint + // definition. For example: { "allowedLocations" : ["us-east1", "us-west1"], + // "allowAll" : true } + Parameters googleapi.RawMessage `json:"parameters,omitempty"` // Values: List of values to be used for this policy rule. This field can be // set only in policies for list constraints. Values *GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues `json:"values,omitempty"` diff --git a/redis/v1/redis-api.json b/redis/v1/redis-api.json index 2945eef09a5..c76aeb9494d 100644 --- a/redis/v1/redis-api.json +++ b/redis/v1/redis-api.json @@ -370,7 +370,7 @@ "clusters": { "methods": { "backup": { - "description": "Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation.", + "description": "Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:backup", "httpMethod": "POST", "id": "redis.projects.locations.clusters.backup", @@ -1067,7 +1067,7 @@ } } }, - "revision": "20241114", + "revision": "20241203", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1116,7 +1116,7 @@ "description": "Optional. Trigger automated backups at a fixed frequency." }, "retention": { - "description": "Optional. How long to keep automated backups before the backups are deleted. If not specified, the default value is 100 years which is also the maximum value supported. The minimum value is 1 day.", + "description": "Optional. How long to keep automated backups before the backups are deleted. The value should be between 1 day and 365 days. If not specified, the default value is 35 days.", "format": "google-duration", "type": "string" } @@ -1257,13 +1257,15 @@ "STATE_UNSPECIFIED", "CREATING", "ACTIVE", - "DELETING" + "DELETING", + "SUSPENDED" ], "enumDescriptions": [ "The default value, not set.", "The backup is being created.", "The backup is active to be used.", - "The backup is being deleted." + "The backup is being deleted.", + "The backup is currently suspended due to reasons like project deletion, billing account closure, etc." ], "readOnly": true, "type": "string" @@ -1273,6 +1275,11 @@ "format": "int64", "readOnly": true, "type": "string" + }, + "uid": { + "description": "Output only. System assigned unique identifier of the backup.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1310,6 +1317,11 @@ "name": { "description": "Identifier. Full resource path of the backup collection.", "type": "string" + }, + "uid": { + "description": "Output only. System assigned unique identifier of the backup collection.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1764,6 +1776,10 @@ "description": "Detailed information of each PSC connection.", "id": "ConnectionDetail", "properties": { + "pscAutoConnection": { + "$ref": "PscAutoConnection", + "description": "Detailed information of a PSC connection that is created through service connectivity automation." + }, "pscConnection": { "$ref": "PscConnection", "description": "Detailed information of a PSC connection that is created by the customer who owns the cluster." @@ -2879,7 +2895,7 @@ "properties": { "startTime": { "$ref": "TimeOfDay", - "description": "Optional. The start time of every automated backup in UTC. It must be set to the start of an hour. If not specified, the default value is the start of the hour when the automated backup config is enabled. For example, if the automated backup config is enabled at 10:13 AM UTC without specifying start_time, the default start time is 10:00 AM UTC." + "description": "Required. The start time of every automated backup in UTC. It must be set to the start of an hour. This field is required." } }, "type": "object" @@ -3964,6 +3980,73 @@ }, "type": "object" }, + "PscAutoConnection": { + "description": "Details of consumer resources in a PSC connection that is created through Service Connectivity Automation.", + "id": "PscAutoConnection", + "properties": { + "address": { + "description": "Output only. The IP allocated on the consumer network for the PSC forwarding rule.", + "readOnly": true, + "type": "string" + }, + "connectionType": { + "description": "Output only. Type of the PSC connection.", + "enum": [ + "CONNECTION_TYPE_UNSPECIFIED", + "CONNECTION_TYPE_DISCOVERY", + "CONNECTION_TYPE_PRIMARY", + "CONNECTION_TYPE_READER" + ], + "enumDescriptions": [ + "Cluster endpoint Type is not set", + "Cluster endpoint that will be used as for cluster topology discovery.", + "Cluster endpoint that will be used as primary endpoint to access primary.", + "Cluster endpoint that will be used as reader endpoint to access replicas." + ], + "readOnly": true, + "type": "string" + }, + "forwardingRule": { + "description": "Output only. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.", + "readOnly": true, + "type": "string" + }, + "network": { + "description": "Required. The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.", + "type": "string" + }, + "projectId": { + "description": "Required. The consumer project_id where the forwarding rule is created from.", + "type": "string" + }, + "pscConnectionId": { + "description": "Output only. The PSC connection id of the forwarding rule connected to the service attachment.", + "readOnly": true, + "type": "string" + }, + "pscConnectionStatus": { + "description": "Output only. The status of the PSC connection. Please note that this value is updated periodically. Please use Private Service Connect APIs for the latest status.", + "enum": [ + "PSC_CONNECTION_STATUS_UNSPECIFIED", + "PSC_CONNECTION_STATUS_ACTIVE", + "PSC_CONNECTION_STATUS_NOT_FOUND" + ], + "enumDescriptions": [ + "PSC connection status is not specified.", + "The connection is active", + "Connection not found" + ], + "readOnly": true, + "type": "string" + }, + "serviceAttachment": { + "description": "Output only. The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "PscConfig": { "id": "PscConfig", "properties": { diff --git a/redis/v1/redis-gen.go b/redis/v1/redis-gen.go index 6331a268c54..3231a9e22d4 100644 --- a/redis/v1/redis-gen.go +++ b/redis/v1/redis-gen.go @@ -283,8 +283,8 @@ type AutomatedBackupConfig struct { // frequency. FixedFrequencySchedule *FixedFrequencySchedule `json:"fixedFrequencySchedule,omitempty"` // Retention: Optional. How long to keep automated backups before the backups - // are deleted. If not specified, the default value is 100 years which is also - // the maximum value supported. The minimum value is 1 day. + // are deleted. The value should be between 1 day and 365 days. If not + // specified, the default value is 35 days. Retention string `json:"retention,omitempty"` // ForceSendFields is a list of field names (e.g. "AutomatedBackupMode") to // unconditionally include in API requests. By default, fields with empty or @@ -394,9 +394,13 @@ type Backup struct { // "CREATING" - The backup is being created. // "ACTIVE" - The backup is active to be used. // "DELETING" - The backup is being deleted. + // "SUSPENDED" - The backup is currently suspended due to reasons like + // project deletion, billing account closure, etc. State string `json:"state,omitempty"` // TotalSizeBytes: Output only. Total size of the backup in bytes. TotalSizeBytes int64 `json:"totalSizeBytes,omitempty,string"` + // Uid: Output only. System assigned unique identifier of the backup. + Uid string `json:"uid,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -454,6 +458,9 @@ type BackupCollection struct { ClusterUid string `json:"clusterUid,omitempty"` // Name: Identifier. Full resource path of the backup collection. Name string `json:"name,omitempty"` + // Uid: Output only. System assigned unique identifier of the backup + // collection. + Uid string `json:"uid,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -938,18 +945,21 @@ func (s Compliance) MarshalJSON() ([]byte, error) { // ConnectionDetail: Detailed information of each PSC connection. type ConnectionDetail struct { + // PscAutoConnection: Detailed information of a PSC connection that is created + // through service connectivity automation. + PscAutoConnection *PscAutoConnection `json:"pscAutoConnection,omitempty"` // PscConnection: Detailed information of a PSC connection that is created by // the customer who owns the cluster. PscConnection *PscConnection `json:"pscConnection,omitempty"` - // ForceSendFields is a list of field names (e.g. "PscConnection") to + // ForceSendFields is a list of field names (e.g. "PscAutoConnection") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PscConnection") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "PscAutoConnection") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1953,11 +1963,8 @@ func (s FailoverInstanceRequest) MarshalJSON() ([]byte, error) { // FixedFrequencySchedule: This schedule allows the backup to be triggered at a // fixed frequency (currently only daily is supported). type FixedFrequencySchedule struct { - // StartTime: Optional. The start time of every automated backup in UTC. It - // must be set to the start of an hour. If not specified, the default value is - // the start of the hour when the automated backup config is enabled. For - // example, if the automated backup config is enabled at 10:13 AM UTC without - // specifying start_time, the default start time is 10:00 AM UTC. + // StartTime: Required. The start time of every automated backup in UTC. It + // must be set to the start of an hour. This field is required. StartTime *TimeOfDay `json:"startTime,omitempty"` // ForceSendFields is a list of field names (e.g. "StartTime") to // unconditionally include in API requests. By default, fields with empty or @@ -3192,6 +3199,69 @@ func (s Product) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PscAutoConnection: Details of consumer resources in a PSC connection that is +// created through Service Connectivity Automation. +type PscAutoConnection struct { + // Address: Output only. The IP allocated on the consumer network for the PSC + // forwarding rule. + Address string `json:"address,omitempty"` + // ConnectionType: Output only. Type of the PSC connection. + // + // Possible values: + // "CONNECTION_TYPE_UNSPECIFIED" - Cluster endpoint Type is not set + // "CONNECTION_TYPE_DISCOVERY" - Cluster endpoint that will be used as for + // cluster topology discovery. + // "CONNECTION_TYPE_PRIMARY" - Cluster endpoint that will be used as primary + // endpoint to access primary. + // "CONNECTION_TYPE_READER" - Cluster endpoint that will be used as reader + // endpoint to access replicas. + ConnectionType string `json:"connectionType,omitempty"` + // ForwardingRule: Output only. The URI of the consumer side forwarding rule. + // Example: + // projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + ForwardingRule string `json:"forwardingRule,omitempty"` + // Network: Required. The consumer network where the IP address resides, in the + // form of projects/{project_id}/global/networks/{network_id}. + Network string `json:"network,omitempty"` + // ProjectId: Required. The consumer project_id where the forwarding rule is + // created from. + ProjectId string `json:"projectId,omitempty"` + // PscConnectionId: Output only. The PSC connection id of the forwarding rule + // connected to the service attachment. + PscConnectionId string `json:"pscConnectionId,omitempty"` + // PscConnectionStatus: Output only. The status of the PSC connection. Please + // note that this value is updated periodically. Please use Private Service + // Connect APIs for the latest status. + // + // Possible values: + // "PSC_CONNECTION_STATUS_UNSPECIFIED" - PSC connection status is not + // specified. + // "PSC_CONNECTION_STATUS_ACTIVE" - The connection is active + // "PSC_CONNECTION_STATUS_NOT_FOUND" - Connection not found + PscConnectionStatus string `json:"pscConnectionStatus,omitempty"` + // ServiceAttachment: Output only. The service attachment which is the target + // of the PSC connection, in the form of + // projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment + // -id}. + ServiceAttachment string `json:"serviceAttachment,omitempty"` + // ForceSendFields is a list of field names (e.g. "Address") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Address") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PscAutoConnection) MarshalJSON() ([]byte, error) { + type NoMethod PscAutoConnection + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type PscConfig struct { // Network: Required. The network where the IP address of the discovery // endpoint will be reserved, in the form of @@ -4852,7 +4922,12 @@ type ProjectsLocationsClustersBackupCall struct { // belongs to this collection. Both collection and backup will have a resource // name. Backup will be executed for each shard. A replica (primary if nonHA) // will be selected to perform the execution. Backup call will be rejected if -// there is an ongoing backup or update operation. +// there is an ongoing backup or update operation. Be aware that during +// preview, if the cluster's internal software version is too old, critical +// update will be performed before actual backup. Once the internal software +// version is updated to the minimum version required by the backup feature, +// subsequent backups will not require critical update. After preview, there +// will be no critical update needed for backup. // // - name: Redis cluster resource name using the form: // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` diff --git a/redis/v1beta1/redis-api.json b/redis/v1beta1/redis-api.json index 91592012e40..bfe575d3b69 100644 --- a/redis/v1beta1/redis-api.json +++ b/redis/v1beta1/redis-api.json @@ -370,7 +370,7 @@ "clusters": { "methods": { "backup": { - "description": "Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation.", + "description": "Backup Redis Cluster. If this is the first time a backup is being created, a backup collection will be created at the backend, and this backup belongs to this collection. Both collection and backup will have a resource name. Backup will be executed for each shard. A replica (primary if nonHA) will be selected to perform the execution. Backup call will be rejected if there is an ongoing backup or update operation. Be aware that during preview, if the cluster's internal software version is too old, critical update will be performed before actual backup. Once the internal software version is updated to the minimum version required by the backup feature, subsequent backups will not require critical update. After preview, there will be no critical update needed for backup.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:backup", "httpMethod": "POST", "id": "redis.projects.locations.clusters.backup", @@ -1067,7 +1067,7 @@ } } }, - "revision": "20241114", + "revision": "20241203", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -1116,7 +1116,7 @@ "description": "Optional. Trigger automated backups at a fixed frequency." }, "retention": { - "description": "Optional. How long to keep automated backups before the backups are deleted. If not specified, the default value is 100 years which is also the maximum value supported. The minimum value is 1 day.", + "description": "Optional. How long to keep automated backups before the backups are deleted. The value should be between 1 day and 365 days. If not specified, the default value is 35 days.", "format": "google-duration", "type": "string" } @@ -1257,13 +1257,15 @@ "STATE_UNSPECIFIED", "CREATING", "ACTIVE", - "DELETING" + "DELETING", + "SUSPENDED" ], "enumDescriptions": [ "The default value, not set.", "The backup is being created.", "The backup is active to be used.", - "The backup is being deleted." + "The backup is being deleted.", + "The backup is currently suspended due to reasons like project deletion, billing account closure, etc." ], "readOnly": true, "type": "string" @@ -1273,6 +1275,11 @@ "format": "int64", "readOnly": true, "type": "string" + }, + "uid": { + "description": "Output only. System assigned unique identifier of the backup.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1310,6 +1317,11 @@ "name": { "description": "Identifier. Full resource path of the backup collection.", "type": "string" + }, + "uid": { + "description": "Output only. System assigned unique identifier of the backup collection.", + "readOnly": true, + "type": "string" } }, "type": "object" @@ -1764,6 +1776,10 @@ "description": "Detailed information of each PSC connection.", "id": "ConnectionDetail", "properties": { + "pscAutoConnection": { + "$ref": "PscAutoConnection", + "description": "Detailed information of a PSC connection that is created through service connectivity automation." + }, "pscConnection": { "$ref": "PscConnection", "description": "Detailed information of a PSC connection that is created by the customer who owns the cluster." @@ -2879,7 +2895,7 @@ "properties": { "startTime": { "$ref": "TimeOfDay", - "description": "Optional. The start time of every automated backup in UTC. It must be set to the start of an hour. If not specified, the default value is the start of the hour when the automated backup config is enabled. For example, if the automated backup config is enabled at 10:13 AM UTC without specifying start_time, the default start time is 10:00 AM UTC." + "description": "Required. The start time of every automated backup in UTC. It must be set to the start of an hour. This field is required." } }, "type": "object" @@ -3971,6 +3987,73 @@ }, "type": "object" }, + "PscAutoConnection": { + "description": "Details of consumer resources in a PSC connection that is created through Service Connectivity Automation.", + "id": "PscAutoConnection", + "properties": { + "address": { + "description": "Output only. The IP allocated on the consumer network for the PSC forwarding rule.", + "readOnly": true, + "type": "string" + }, + "connectionType": { + "description": "Output only. Type of the PSC connection.", + "enum": [ + "CONNECTION_TYPE_UNSPECIFIED", + "CONNECTION_TYPE_DISCOVERY", + "CONNECTION_TYPE_PRIMARY", + "CONNECTION_TYPE_READER" + ], + "enumDescriptions": [ + "Cluster endpoint Type is not set", + "Cluster endpoint that will be used as for cluster topology discovery.", + "Cluster endpoint that will be used as primary endpoint to access primary.", + "Cluster endpoint that will be used as reader endpoint to access replicas." + ], + "readOnly": true, + "type": "string" + }, + "forwardingRule": { + "description": "Output only. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.", + "readOnly": true, + "type": "string" + }, + "network": { + "description": "Required. The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.", + "type": "string" + }, + "projectId": { + "description": "Required. The consumer project_id where the forwarding rule is created from.", + "type": "string" + }, + "pscConnectionId": { + "description": "Output only. The PSC connection id of the forwarding rule connected to the service attachment.", + "readOnly": true, + "type": "string" + }, + "pscConnectionStatus": { + "description": "Output only. The status of the PSC connection. Please note that this value is updated periodically. Please use Private Service Connect APIs for the latest status.", + "enum": [ + "PSC_CONNECTION_STATUS_UNSPECIFIED", + "PSC_CONNECTION_STATUS_ACTIVE", + "PSC_CONNECTION_STATUS_NOT_FOUND" + ], + "enumDescriptions": [ + "PSC connection status is not specified.", + "The connection is active", + "Connection not found" + ], + "readOnly": true, + "type": "string" + }, + "serviceAttachment": { + "description": "Output only. The service attachment which is the target of the PSC connection, in the form of projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment-id}.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "PscConfig": { "id": "PscConfig", "properties": { diff --git a/redis/v1beta1/redis-gen.go b/redis/v1beta1/redis-gen.go index 456514d5eb7..634b6a4a890 100644 --- a/redis/v1beta1/redis-gen.go +++ b/redis/v1beta1/redis-gen.go @@ -283,8 +283,8 @@ type AutomatedBackupConfig struct { // frequency. FixedFrequencySchedule *FixedFrequencySchedule `json:"fixedFrequencySchedule,omitempty"` // Retention: Optional. How long to keep automated backups before the backups - // are deleted. If not specified, the default value is 100 years which is also - // the maximum value supported. The minimum value is 1 day. + // are deleted. The value should be between 1 day and 365 days. If not + // specified, the default value is 35 days. Retention string `json:"retention,omitempty"` // ForceSendFields is a list of field names (e.g. "AutomatedBackupMode") to // unconditionally include in API requests. By default, fields with empty or @@ -394,9 +394,13 @@ type Backup struct { // "CREATING" - The backup is being created. // "ACTIVE" - The backup is active to be used. // "DELETING" - The backup is being deleted. + // "SUSPENDED" - The backup is currently suspended due to reasons like + // project deletion, billing account closure, etc. State string `json:"state,omitempty"` // TotalSizeBytes: Output only. Total size of the backup in bytes. TotalSizeBytes int64 `json:"totalSizeBytes,omitempty,string"` + // Uid: Output only. System assigned unique identifier of the backup. + Uid string `json:"uid,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -454,6 +458,9 @@ type BackupCollection struct { ClusterUid string `json:"clusterUid,omitempty"` // Name: Identifier. Full resource path of the backup collection. Name string `json:"name,omitempty"` + // Uid: Output only. System assigned unique identifier of the backup + // collection. + Uid string `json:"uid,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -938,18 +945,21 @@ func (s Compliance) MarshalJSON() ([]byte, error) { // ConnectionDetail: Detailed information of each PSC connection. type ConnectionDetail struct { + // PscAutoConnection: Detailed information of a PSC connection that is created + // through service connectivity automation. + PscAutoConnection *PscAutoConnection `json:"pscAutoConnection,omitempty"` // PscConnection: Detailed information of a PSC connection that is created by // the customer who owns the cluster. PscConnection *PscConnection `json:"pscConnection,omitempty"` - // ForceSendFields is a list of field names (e.g. "PscConnection") to + // ForceSendFields is a list of field names (e.g. "PscAutoConnection") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PscConnection") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "PscAutoConnection") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1953,11 +1963,8 @@ func (s FailoverInstanceRequest) MarshalJSON() ([]byte, error) { // FixedFrequencySchedule: This schedule allows the backup to be triggered at a // fixed frequency (currently only daily is supported). type FixedFrequencySchedule struct { - // StartTime: Optional. The start time of every automated backup in UTC. It - // must be set to the start of an hour. If not specified, the default value is - // the start of the hour when the automated backup config is enabled. For - // example, if the automated backup config is enabled at 10:13 AM UTC without - // specifying start_time, the default start time is 10:00 AM UTC. + // StartTime: Required. The start time of every automated backup in UTC. It + // must be set to the start of an hour. This field is required. StartTime *TimeOfDay `json:"startTime,omitempty"` // ForceSendFields is a list of field names (e.g. "StartTime") to // unconditionally include in API requests. By default, fields with empty or @@ -3196,6 +3203,69 @@ func (s Product) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// PscAutoConnection: Details of consumer resources in a PSC connection that is +// created through Service Connectivity Automation. +type PscAutoConnection struct { + // Address: Output only. The IP allocated on the consumer network for the PSC + // forwarding rule. + Address string `json:"address,omitempty"` + // ConnectionType: Output only. Type of the PSC connection. + // + // Possible values: + // "CONNECTION_TYPE_UNSPECIFIED" - Cluster endpoint Type is not set + // "CONNECTION_TYPE_DISCOVERY" - Cluster endpoint that will be used as for + // cluster topology discovery. + // "CONNECTION_TYPE_PRIMARY" - Cluster endpoint that will be used as primary + // endpoint to access primary. + // "CONNECTION_TYPE_READER" - Cluster endpoint that will be used as reader + // endpoint to access replicas. + ConnectionType string `json:"connectionType,omitempty"` + // ForwardingRule: Output only. The URI of the consumer side forwarding rule. + // Example: + // projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}. + ForwardingRule string `json:"forwardingRule,omitempty"` + // Network: Required. The consumer network where the IP address resides, in the + // form of projects/{project_id}/global/networks/{network_id}. + Network string `json:"network,omitempty"` + // ProjectId: Required. The consumer project_id where the forwarding rule is + // created from. + ProjectId string `json:"projectId,omitempty"` + // PscConnectionId: Output only. The PSC connection id of the forwarding rule + // connected to the service attachment. + PscConnectionId string `json:"pscConnectionId,omitempty"` + // PscConnectionStatus: Output only. The status of the PSC connection. Please + // note that this value is updated periodically. Please use Private Service + // Connect APIs for the latest status. + // + // Possible values: + // "PSC_CONNECTION_STATUS_UNSPECIFIED" - PSC connection status is not + // specified. + // "PSC_CONNECTION_STATUS_ACTIVE" - The connection is active + // "PSC_CONNECTION_STATUS_NOT_FOUND" - Connection not found + PscConnectionStatus string `json:"pscConnectionStatus,omitempty"` + // ServiceAttachment: Output only. The service attachment which is the target + // of the PSC connection, in the form of + // projects/{project-id}/regions/{region}/serviceAttachments/{service-attachment + // -id}. + ServiceAttachment string `json:"serviceAttachment,omitempty"` + // ForceSendFields is a list of field names (e.g. "Address") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Address") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s PscAutoConnection) MarshalJSON() ([]byte, error) { + type NoMethod PscAutoConnection + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type PscConfig struct { // Network: Required. The network where the IP address of the discovery // endpoint will be reserved, in the form of @@ -4856,7 +4926,12 @@ type ProjectsLocationsClustersBackupCall struct { // belongs to this collection. Both collection and backup will have a resource // name. Backup will be executed for each shard. A replica (primary if nonHA) // will be selected to perform the execution. Backup call will be rejected if -// there is an ongoing backup or update operation. +// there is an ongoing backup or update operation. Be aware that during +// preview, if the cluster's internal software version is too old, critical +// update will be performed before actual backup. Once the internal software +// version is updated to the minimum version required by the backup feature, +// subsequent backups will not require critical update. After preview, there +// will be no critical update needed for backup. // // - name: Redis cluster resource name using the form: // `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` diff --git a/servicemanagement/v1/servicemanagement-api.json b/servicemanagement/v1/servicemanagement-api.json index ed2f82cd0ed..283d95e17d0 100644 --- a/servicemanagement/v1/servicemanagement-api.json +++ b/servicemanagement/v1/servicemanagement-api.json @@ -830,7 +830,7 @@ } } }, - "revision": "20241106", + "revision": "20241202", "rootUrl": "https://servicemanagement.googleapis.com/", "schemas": { "Advice": { @@ -1568,6 +1568,10 @@ "description": "`Documentation` provides the information for describing a service. Example: documentation: summary: \u003e The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: \u003e ... - selector: google.calendar.Calendar.Put description: \u003e ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", "id": "Documentation", "properties": { + "additionalIamInfo": { + "description": "Optional information about the IAM configuration. This is typically used to link to documentation about a product's IAM roles and permissions.", + "type": "string" + }, "documentationRootUrl": { "description": "The URL to the root of documentation.", "type": "string" @@ -2039,6 +2043,13 @@ "common": { "$ref": "CommonLanguageSettings", "description": "Some settings." + }, + "renamedServices": { + "additionalProperties": { + "type": "string" + }, + "description": "Map of service names to renamed services. Keys are the package relative service names and values are the name to be used for the service client and call options. publishing: go_settings: renamed_services: Publisher: TopicAdmin", + "type": "object" } }, "type": "object" diff --git a/servicemanagement/v1/servicemanagement-gen.go b/servicemanagement/v1/servicemanagement-gen.go index 01afaef1962..760bb9a05f8 100644 --- a/servicemanagement/v1/servicemanagement-gen.go +++ b/servicemanagement/v1/servicemanagement-gen.go @@ -1409,6 +1409,10 @@ func (s Diagnostic) MarshalJSON() ([]byte, error) { // directive `suppress_warning` does not directly affect documentation and is // documented together with service config validation. type Documentation struct { + // AdditionalIamInfo: Optional information about the IAM configuration. This is + // typically used to link to documentation about a product's IAM roles and + // permissions. + AdditionalIamInfo string `json:"additionalIamInfo,omitempty"` // DocumentationRootUrl: The URL to the root of documentation. DocumentationRootUrl string `json:"documentationRootUrl,omitempty"` // Overview: Declares a single overview page. For example: documentation: @@ -1435,15 +1439,15 @@ type Documentation struct { // plain text. It becomes the overview of the service displayed in Google Cloud // Console. NOTE: This field is equivalent to the standard field `description`. Summary string `json:"summary,omitempty"` - // ForceSendFields is a list of field names (e.g. "DocumentationRootUrl") to + // ForceSendFields is a list of field names (e.g. "AdditionalIamInfo") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DocumentationRootUrl") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See + // NullFields is a list of field names (e.g. "AdditionalIamInfo") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -1998,6 +2002,11 @@ func (s GetPolicyOptions) MarshalJSON() ([]byte, error) { type GoSettings struct { // Common: Some settings. Common *CommonLanguageSettings `json:"common,omitempty"` + // RenamedServices: Map of service names to renamed services. Keys are the + // package relative service names and values are the name to be used for the + // service client and call options. publishing: go_settings: renamed_services: + // Publisher: TopicAdmin + RenamedServices map[string]string `json:"renamedServices,omitempty"` // ForceSendFields is a list of field names (e.g. "Common") to unconditionally // include in API requests. By default, fields with empty or default values are // omitted from API requests. See diff --git a/workstations/v1/workstations-api.json b/workstations/v1/workstations-api.json index a07b1ea9f33..17375eca087 100644 --- a/workstations/v1/workstations-api.json +++ b/workstations/v1/workstations-api.json @@ -180,7 +180,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "workstations.projects.locations.operations.cancel", @@ -873,7 +873,7 @@ ] }, "generateAccessToken": { - "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", + "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. Once generated this token cannot be revoked and is good for the lifetime of the token.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", "httpMethod": "POST", "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", @@ -1195,7 +1195,7 @@ } } }, - "revision": "20241009", + "revision": "20241202", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1285,7 +1285,7 @@ "type": "object" }, "BoostConfig": { - "description": "A configuration that workstations can boost to.", + "description": "A boost configuration is a set of resources that a workstation can use to increase its performance. If a boost configuration is specified, when starting a workstation, users can choose to use a VM provisioned under the boost config by passing the boost config id in the start request. If no boost config id is provided in the start request, the system will choose a VM from the pool provisioned under the default config.", "id": "BoostConfig", "properties": { "accelerators": { @@ -1305,7 +1305,7 @@ "type": "boolean" }, "id": { - "description": "Optional. Required. The id to be used for the boost configuration.", + "description": "Required. The id to be used for the boost configuration.", "type": "string" }, "machineType": { @@ -1454,7 +1454,7 @@ "type": "array" }, "boostConfigs": { - "description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use.", + "description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use. If specified, users will have the option to choose from the list of boost configs when starting a workstation.", "items": { "$ref": "BoostConfig" }, diff --git a/workstations/v1/workstations-gen.go b/workstations/v1/workstations-gen.go index 8a5c6bcbf60..085e85ce64e 100644 --- a/workstations/v1/workstations-gen.go +++ b/workstations/v1/workstations-gen.go @@ -423,7 +423,12 @@ func (s Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// BoostConfig: A configuration that workstations can boost to. +// BoostConfig: A boost configuration is a set of resources that a workstation +// can use to increase its performance. If a boost configuration is specified, +// when starting a workstation, users can choose to use a VM provisioned under +// the boost config by passing the boost config id in the start request. If no +// boost config id is provided in the start request, the system will choose a +// VM from the pool provisioned under the default config. type BoostConfig struct { // Accelerators: Optional. A list of the type and count of accelerator cards // attached to the boost instance. Defaults to `none`. @@ -451,7 +456,7 @@ type BoostConfig struct { // nested virtualization can only be enabled on boost configurations that // specify a machine_type in the N1 or N2 machine series. EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` - // Id: Optional. Required. The id to be used for the boost configuration. + // Id: Required. The id to be used for the boost configuration. Id string `json:"id,omitempty"` // MachineType: Optional. The type of machine that boosted VM instances will // use—for example, `e2-standard-4`. For more information about machine types @@ -692,7 +697,9 @@ type GceInstance struct { // attached to the instance. Accelerators []*Accelerator `json:"accelerators,omitempty"` // BoostConfigs: Optional. A list of the boost configurations that workstations - // created using this workstation configuration are allowed to use. + // created using this workstation configuration are allowed to use. If + // specified, users will have the option to choose from the list of boost + // configs when starting a workstation. BoostConfigs []*BoostConfig `json:"boostConfigs,omitempty"` // BootDiskSizeGb: Optional. The size of the boot disk for the VM in gigabytes // (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB. @@ -2306,7 +2313,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -4693,7 +4700,8 @@ type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateA } // GenerateAccessToken: Returns a short-lived credential that can be used to -// send authenticated and authorized traffic to a workstation. +// send authenticated and authorized traffic to a workstation. Once generated +// this token cannot be revoked and is good for the lifetime of the token. // // - workstation: Name of the workstation for which the access token should be // generated. diff --git a/workstations/v1beta/workstations-api.json b/workstations/v1beta/workstations-api.json index 1bc6bee9061..f705471818a 100644 --- a/workstations/v1beta/workstations-api.json +++ b/workstations/v1beta/workstations-api.json @@ -112,7 +112,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "workstations.projects.locations.operations.cancel", @@ -805,7 +805,7 @@ ] }, "generateAccessToken": { - "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", + "description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation. Once generated this token cannot be revoked and is good for the lifetime of the token.", "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", "httpMethod": "POST", "id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", @@ -1127,7 +1127,7 @@ } } }, - "revision": "20241009", + "revision": "20241202", "rootUrl": "https://workstations.googleapis.com/", "schemas": { "Accelerator": { @@ -1217,7 +1217,7 @@ "type": "object" }, "BoostConfig": { - "description": "A configuration that workstations can boost to.", + "description": "A boost configuration is a set of resources that a workstation can use to increase its performance. If a boost configuration is specified, when starting a workstation, users can choose to use a VM provisioned under the boost config by passing the boost config id in the start request. If no boost config id is provided in the start request, the system will choose a VM from the pool provisioned under the default config.", "id": "BoostConfig", "properties": { "accelerators": { @@ -1237,7 +1237,7 @@ "type": "boolean" }, "id": { - "description": "Optional. Required. The id to be used for the boost configuration.", + "description": "Required. The id to be used for the boost configuration.", "type": "string" }, "machineType": { @@ -1386,7 +1386,7 @@ "type": "array" }, "boostConfigs": { - "description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use.", + "description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use. If specified, users will have the option to choose from the list of boost configs when starting a workstation.", "items": { "$ref": "BoostConfig" }, diff --git a/workstations/v1beta/workstations-gen.go b/workstations/v1beta/workstations-gen.go index 09d4df563d4..617ff1df01e 100644 --- a/workstations/v1beta/workstations-gen.go +++ b/workstations/v1beta/workstations-gen.go @@ -423,7 +423,12 @@ func (s Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// BoostConfig: A configuration that workstations can boost to. +// BoostConfig: A boost configuration is a set of resources that a workstation +// can use to increase its performance. If a boost configuration is specified, +// when starting a workstation, users can choose to use a VM provisioned under +// the boost config by passing the boost config id in the start request. If no +// boost config id is provided in the start request, the system will choose a +// VM from the pool provisioned under the default config. type BoostConfig struct { // Accelerators: Optional. A list of the type and count of accelerator cards // attached to the boost instance. Defaults to `none`. @@ -451,7 +456,7 @@ type BoostConfig struct { // nested virtualization can only be enabled on boost configurations that // specify a machine_type in the N1 or N2 machine series. EnableNestedVirtualization bool `json:"enableNestedVirtualization,omitempty"` - // Id: Optional. Required. The id to be used for the boost configuration. + // Id: Required. The id to be used for the boost configuration. Id string `json:"id,omitempty"` // MachineType: Optional. The type of machine that boosted VM instances will // use—for example, `e2-standard-4`. For more information about machine types @@ -692,7 +697,9 @@ type GceInstance struct { // attached to the instance. Accelerators []*Accelerator `json:"accelerators,omitempty"` // BoostConfigs: Optional. A list of the boost configurations that workstations - // created using this workstation configuration are allowed to use. + // created using this workstation configuration are allowed to use. If + // specified, users will have the option to choose from the list of boost + // configs when starting a workstation. BoostConfigs []*BoostConfig `json:"boostConfigs,omitempty"` // BootDiskSizeGb: Optional. The size of the boot disk for the VM in gigabytes // (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB. @@ -2058,7 +2065,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -4445,7 +4452,8 @@ type ProjectsLocationsWorkstationClustersWorkstationConfigsWorkstationsGenerateA } // GenerateAccessToken: Returns a short-lived credential that can be used to -// send authenticated and authorized traffic to a workstation. +// send authenticated and authorized traffic to a workstation. Once generated +// this token cannot be revoked and is good for the lifetime of the token. // // - workstation: Name of the workstation for which the access token should be // generated. From f37ece71d34f784c1b8bd65ec8c17cee4f306deb Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 9 Dec 2024 00:30:21 -0800 Subject: [PATCH 06/11] feat(all): auto-regenerate discovery clients (#2905) --- appengine/v1/appengine-api.json | 49 +- appengine/v1/appengine-gen.go | 108 ++ appengine/v1beta/appengine-api.json | 49 +- appengine/v1beta/appengine-gen.go | 108 ++ compute/v0.beta/compute-api.json | 999 ++++++++++++++++-- compute/v0.beta/compute-gen.go | 898 +++++++++++++--- compute/v0.beta/compute2-gen.go | 131 ++- compute/v0.beta/compute3-gen.go | 125 +++ eventarc/v1/eventarc-api.json | 6 +- eventarc/v1/eventarc-gen.go | 20 +- netapp/v1/netapp-api.json | 328 +----- netapp/v1/netapp-gen.go | 823 +++------------ netapp/v1beta1/netapp-api.json | 328 +----- netapp/v1beta1/netapp-gen.go | 823 +++------------ securitycenter/v1/securitycenter-api.json | 446 +++++++- securitycenter/v1/securitycenter-gen.go | 640 ++++++++++- .../v1beta1/securitycenter-api.json | 401 ++++++- securitycenter/v1beta1/securitycenter-gen.go | 467 +++++++- .../v1beta2/securitycenter-api.json | 399 ++++++- securitycenter/v1beta2/securitycenter-gen.go | 465 ++++++++ 20 files changed, 5447 insertions(+), 2166 deletions(-) diff --git a/appengine/v1/appengine-api.json b/appengine/v1/appengine-api.json index ab0e8f30057..848d9223ea3 100644 --- a/appengine/v1/appengine-api.json +++ b/appengine/v1/appengine-api.json @@ -1712,6 +1712,53 @@ } }, "services": { + "methods": { + "delete": { + "description": "Deletes the specified service and all enclosed versions.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + "httpMethod": "DELETE", + "id": "appengine.projects.locations.applications.services.delete", + "parameterOrder": [ + "projectsId", + "locationsId", + "applicationsId", + "servicesId" + ], + "parameters": { + "applicationsId": { + "description": "Part of `name`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + }, + "locationsId": { + "description": "Part of `name`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + }, + "projectsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "location": "path", + "required": true, + "type": "string" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "versions": { "methods": { @@ -1778,7 +1825,7 @@ } } }, - "revision": "20241118", + "revision": "20241205", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { diff --git a/appengine/v1/appengine-gen.go b/appengine/v1/appengine-gen.go index aef05d5d726..f9a3199de57 100644 --- a/appengine/v1/appengine-gen.go +++ b/appengine/v1/appengine-gen.go @@ -8566,6 +8566,114 @@ func (c *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Pages(ctx conte } } +type ProjectsLocationsApplicationsServicesDeleteCall struct { + s *APIService + projectsId string + locationsId string + applicationsId string + servicesId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified service and all enclosed versions. +// +// - applicationsId: Part of `name`. See documentation of `projectsId`. +// - locationsId: Part of `name`. See documentation of `projectsId`. +// - projectsId: Part of `name`. Name of the resource requested. Example: +// apps/myapp/services/default. +// - servicesId: Part of `name`. See documentation of `projectsId`. +func (r *ProjectsLocationsApplicationsServicesService) Delete(projectsId string, locationsId string, applicationsId string, servicesId string) *ProjectsLocationsApplicationsServicesDeleteCall { + c := &ProjectsLocationsApplicationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectsId = projectsId + c.locationsId = locationsId + c.applicationsId = applicationsId + c.servicesId = servicesId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}") + 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{ + "projectsId": c.projectsId, + "locationsId": c.locationsId, + "applicationsId": c.applicationsId, + "servicesId": c.servicesId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.projects.locations.applications.services.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsApplicationsServicesVersionsDeleteCall struct { s *APIService projectsId string diff --git a/appengine/v1beta/appengine-api.json b/appengine/v1beta/appengine-api.json index c0a75bb1a62..d5a7ad1ea61 100644 --- a/appengine/v1beta/appengine-api.json +++ b/appengine/v1beta/appengine-api.json @@ -1819,6 +1819,53 @@ } }, "services": { + "methods": { + "delete": { + "description": "Deletes the specified service and all enclosed versions.", + "flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + "httpMethod": "DELETE", + "id": "appengine.projects.locations.applications.services.delete", + "parameterOrder": [ + "projectsId", + "locationsId", + "applicationsId", + "servicesId" + ], + "parameters": { + "applicationsId": { + "description": "Part of `name`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + }, + "locationsId": { + "description": "Part of `name`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + }, + "projectsId": { + "description": "Part of `name`. Name of the resource requested. Example: apps/myapp/services/default.", + "location": "path", + "required": true, + "type": "string" + }, + "servicesId": { + "description": "Part of `name`. See documentation of `projectsId`.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v1beta/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, "resources": { "versions": { "methods": { @@ -1978,7 +2025,7 @@ } } }, - "revision": "20241118", + "revision": "20241205", "rootUrl": "https://appengine.googleapis.com/", "schemas": { "ApiConfigHandler": { diff --git a/appengine/v1beta/appengine-gen.go b/appengine/v1beta/appengine-gen.go index b3efb0fb759..9293e77a5fb 100644 --- a/appengine/v1beta/appengine-gen.go +++ b/appengine/v1beta/appengine-gen.go @@ -8957,6 +8957,114 @@ func (c *ProjectsLocationsApplicationsAuthorizedDomainsListCall) Pages(ctx conte } } +type ProjectsLocationsApplicationsServicesDeleteCall struct { + s *APIService + projectsId string + locationsId string + applicationsId string + servicesId string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified service and all enclosed versions. +// +// - applicationsId: Part of `name`. See documentation of `projectsId`. +// - locationsId: Part of `name`. See documentation of `projectsId`. +// - projectsId: Part of `name`. Name of the resource requested. Example: +// apps/myapp/services/default. +// - servicesId: Part of `name`. See documentation of `projectsId`. +func (r *ProjectsLocationsApplicationsServicesService) Delete(projectsId string, locationsId string, applicationsId string, servicesId string) *ProjectsLocationsApplicationsServicesDeleteCall { + c := &ProjectsLocationsApplicationsServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.projectsId = projectsId + c.locationsId = locationsId + c.applicationsId = applicationsId + c.servicesId = servicesId + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsApplicationsServicesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Context(ctx context.Context) *ProjectsLocationsApplicationsServicesDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsApplicationsServicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta/projects/{projectsId}/locations/{locationsId}/applications/{applicationsId}/services/{servicesId}") + 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{ + "projectsId": c.projectsId, + "locationsId": c.locationsId, + "applicationsId": c.applicationsId, + "servicesId": c.servicesId, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "appengine.projects.locations.applications.services.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsApplicationsServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsApplicationsServicesVersionsDeleteCall struct { s *APIService projectsId string diff --git a/compute/v0.beta/compute-api.json b/compute/v0.beta/compute-api.json index 804d7580f52..4100e34f719 100644 --- a/compute/v0.beta/compute-api.json +++ b/compute/v0.beta/compute-api.json @@ -1839,6 +1839,41 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getEffectiveSecurityPolicies": { + "description": "Returns effective security policies applied to this backend service.", + "flatPath": "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies", + "httpMethod": "GET", + "id": "compute.backendServices.getEffectiveSecurityPolicies", + "parameterOrder": [ + "project", + "backendService" + ], + "parameters": { + "backendService": { + "description": "Name of the Backend Service for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies", + "response": { + "$ref": "BackendServicesGetEffectiveSecurityPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "getHealth": { "description": "Gets the most recent health check results for this BackendService. Example request body: { \"group\": \"/zones/us-east1-b/instanceGroups/lb-backend-example\" }", "flatPath": "projects/{project}/global/backendServices/{backendService}/getHealth", @@ -11362,6 +11397,11 @@ "required": true, "type": "string" }, + "noGracefulShutdown": { + "description": "If set to true, Graceful Shutdown is skipped.", + "location": "query", + "type": "boolean" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -11842,7 +11882,7 @@ "type": "string" }, "start": { - "description": "Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console.", + "description": "Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console. Note that the negative start is bounded by the retained buffer size, and the returned serial console output will not exceed the max buffer size.", "format": "int64", "location": "query", "type": "string" @@ -13366,6 +13406,11 @@ "required": true, "type": "string" }, + "noGracefulShutdown": { + "description": "If set to true, Graceful Shutdown is skipped.", + "location": "query", + "type": "boolean" + }, "project": { "description": "Project ID for this request.", "location": "path", @@ -30083,6 +30128,56 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "setLabels": { + "description": "Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels", + "httpMethod": "POST", + "id": "compute.regionSecurityPolicies.setLabels", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels", + "request": { + "$ref": "RegionSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -42695,7 +42790,7 @@ } } }, - "revision": "20241112", + "revision": "20241201", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -42846,6 +42941,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -42882,6 +42978,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -42906,6 +43003,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -42998,6 +43096,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -43034,6 +43133,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -43058,6 +43158,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -43132,6 +43233,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -43168,6 +43270,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -43192,6 +43295,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -43533,6 +43637,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -43569,6 +43674,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -43593,6 +43699,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -43685,6 +43792,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -43721,6 +43829,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -43745,6 +43854,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -43819,6 +43929,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -43855,6 +43966,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -43879,6 +43991,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -44695,6 +44808,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -44731,6 +44845,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -44755,6 +44870,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -44847,6 +44963,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -44883,6 +45000,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -44907,6 +45025,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -45039,6 +45158,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -45075,6 +45195,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -45099,6 +45220,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -45542,7 +45664,7 @@ "description": "The CacheKeyPolicy for this CdnPolicy." }, "cacheMode": { - "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached.", + "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. If no value is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC.", "enum": [ "CACHE_ALL_STATIC", "FORCE_CACHE_ALL", @@ -45711,6 +45833,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -45747,6 +45870,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -45771,6 +45895,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -46081,6 +46206,7 @@ "description": "The protocol this BackendService uses to communicate with backends. Possible values are HTTP, HTTPS, HTTP2, TCP, SSL, UDP or GRPC. depending on the chosen load balancer or Traffic Director configuration. Refer to the documentation for the load balancers or for Traffic Director for more information. Must be set to GRPC when the backend service is referenced by a URL map that is bound to target gRPC proxy.", "enum": [ "GRPC", + "H2C", "HTTP", "HTTP2", "HTTPS", @@ -46091,6 +46217,7 @@ ], "enumDescriptions": [ "gRPC (available for Traffic Director).", + "HTTP2 over cleartext", "", "HTTP/2 with SSL.", "", @@ -46239,6 +46366,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -46275,6 +46403,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -46299,6 +46428,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -46352,7 +46482,7 @@ "description": "The CacheKeyPolicy for this CdnPolicy." }, "cacheMode": { - "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached.", + "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. If no value is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC.", "enum": [ "CACHE_ALL_STATIC", "FORCE_CACHE_ALL", @@ -46646,6 +46776,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -46682,6 +46813,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -46706,6 +46838,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -46798,6 +46931,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -46834,6 +46968,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -46858,6 +46993,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -47012,6 +47148,19 @@ }, "type": "object" }, + "BackendServicesGetEffectiveSecurityPoliciesResponse": { + "id": "BackendServicesGetEffectiveSecurityPoliciesResponse", + "properties": { + "securityPolicies": { + "description": "Effective security policies for the backend service.", + "items": { + "$ref": "SecurityPolicy" + }, + "type": "array" + } + }, + "type": "object" + }, "BackendServicesScopedList": { "id": "BackendServicesScopedList", "properties": { @@ -47049,6 +47198,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -47085,6 +47235,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -47109,6 +47260,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -47878,6 +48030,9 @@ "GRAPHICS_OPTIMIZED", "MEMORY_OPTIMIZED", "MEMORY_OPTIMIZED_M3", + "MEMORY_OPTIMIZED_X4_16TB", + "MEMORY_OPTIMIZED_X4_24TB", + "MEMORY_OPTIMIZED_X4_32TB", "STORAGE_OPTIMIZED_Z3", "TYPE_UNSPECIFIED" ], @@ -47902,6 +48057,9 @@ "", "", "", + "", + "", + "", "" ], "type": "string" @@ -47971,6 +48129,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -48007,6 +48166,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -48031,6 +48191,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -48123,6 +48284,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -48159,6 +48321,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -48183,6 +48346,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -48268,6 +48432,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -48304,6 +48469,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -48328,6 +48494,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49012,6 +49179,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -49048,6 +49216,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -49072,6 +49241,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49236,6 +49406,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -49272,6 +49443,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -49296,6 +49468,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49519,6 +49692,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -49555,6 +49729,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -49579,6 +49754,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49671,6 +49847,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -49707,6 +49884,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -49731,6 +49909,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49805,6 +49984,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -49841,6 +50021,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -49865,6 +50046,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49976,6 +50158,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -50012,6 +50195,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -50036,6 +50220,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -50280,6 +50465,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -50316,6 +50502,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -50340,6 +50527,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -50550,6 +50738,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -50586,6 +50775,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -50610,6 +50800,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -50883,6 +51074,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -50919,6 +51111,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -50943,6 +51136,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -51185,6 +51379,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -51221,6 +51416,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -51245,6 +51441,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -51890,6 +52087,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -51926,6 +52124,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -51950,6 +52149,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -52042,6 +52242,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -52078,6 +52279,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -52102,6 +52304,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -52204,6 +52407,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -52240,6 +52444,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -52264,6 +52469,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -52338,29 +52544,11 @@ "description": "An optional description of this resource. Provide this property when you create the future reservation.", "type": "string" }, - "enableOpportunisticMaintenance": { - "description": "Indicates if this group of VMs have opportunistic maintenance enabled. This will be set on the FR by customers, and will be used for reservation and reservation block maintenance .", - "type": "boolean" - }, "id": { "description": "[Output Only] A unique identifier for this future reservation. The server defines this identifier.", "format": "uint64", "type": "string" }, - "instanceTerminationAction": { - "description": "Action to take during reservation termination.", - "enum": [ - "DELETE", - "INSTANCE_TERMINATION_ACTION_UNSPECIFIED", - "STOP" - ], - "enumDescriptions": [ - "Delete the VM.", - "Default value. This value is unused.", - "Stop the VM without storing in-memory content. default action." - ], - "type": "string" - }, "kind": { "default": "compute#futureReservation", "description": "[Output Only] Type of the resource. Always compute#futureReservation for future reservations.", @@ -52738,6 +52926,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -52774,6 +52963,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -52798,6 +52988,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -52899,6 +53090,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -52935,6 +53127,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -52959,6 +53152,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -53033,6 +53227,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -53069,6 +53264,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -53093,6 +53289,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -53269,10 +53466,6 @@ "description": "Maintenance Info for ReservationBlocks.", "id": "GroupMaintenanceInfo", "properties": { - "enableOpportunisticMaintenance": { - "description": "This setting enables or disables opportunistic maintenance. If enabled, maintenance is performed on unused reservations whenever possible.", - "type": "boolean" - }, "maintenanceOngoingCount": { "description": "Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have ongoing maintenance.", "format": "int32", @@ -53732,6 +53925,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -53768,6 +53962,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -53792,6 +53987,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -54003,6 +54199,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -54039,6 +54236,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -54063,6 +54261,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -54162,6 +54361,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -54198,6 +54398,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -54222,6 +54423,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -54296,6 +54498,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -54332,6 +54535,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -54356,6 +54560,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -54859,6 +55064,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -54895,6 +55101,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -54919,6 +55126,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -55132,15 +55340,15 @@ }, "routeAction": { "$ref": "HttpRouteAction", - "description": "In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction." + "description": "In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction." }, "service": { - "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set.", + "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.", "type": "string" }, "urlRedirect": { "$ref": "HttpRedirectAction", - "description": "When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." } }, "type": "object" @@ -55315,6 +55523,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -55351,6 +55560,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -55375,6 +55585,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -55714,6 +55925,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -55750,6 +55962,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -55774,6 +55987,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -56096,6 +56310,7 @@ "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, SUSPENDING, SUSPENDED, REPAIRING, and TERMINATED. For more information about the status of the instance, see Instance life cycle.", "enum": [ "DEPROVISIONING", + "PENDING_STOP", "PROVISIONING", "REPAIRING", "RUNNING", @@ -56108,6 +56323,7 @@ ], "enumDescriptions": [ "The instance is halted and we are performing tear down tasks like network deprogramming, releasing quota, IP, tearing down disks etc.", + "The instance is gracefully shutting down.", "Resources are being allocated for the instance.", "The instance is in repair.", "The instance is running.", @@ -56197,6 +56413,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -56233,6 +56450,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -56257,6 +56475,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -56468,6 +56687,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -56504,6 +56724,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -56528,6 +56749,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -56620,6 +56842,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -56656,6 +56879,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -56680,6 +56904,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -57048,6 +57273,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -57084,6 +57310,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -57108,6 +57335,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -57308,6 +57536,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -57344,6 +57573,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -57368,6 +57598,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -57687,6 +57918,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -57723,6 +57955,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -57747,6 +57980,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58184,6 +58418,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -58220,6 +58455,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -58244,6 +58480,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58373,6 +58610,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -58409,6 +58647,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -58433,6 +58672,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58638,6 +58878,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -58674,6 +58915,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -58698,6 +58940,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58803,6 +59046,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -58839,6 +59083,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -58863,6 +59108,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58973,6 +59219,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -59009,6 +59256,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -59033,6 +59281,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -59125,6 +59374,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -59161,6 +59411,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -59185,6 +59436,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -59680,6 +59932,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -59716,6 +59969,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -59740,6 +59994,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -59832,6 +60087,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -59868,6 +60124,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -59892,6 +60149,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -59966,6 +60224,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -60002,6 +60261,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -60026,6 +60286,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -60081,6 +60342,7 @@ "description": "[Output Only] The status of the instance.", "enum": [ "DEPROVISIONING", + "PENDING_STOP", "PROVISIONING", "REPAIRING", "RUNNING", @@ -60093,6 +60355,7 @@ ], "enumDescriptions": [ "The instance is halted and we are performing tear down tasks like network deprogramming, releasing quota, IP, tearing down disks etc.", + "The instance is gracefully shutting down.", "Resources are being allocated for the instance.", "The instance is in repair.", "The instance is running.", @@ -60173,6 +60436,13 @@ "description": "[Output Only] The name of the firewall policy.", "type": "string" }, + "packetMirroringRules": { + "description": "[Output Only] The packet mirroring rules that apply to the instance.", + "items": { + "$ref": "FirewallPolicyRule" + }, + "type": "array" + }, "priority": { "description": "[Output only] Priority of firewall policy association. Not applicable for type=HIERARCHY.", "format": "int32", @@ -60298,6 +60568,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -60334,6 +60605,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -60358,6 +60630,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -60684,6 +60957,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -60720,6 +60994,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -60744,6 +61019,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -60836,6 +61112,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -60872,6 +61149,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -60896,6 +61174,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -60981,6 +61260,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -61017,6 +61297,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -61041,6 +61322,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -61721,6 +62003,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -61757,6 +62040,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -61781,6 +62065,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -61914,6 +62199,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -61950,6 +62236,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -61974,6 +62261,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -62079,6 +62367,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62115,6 +62404,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62139,6 +62429,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -62432,6 +62723,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62468,6 +62760,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62492,6 +62785,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -62542,7 +62836,7 @@ "type": "string" }, "availableFeatures": { - "description": "[Output only] List of features available at this InterconnectLocation, which can take one of the following values: - MACSEC ", + "description": "[Output only] List of features available at this InterconnectLocation, which can take one of the following values: - IF_MACSEC ", "items": { "enum": [ "IF_MACSEC" @@ -62720,6 +63014,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62756,6 +63051,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62780,6 +63076,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -63224,6 +63521,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -63260,6 +63558,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -63284,6 +63583,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -63397,7 +63697,8 @@ "type": "string" }, "resourceRequirements": { - "$ref": "LicenseResourceRequirements" + "$ref": "LicenseResourceRequirements", + "description": "[Input Only] Deprecated." }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", @@ -63516,12 +63817,12 @@ "id": "LicenseResourceRequirements", "properties": { "minGuestCpuCount": { - "description": "Minimum number of guest cpus required to use the Instance. Enforced at Instance creation and Instance start.", + "description": "[Input Only] Deprecated. This field no longer reflects the minimum number of guest cpus required to use the Instance.", "format": "int32", "type": "integer" }, "minMemoryMb": { - "description": "Minimum memory required to use the Instance. Enforced at Instance creation and Instance start.", + "description": "[Input Only] Deprecated. This field no longer reflects the minimum memory required to use the Instance.", "format": "int32", "type": "integer" } @@ -63577,6 +63878,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -63613,6 +63915,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -63637,6 +63940,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -63940,6 +64244,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -63976,6 +64281,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -64000,6 +64306,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -64201,6 +64508,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -64237,6 +64545,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -64261,6 +64570,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -64353,6 +64663,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -64389,6 +64700,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -64413,6 +64725,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -64487,6 +64800,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -64523,6 +64837,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -64547,6 +64862,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -64646,6 +64962,7 @@ "description": "[Output Only] The status of the instance. This field is empty when the instance does not exist.", "enum": [ "DEPROVISIONING", + "PENDING_STOP", "PROVISIONING", "REPAIRING", "RUNNING", @@ -64658,6 +64975,7 @@ ], "enumDescriptions": [ "The instance is halted and we are performing tear down tasks like network deprogramming, releasing quota, IP, tearing down disks etc.", + "The instance is gracefully shutting down.", "Resources are being allocated for the instance.", "The instance is in repair.", "The instance is running.", @@ -64817,10 +65135,12 @@ "provisioningModel": { "description": "The provisioning model to be used for this instance.", "enum": [ + "RESERVATION_BOUND", "SPOT", "STANDARD" ], "enumDescriptions": [ + "Bound to the lifecycle of the reservation in which it is provisioned.", "Heavily discounted, no guaranteed runtime.", "Standard provisioning with user controlled runtime, no discounts." ], @@ -64977,9 +65297,11 @@ "type": "object" }, "MultiMigResourcePolicies": { + "description": "Resource policies message for a multi-MIG. Specifies the workload policy configuration of the multi-MIG.", "id": "MultiMigResourcePolicies", "properties": { "workloadPolicy": { + "description": "The URL of the workload policy for this multi-MIG. It can be a full or partial URL. For example, the following are all valid URLs to a workload policy: - https://www.googleapis.com/compute/v1/projects/project/regions/region /resourcePolicies/resourcePolicy - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy ", "type": "string" } }, @@ -65049,6 +65371,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65085,6 +65408,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65109,6 +65433,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -65305,7 +65630,7 @@ "type": "string" }, "networkProfile": { - "description": "A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: - https://www.googleapis.com/compute/alpha/projects/{project_id}/global/networkProfiles/{network_profile_name} - projects/{project_id}/global/networkProfiles/{network_profile_name} ", + "description": "A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: - https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} - projects/{project_id}/global/networkProfiles/{network_profile_name} ", "type": "string" }, "peerings": { @@ -65489,6 +65814,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65525,6 +65851,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65549,6 +65876,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -65693,6 +66021,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65729,6 +66058,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65753,6 +66083,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -65827,6 +66158,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65863,6 +66195,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65887,6 +66220,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66040,6 +66374,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66076,6 +66411,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66100,6 +66436,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66174,6 +66511,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66210,6 +66548,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66234,6 +66573,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66491,6 +66831,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66527,6 +66868,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66551,6 +66893,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66723,6 +67066,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66759,6 +67103,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66783,6 +67128,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66994,6 +67340,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -67030,6 +67377,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -67054,6 +67402,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -67128,6 +67477,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -67164,6 +67514,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -67188,6 +67539,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -67415,6 +67767,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -67451,6 +67804,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -67475,6 +67829,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -67627,6 +67982,10 @@ "description": "[Output Only] Type of the resource. Always compute#networkProfile for network profiles.", "type": "string" }, + "location": { + "$ref": "NetworkProfileLocation", + "description": "[Output Only] Location to which the network is restricted." + }, "name": { "description": "[Output Only] Name of the resource.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -67647,6 +68006,26 @@ }, "type": "object" }, + "NetworkProfileLocation": { + "id": "NetworkProfileLocation", + "properties": { + "name": { + "type": "string" + }, + "scope": { + "enum": [ + "REGION", + "ZONE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "NetworkProfileNetworkFeatures": { "id": "NetworkProfileNetworkFeatures", "properties": { @@ -68016,6 +68395,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -68052,6 +68432,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -68076,6 +68457,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -68145,6 +68527,22 @@ ], "type": "string" }, + "effectiveBgpAlwaysCompareMed": { + "description": "[Output Only] Effective value of the bgp_always_compare_med field.", + "type": "boolean" + }, + "effectiveBgpInterRegionCost": { + "description": "[Output Only] Effective value of the bgp_inter_region_cost field.", + "enum": [ + "ADD_COST_TO_MED", + "DEFAULT" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "routingMode": { "description": "The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.", "enum": [ @@ -68226,6 +68624,13 @@ "description": "[Output Only] The name of the firewall policy.", "type": "string" }, + "packetMirroringRules": { + "description": "[Output Only] The packet mirroring rules that apply to the network.", + "items": { + "$ref": "FirewallPolicyRule" + }, + "type": "array" + }, "priority": { "description": "[Output only] Priority of firewall policy association. Not applicable for type=HIERARCHY.", "format": "int32", @@ -68471,6 +68876,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -68507,6 +68913,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -68531,6 +68938,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -68655,6 +69063,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -68691,6 +69100,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -68715,6 +69125,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -68942,6 +69353,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -68978,6 +69390,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -69002,6 +69415,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -69093,6 +69507,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -69129,6 +69544,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -69153,6 +69569,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -69377,6 +69794,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -69413,6 +69831,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -69437,6 +69856,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -69529,6 +69949,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -69565,6 +69986,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -69589,6 +70011,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -69678,6 +70101,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -69714,6 +70138,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -69738,6 +70163,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -69898,6 +70324,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -69934,6 +70361,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -69958,6 +70386,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -70050,6 +70479,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -70086,6 +70516,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -70110,6 +70541,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -70184,6 +70616,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -70220,6 +70653,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -70244,6 +70678,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -70405,6 +70840,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -70441,6 +70877,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -70465,6 +70902,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -70688,6 +71126,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -70724,6 +71163,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -70748,6 +71188,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -70853,6 +71294,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -70889,6 +71331,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -70913,6 +71356,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -71005,6 +71449,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -71041,6 +71486,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -71065,6 +71511,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -71139,6 +71586,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -71175,6 +71623,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -71199,6 +71648,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -71517,6 +71967,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -71553,6 +72004,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -71577,6 +72029,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -71717,6 +72170,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -71753,6 +72207,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -71777,6 +72232,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -71920,6 +72376,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -71956,6 +72413,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -71980,6 +72438,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -72046,15 +72505,15 @@ }, "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. If defaultRouteAction is specified, don't set defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is specified, don't set defaultService. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." + "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." }, "defaultService": { - "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. Don't set both. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", + "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", "type": "string" }, "defaultUrlRedirect": { "$ref": "HttpRedirectAction", - "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, then set either defaultService or defaultRouteAction. Don't set both. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", @@ -72102,15 +72561,15 @@ }, "routeAction": { "$ref": "HttpRouteAction", - "description": "In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path rule's routeAction." + "description": "In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path rule's routeAction." }, "service": { - "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set.", + "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.", "type": "string" }, "urlRedirect": { "$ref": "HttpRedirectAction", - "description": "When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." } }, "type": "object" @@ -72124,7 +72583,7 @@ "type": "string" }, "name": { - "description": "The name of a per-instance configuration and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance configuration with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance configconfiguration for a VM instance that either doesn't exist or is not part of the group will result in an error.", + "description": "The name of a per-instance configuration and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance configuration with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance configuration for a VM instance that either doesn't exist or is not part of the group will result in an error.", "type": "string" }, "preservedState": { @@ -72354,7 +72813,7 @@ "type": "string" }, "enabledFeatures": { - "description": "Restricted features enabled for use on this project.", + "description": "An optional list of restricted features enabled for use on this project.", "items": { "type": "string" }, @@ -72401,7 +72860,7 @@ }, "usageExportLocation": { "$ref": "UsageExportLocation", - "description": "The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." + "description": "An optional naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." }, "vmDnsSetting": { "description": "[Output Only] Default internal DNS setting used by VMs running in this project.", @@ -72717,6 +73176,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -72753,6 +73213,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -72777,6 +73238,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -72897,11 +73359,13 @@ "description": "The public delegated prefix mode for IPv6 only.", "enum": [ "DELEGATION", - "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" + "EXTERNAL_IPV6_FORWARDING_RULE_CREATION", + "EXTERNAL_IPV6_SUBNETWORK_CREATION" ], "enumDescriptions": [ "The public delegated prefix is used for further sub-delegation only. Such prefixes cannot set allocatablePrefixLength.", - "The public delegated prefix is used for creating forwarding rules only. Such prefixes cannot set publicDelegatedSubPrefixes." + "The public delegated prefix is used for creating forwarding rules only. Such prefixes cannot set publicDelegatedSubPrefixes.", + "The public delegated prefix is used for creating dual-mode subnetworks only. Such prefixes cannot set publicDelegatedSubPrefixes." ], "type": "string" }, @@ -73019,6 +73483,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -73055,6 +73520,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -73079,6 +73545,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -73170,6 +73637,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -73206,6 +73674,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -73230,6 +73699,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -73296,11 +73766,13 @@ "description": "The PublicDelegatedSubPrefix mode for IPv6 only.", "enum": [ "DELEGATION", - "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" + "EXTERNAL_IPV6_FORWARDING_RULE_CREATION", + "EXTERNAL_IPV6_SUBNETWORK_CREATION" ], "enumDescriptions": [ "The public delegated prefix is used for further sub-delegation only. Such prefixes cannot set allocatablePrefixLength.", - "The public delegated prefix is used for creating forwarding rules only. Such prefixes cannot set publicDelegatedSubPrefixes." + "The public delegated prefix is used for creating forwarding rules only. Such prefixes cannot set publicDelegatedSubPrefixes.", + "The public delegated prefix is used for creating dual-mode subnetworks only. Such prefixes cannot set publicDelegatedSubPrefixes." ], "type": "string" }, @@ -73364,6 +73836,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -73400,6 +73873,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -73424,6 +73898,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -73945,6 +74420,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -73981,6 +74457,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74005,6 +74482,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74145,6 +74623,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74181,6 +74660,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74205,6 +74685,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74309,6 +74790,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74345,6 +74827,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74369,6 +74852,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74508,6 +74992,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74544,6 +75029,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74568,6 +75054,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74674,6 +75161,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74710,6 +75198,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74734,6 +75223,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74849,6 +75339,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74885,6 +75376,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74909,6 +75401,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -75112,6 +75605,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -75148,6 +75642,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -75172,6 +75667,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -75408,6 +75904,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -75444,6 +75941,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -75468,6 +75966,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -75601,6 +76100,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -75637,6 +76137,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -75661,6 +76162,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -75755,6 +76257,13 @@ "description": "[Output Only] The name of the firewall policy.", "type": "string" }, + "packetMirroringRules": { + "description": "[Output only] The packet mirroring rules that apply to the network.", + "items": { + "$ref": "FirewallPolicyRule" + }, + "type": "array" + }, "priority": { "description": "[Output only] Priority of firewall policy association. Not applicable for type=HIERARCHY.", "format": "int32", @@ -75916,20 +76425,6 @@ "format": "uint64", "type": "string" }, - "instanceTerminationAction": { - "description": "Instance termination action is invoked when the reservation is deleted. This only applies to reservations with a Deployment type.", - "enum": [ - "DELETE", - "INSTANCE_TERMINATION_ACTION_UNSPECIFIED", - "STOP" - ], - "enumDescriptions": [ - "Delete the VM.", - "Default value. This value is unused.", - "Stop the VM without storing in-memory content. default action." - ], - "type": "string" - }, "kind": { "default": "compute#reservation", "description": "[Output Only] Type of the resource. Always compute#reservations for reservations.", @@ -76106,6 +76601,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76142,6 +76638,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76166,6 +76663,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -76352,6 +76850,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76388,6 +76887,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76412,6 +76912,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -76503,6 +77004,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76539,6 +77041,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76563,6 +77066,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -76648,6 +77152,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76684,6 +77189,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76708,6 +77214,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -76826,6 +77333,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76862,6 +77370,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76886,6 +77395,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77071,6 +77581,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77107,6 +77618,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77131,6 +77643,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77352,6 +77865,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77388,6 +77902,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77412,6 +77927,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77639,18 +78155,49 @@ "id": "ResourceStatus", "properties": { "physicalHost": { - "description": "[Output Only] An opaque ID of the host on which the VM is running.", + "description": "[Output Only] The precise location of your instance within the zone's data center, including the block, sub-block, and host. The field is formatted as follows: blockId/subBlockId/hostId.", "type": "string" }, + "physicalHostTopology": { + "$ref": "ResourceStatusPhysicalHostTopology", + "description": "[Output Only] A series of fields containing the global name of the Compute Engine cluster, as well as the ID of the block, sub-block, and host on which the running instance is located." + }, "scheduling": { "$ref": "ResourceStatusScheduling" }, + "shutdownDetails": { + "$ref": "ResourceStatusShutdownDetails", + "description": "[Output Only] Details about the instance stopping state." + }, "upcomingMaintenance": { "$ref": "UpcomingMaintenance" } }, "type": "object" }, + "ResourceStatusPhysicalHostTopology": { + "description": "Represents the physical host topology of the host on which the VM is running.", + "id": "ResourceStatusPhysicalHostTopology", + "properties": { + "block": { + "description": "[Output Only] The ID of the block in which the running instance is located. Instances within the same block experience low network latency.", + "type": "string" + }, + "cluster": { + "description": "[Output Only] The global name of the Compute Engine cluster where the running instance is located.", + "type": "string" + }, + "host": { + "description": "[Output Only] The ID of the host on which the running instance is located. Instances on the same host experience the lowest possible network latency.", + "type": "string" + }, + "subblock": { + "description": "[Output Only] The ID of the sub-block in which the running instance is located. Instances in the same sub-block experience lower network latency than instances in the same block.", + "type": "string" + } + }, + "type": "object" + }, "ResourceStatusScheduling": { "id": "ResourceStatusScheduling", "properties": { @@ -77666,6 +78213,40 @@ }, "type": "object" }, + "ResourceStatusShutdownDetails": { + "id": "ResourceStatusShutdownDetails", + "properties": { + "maxDuration": { + "$ref": "Duration" + }, + "requestTimestamp": { + "type": "string" + }, + "stopState": { + "enum": [ + "PENDING_STOP", + "STOPPING" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "targetState": { + "enum": [ + "DELETED", + "STOPPED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "RolloutPolicy": { "description": "A rollout policy configuration.", "id": "RolloutPolicy", @@ -77887,6 +78468,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77923,6 +78505,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77947,6 +78530,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78071,6 +78655,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78107,6 +78692,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78131,6 +78717,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78394,6 +78981,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78430,6 +79018,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78454,6 +79043,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78869,6 +79459,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78905,6 +79496,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78929,6 +79521,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79066,6 +79659,13 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, + "nat64Subnetworks": { + "description": "List of Subnetwork resources whose traffic should be translated by NAT64 Gateway. It is used only when LIST_OF_IPV6_SUBNETWORKS is selected for the SubnetworkIpRangeToNat64Option above.", + "items": { + "$ref": "RouterNatSubnetworkToNat64" + }, + "type": "array" + }, "natIpAllocateOption": { "description": "Specify the NatIpAllocateOption, which can take one of the following values: - MANUAL_ONLY: Uses only Nat IP addresses provided by customers. When there are not enough specified Nat IPs, the Nat service fails for new VMs. - AUTO_ONLY: Nat IPs are allocated by Google Cloud Platform; customers can't specify any Nat IPs. When choosing AUTO_ONLY, then nat_ip should be empty. ", "enum": [ @@ -79106,6 +79706,18 @@ ], "type": "string" }, + "sourceSubnetworkIpRangesToNat64": { + "description": "Specify the Nat option for NAT64, which can take one of the following values: - ALL_IPV6_SUBNETWORKS: All of the IP ranges in every Subnetwork are allowed to Nat. - LIST_OF_IPV6_SUBNETWORKS: A list of Subnetworks are allowed to Nat (specified in the field nat64_subnetwork below) The default is NAT64_OPTION_UNSPECIFIED. Note that if this field contains NAT64_ALL_V6_SUBNETWORKS no other Router.Nat section in this region can also enable NAT64 for any Subnetworks in this network. Other Router.Nat sections can still be present to enable NAT44 only.", + "enum": [ + "ALL_IPV6_SUBNETWORKS", + "LIST_OF_IPV6_SUBNETWORKS" + ], + "enumDescriptions": [ + "NAT64 is enabled for all the IPv6 subnet ranges. In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs.", + "NAT64 is enabled for a list of IPv6 subnet ranges. In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs. If this option is used, the nat64_subnetworks field must be specified." + ], + "type": "string" + }, "subnetworks": { "description": "A list of Subnetwork resources whose traffic should be translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is selected for the SubnetworkIpRangeToNatOption above.", "items": { @@ -79265,6 +79877,17 @@ }, "type": "object" }, + "RouterNatSubnetworkToNat64": { + "description": "Specifies a subnetwork to enable NAT64.", + "id": "RouterNatSubnetworkToNat64", + "properties": { + "name": { + "description": "URL for the subnetwork resource that will use NAT64.", + "type": "string" + } + }, + "type": "object" + }, "RouterStatus": { "id": "RouterStatus", "properties": { @@ -79598,6 +80221,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79634,6 +80258,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79658,6 +80283,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79759,6 +80385,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79795,6 +80422,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79819,6 +80447,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79903,6 +80532,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79939,6 +80569,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79963,6 +80594,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -80252,6 +80884,9 @@ "format": "int32", "type": "integer" }, + "gracefulShutdown": { + "$ref": "SchedulingGracefulShutdown" + }, "hostErrorTimeoutSeconds": { "description": "Specify the time in seconds for host error detection, the value must be within the range of [90, 330] with the increment of 30, if unset, the default behavior of host error recovery will be used.", "format": "int32", @@ -80336,10 +80971,12 @@ "provisioningModel": { "description": "Specifies the provisioning model of the instance.", "enum": [ + "RESERVATION_BOUND", "SPOT", "STANDARD" ], "enumDescriptions": [ + "Bound to the lifecycle of the reservation in which it is provisioned.", "Heavily discounted, no guaranteed runtime.", "Standard provisioning with user controlled runtime, no discounts." ], @@ -80352,6 +80989,21 @@ }, "type": "object" }, + "SchedulingGracefulShutdown": { + "description": "The configuration for gracefully shutting down the instance.", + "id": "SchedulingGracefulShutdown", + "properties": { + "enabled": { + "description": "Opts-in for graceful shutdown.", + "type": "boolean" + }, + "maxDuration": { + "$ref": "Duration", + "description": "The time allotted for the instance to gracefully shut down. If the graceful shutdown isn't complete after this time, then the instance transitions to the STOPPING state." + } + }, + "type": "object" + }, "SchedulingNodeAffinity": { "description": "Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled.", "id": "SchedulingNodeAffinity", @@ -80476,6 +81128,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -80512,6 +81165,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -80536,6 +81190,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -80619,6 +81274,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -80655,6 +81311,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -80679,6 +81336,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -81027,6 +81685,10 @@ ], "type": "string" }, + "requestBodyInspectionSize": { + "description": "The maximum request size chosen by the customer with Waf enabled. Currently only \"8KB\" and \"128KB\" are supported. Values are case insensitive.", + "type": "string" + }, "userIpRequestHeaders": { "description": "An optional list of case-insensitive request header names to use for resolving the callers client IP address.", "items": { @@ -81160,6 +81822,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -81196,6 +81859,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -81220,6 +81884,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -81694,7 +82359,7 @@ "type": "string" }, "enforceOnKey": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKey\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. ", + "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKey\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. ", "enum": [ "ALL", "ALL_IPS", @@ -81705,6 +82370,7 @@ "REGION_CODE", "SNI", "TLS_JA3_FINGERPRINT", + "TLS_JA4_FINGERPRINT", "USER_IP", "XFF_IP" ], @@ -81719,6 +82385,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -81732,6 +82399,7 @@ "", "", "", + "", "" ], "type": "string" @@ -81770,7 +82438,7 @@ "type": "string" }, "enforceOnKeyType": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKeyConfigs\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. ", + "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKeyConfigs\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. ", "enum": [ "ALL", "ALL_IPS", @@ -81781,6 +82449,7 @@ "REGION_CODE", "SNI", "TLS_JA3_FINGERPRINT", + "TLS_JA4_FINGERPRINT", "USER_IP", "XFF_IP" ], @@ -81795,6 +82464,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -81808,6 +82478,7 @@ "", "", "", + "", "" ], "type": "string" @@ -82177,6 +82848,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82213,6 +82885,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82237,6 +82910,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -82392,6 +83066,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82428,6 +83103,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82452,6 +83128,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -82559,6 +83236,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82595,6 +83273,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82619,6 +83298,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83185,6 +83865,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -83221,6 +83902,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -83245,6 +83927,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83603,6 +84286,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -83639,6 +84323,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -83663,6 +84348,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83755,6 +84441,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -83791,6 +84478,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -83815,6 +84503,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83963,6 +84652,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -83999,6 +84689,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -84023,6 +84714,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -84125,6 +84817,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -84161,6 +84854,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -84185,6 +84879,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -84276,6 +84971,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -84312,6 +85008,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -84336,6 +85033,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -84422,6 +85120,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -84458,6 +85157,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -84482,6 +85182,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -84631,6 +85332,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -84667,6 +85369,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -84691,6 +85394,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -85040,6 +85744,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -85076,6 +85781,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -85100,6 +85806,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -85278,6 +85985,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -85314,6 +86022,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -85338,6 +86047,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -85439,6 +86149,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -85475,6 +86186,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -85499,6 +86211,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -85734,6 +86447,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -85770,6 +86484,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -85794,6 +86509,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -85886,6 +86602,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -85922,6 +86639,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -85946,6 +86664,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -86020,6 +86739,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -86056,6 +86776,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -86080,6 +86801,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -86154,6 +86876,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -86190,6 +86913,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -86214,6 +86938,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -86310,6 +87035,10 @@ "description": "The range of internal addresses that are owned by this subnetwork. Provide this property when you create the subnetwork. For example, 10.0.0.0/8 or 100.64.0.0/10. Ranges must be unique and non-overlapping within a network. Only IPv4 is supported. This field is set at resource creation time. The range can be any range listed in the Valid ranges list. The range can be expanded after creation using expandIpCidrRange.", "type": "string" }, + "ipCollection": { + "description": "Reference to the source of IP, like a PublicDelegatedPrefix (PDP) for BYOIP. The PDP must be a sub-PDP in EXTERNAL_IPV6_SUBNETWORK_CREATION mode. Use one of the following formats to specify a sub-PDP when creating a dual stack subnetwork with external access using BYOIP: - Full resource URL, as in https://www.googleapis.com/compute/v1/projects/projectId/regions/region /publicDelegatedPrefixes/sub-pdp-name - Partial URL, as in - projects/projectId/regions/region/publicDelegatedPrefixes/ sub-pdp-name - regions/region/publicDelegatedPrefixes/sub-pdp-name ", + "type": "string" + }, "ipv6AccessType": { "description": "The access type of IPv6 address this subnet holds. It's immutable and can only be specified during creation or the first time the subnet is updated into IPV4_IPV6 dual stack.", "enum": [ @@ -86326,6 +87055,18 @@ "description": "[Output Only] This field is for internal use.", "type": "string" }, + "ipv6GceEndpoint": { + "description": "[Output Only] Possible endpoints of this subnetwork. It can be one of the following: - VM_ONLY: The subnetwork can be used for creating instances and IPv6 addresses with VM endpoint type. Such a subnetwork gets external IPv6 ranges from a public delegated prefix and cannot be used to create NetLb. - VM_AND_FR: The subnetwork can be used for creating both VM instances and Forwarding Rules. It can also be used to reserve IPv6 addresses with both VM and FR endpoint types. Such a subnetwork gets its IPv6 range from Google IP Pool directly. ", + "enum": [ + "VM_AND_FR", + "VM_ONLY" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "kind": { "default": "compute#subnetwork", "description": "[Output Only] Type of the resource. Always compute#subnetwork for Subnetwork resources.", @@ -86363,10 +87104,11 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", + "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", "enum": [ "GLOBAL_MANAGED_PROXY", "INTERNAL_HTTPS_LOAD_BALANCER", + "PEER_MIGRATION", "PRIVATE", "PRIVATE_NAT", "PRIVATE_RFC_1918", @@ -86376,6 +87118,7 @@ "enumDescriptions": [ "Subnet reserved for Global Envoy-based Load Balancing.", "Subnet reserved for Internal HTTP(S) Load Balancing. This is a legacy purpose, please use REGIONAL_MANAGED_PROXY instead.", + "Subnetwork will be used for Migration from one peered VPC to another. (a transient state of subnetwork while migrating resources from one project to another).", "Regular user created or automatically created subnet.", "Subnetwork used as source range for Private NAT Gateways.", "Regular user created or automatically created subnet.", @@ -86506,6 +87249,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -86542,6 +87286,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -86566,6 +87311,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -86658,6 +87404,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -86694,6 +87441,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -86718,6 +87466,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -86882,6 +87631,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -86918,6 +87668,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -86942,6 +87693,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -87190,6 +87942,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -87226,6 +87979,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -87250,6 +88004,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -87324,6 +88079,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -87360,6 +88116,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -87384,6 +88141,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -87546,6 +88304,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -87582,6 +88341,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -87606,6 +88366,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -87698,6 +88459,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -87734,6 +88496,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -87758,6 +88521,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -87832,6 +88596,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -87868,6 +88633,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -87892,6 +88658,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -87973,7 +88740,7 @@ "type": "object" }, "TargetHttpsProxy": { - "description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of GCP HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.", + "description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/beta/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.", "id": "TargetHttpsProxy", "properties": { "authentication": { @@ -88080,12 +88847,14 @@ "enum": [ "DISABLED", "PERMISSIVE", - "STRICT" + "STRICT", + "UNRESTRICTED" ], "enumDescriptions": [ "TLS 1.3 Early Data is not advertised, and any (invalid) attempts to send Early Data will be rejected by closing the connection.", "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE). This mode does not enforce any other limitations for requests with Early Data. The application owner should validate that Early Data is acceptable for a given request path.", - "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) without query parameters. Requests that send Early Data with non-idempotent HTTP methods or with query parameters will be rejected with a HTTP 425." + "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) without query parameters. Requests that send Early Data with non-idempotent HTTP methods or with query parameters will be rejected with a HTTP 425.", + "This enables TLS 1.3 Early Data for requests with any HTTP method including non-idempotent methods list POST. This mode does not enforce any other limitations. This may be valuable for gRPC use cases. However, we do not recommend this method unless you have evaluated your security stance and mitigated the risk of replay attacks using other mechanisms." ], "type": "string" }, @@ -88158,6 +88927,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -88194,6 +88964,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -88218,6 +88989,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -88310,6 +89082,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -88346,6 +89119,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -88370,6 +89144,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -88529,6 +89304,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -88565,6 +89341,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -88589,6 +89366,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -88681,6 +89459,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -88717,6 +89496,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -88741,6 +89521,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -88815,6 +89596,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -88851,6 +89633,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -88875,6 +89658,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -89065,6 +89849,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -89101,6 +89886,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -89125,6 +89911,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -89234,6 +90021,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -89270,6 +90058,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -89294,6 +90083,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -89420,6 +90210,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -89456,6 +90247,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -89480,6 +90272,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -89697,6 +90490,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -89733,6 +90527,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -89757,6 +90552,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -89831,6 +90627,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -89867,6 +90664,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -89891,6 +90689,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -90076,6 +90875,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -90112,6 +90912,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -90136,6 +90937,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -90228,6 +91030,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -90264,6 +91067,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -90288,6 +91092,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -90481,6 +91286,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -90517,6 +91323,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -90541,6 +91348,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -90633,6 +91441,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -90669,6 +91478,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -90693,6 +91503,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -90767,6 +91578,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -90803,6 +91615,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -90827,6 +91640,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -91015,15 +91829,15 @@ }, "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." + "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." }, "defaultService": { - "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any defaultRouteAction.weightedBackendServices. Conversely, if defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", + "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", "type": "string" }, "defaultUrlRedirect": { "$ref": "HttpRedirectAction", - "description": "When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", @@ -91140,6 +91954,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -91176,6 +91991,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -91200,6 +92016,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -91389,6 +92206,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -91425,6 +92243,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -91449,6 +92268,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -91523,6 +92343,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -91559,6 +92380,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -91583,6 +92405,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -91708,10 +92531,11 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", + "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", "enum": [ "GLOBAL_MANAGED_PROXY", "INTERNAL_HTTPS_LOAD_BALANCER", + "PEER_MIGRATION", "PRIVATE", "PRIVATE_NAT", "PRIVATE_RFC_1918", @@ -91721,6 +92545,7 @@ "enumDescriptions": [ "Subnet reserved for Global Envoy-based Load Balancing.", "Subnet reserved for Internal HTTP(S) Load Balancing. This is a legacy purpose, please use REGIONAL_MANAGED_PROXY instead.", + "Subnetwork will be used for Migration from one peered VPC to another. (a transient state of subnetwork while migrating resources from one project to another).", "Regular user created or automatically created subnet.", "Subnetwork used as source range for Private NAT Gateways.", "Regular user created or automatically created subnet.", @@ -91838,6 +92663,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -91874,6 +92700,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -91898,6 +92725,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -92104,6 +92932,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -92140,6 +92969,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -92164,6 +92994,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -92360,6 +93191,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -92396,6 +93228,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -92420,6 +93253,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -92512,6 +93346,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -92548,6 +93383,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -92572,6 +93408,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -92768,6 +93605,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -92804,6 +93642,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -92828,6 +93667,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -93081,6 +93921,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -93117,6 +93958,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -93141,6 +93983,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -93233,6 +94076,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -93269,6 +94113,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -93293,6 +94138,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -93367,6 +94213,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -93403,6 +94250,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -93427,6 +94275,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -93577,6 +94426,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -93613,6 +94463,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -93637,6 +94488,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -93816,6 +94668,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -93852,6 +94705,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -93876,6 +94730,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", diff --git a/compute/v0.beta/compute-gen.go b/compute/v0.beta/compute-gen.go index a49aa603a4b..3779c7acefc 100644 --- a/compute/v0.beta/compute-gen.go +++ b/compute/v0.beta/compute-gen.go @@ -1659,6 +1659,8 @@ type AcceleratorTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -1813,6 +1815,8 @@ type AcceleratorTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -1953,6 +1957,8 @@ type AcceleratorTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -2358,6 +2364,8 @@ type AddressAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -2512,6 +2520,8 @@ type AddressListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -2651,6 +2661,8 @@ type AddressesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -3660,6 +3672,8 @@ type AutoscalerAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -3814,6 +3828,8 @@ type AutoscalerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -4054,6 +4070,8 @@ type AutoscalersScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -4725,7 +4743,8 @@ type BackendBucketCdnPolicy struct { // identifiable) content. CACHE_ALL_STATIC Automatically cache static content, // including common image formats, media (video and audio), and web assets // (JavaScript and CSS). Requests and responses that are marked as uncacheable, - // as well as dynamic content (including HTML), will not be cached. + // as well as dynamic content (including HTML), will not be cached. If no value + // is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. // // Possible values: // "CACHE_ALL_STATIC" - Automatically cache static content, including common @@ -5005,6 +5024,8 @@ type BackendBucketListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -5479,6 +5500,7 @@ type BackendService struct { // // Possible values: // "GRPC" - gRPC (available for Traffic Director). + // "H2C" - HTTP2 over cleartext // "HTTP" // "HTTP2" - HTTP/2 with SSL. // "HTTPS" @@ -5687,6 +5709,8 @@ type BackendServiceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -5775,7 +5799,8 @@ type BackendServiceCdnPolicy struct { // identifiable) content. CACHE_ALL_STATIC Automatically cache static content, // including common image formats, media (video and audio), and web assets // (JavaScript and CSS). Requests and responses that are marked as uncacheable, - // as well as dynamic content (including HTML), will not be cached. + // as well as dynamic content (including HTML), will not be cached. If no value + // is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. // // Possible values: // "CACHE_ALL_STATIC" - Automatically cache static content, including common @@ -6294,6 +6319,8 @@ type BackendServiceListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -6450,6 +6477,8 @@ type BackendServiceListUsableWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -6739,6 +6768,30 @@ func (s BackendServiceUsedBy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type BackendServicesGetEffectiveSecurityPoliciesResponse struct { + // SecurityPolicies: Effective security policies for the backend service. + SecurityPolicies []*SecurityPolicy `json:"securityPolicies,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "SecurityPolicies") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SecurityPolicies") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackendServicesGetEffectiveSecurityPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod BackendServicesGetEffectiveSecurityPoliciesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type BackendServicesScopedList struct { // BackendServices: A list of BackendServices contained in this scope. BackendServices []*BackendService `json:"backendServices,omitempty"` @@ -6811,6 +6864,8 @@ type BackendServicesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -7682,6 +7737,9 @@ type Commitment struct { // "GRAPHICS_OPTIMIZED" // "MEMORY_OPTIMIZED" // "MEMORY_OPTIMIZED_M3" + // "MEMORY_OPTIMIZED_X4_16TB" + // "MEMORY_OPTIMIZED_X4_24TB" + // "MEMORY_OPTIMIZED_X4_32TB" // "STORAGE_OPTIMIZED_Z3" // "TYPE_UNSPECIFIED" Type string `json:"type,omitempty"` @@ -7795,6 +7853,8 @@ type CommitmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -7949,6 +8009,8 @@ type CommitmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -8115,6 +8177,8 @@ type CommitmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -8998,6 +9062,8 @@ type DiskAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -9275,6 +9341,8 @@ type DiskListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -9594,6 +9662,8 @@ type DiskTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -9748,6 +9818,8 @@ type DiskTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -9887,6 +9959,8 @@ type DiskTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -10090,6 +10164,8 @@ type DisksScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -10510,6 +10586,8 @@ type ExchangedPeeringRoutesListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -10846,6 +10924,8 @@ type ExternalVpnGatewayListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -11228,6 +11308,8 @@ type FirewallListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -11565,6 +11647,8 @@ type FirewallPolicyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -12354,6 +12438,8 @@ type ForwardingRuleAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -12507,6 +12593,8 @@ type ForwardingRuleListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -12699,6 +12787,8 @@ type ForwardingRulesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -12801,21 +12891,9 @@ type FutureReservation struct { // Description: An optional description of this resource. Provide this property // when you create the future reservation. Description string `json:"description,omitempty"` - // EnableOpportunisticMaintenance: Indicates if this group of VMs have - // opportunistic maintenance enabled. This will be set on the FR by customers, - // and will be used for reservation and reservation block maintenance . - EnableOpportunisticMaintenance bool `json:"enableOpportunisticMaintenance,omitempty"` // Id: [Output Only] A unique identifier for this future reservation. The // server defines this identifier. Id uint64 `json:"id,omitempty,string"` - // InstanceTerminationAction: Action to take during reservation termination. - // - // Possible values: - // "DELETE" - Delete the VM. - // "INSTANCE_TERMINATION_ACTION_UNSPECIFIED" - Default value. This value is - // unused. - // "STOP" - Stop the VM without storing in-memory content. default action. - InstanceTerminationAction string `json:"instanceTerminationAction,omitempty"` // Kind: [Output Only] Type of the resource. Always compute#futureReservation // for future reservations. Kind string `json:"kind,omitempty"` @@ -13270,6 +13348,8 @@ type FutureReservationsAggregatedListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -13428,6 +13508,8 @@ type FutureReservationsListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -13567,6 +13649,8 @@ type FutureReservationsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -13859,10 +13943,6 @@ func (s GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) { // GroupMaintenanceInfo: Maintenance Info for ReservationBlocks. type GroupMaintenanceInfo struct { - // EnableOpportunisticMaintenance: This setting enables or disables - // opportunistic maintenance. If enabled, maintenance is performed on unused - // reservations whenever possible. - EnableOpportunisticMaintenance bool `json:"enableOpportunisticMaintenance,omitempty"` // MaintenanceOngoingCount: Progress for ongoing maintenance for this group of // VMs/hosts. Describes number of hosts in the block that have ongoing // maintenance. @@ -13882,15 +13962,14 @@ type GroupMaintenanceInfo struct { SchedulingType string `json:"schedulingType,omitempty"` // UpcomingGroupMaintenance: Maintenance information on this group of VMs. UpcomingGroupMaintenance *UpcomingMaintenance `json:"upcomingGroupMaintenance,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "EnableOpportunisticMaintenance") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See + // ForceSendFields is a list of field names (e.g. "MaintenanceOngoingCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableOpportunisticMaintenance") - // to include in API requests with the JSON null value. By default, fields with + // NullFields is a list of field names (e.g. "MaintenanceOngoingCount") to + // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` @@ -14445,6 +14524,8 @@ type HealthCheckListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -14788,6 +14869,8 @@ type HealthCheckServicesListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -14943,6 +15026,8 @@ type HealthChecksAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -15082,6 +15167,8 @@ type HealthChecksScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -15794,6 +15881,8 @@ type HttpHealthCheckListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -16175,26 +16264,21 @@ type HttpRouteRule struct { Priority int64 `json:"priority,omitempty"` // RouteAction: In response to a matching matchRule, the load balancer performs // advanced routing actions, such as URL rewrites and header transformations, - // before forwarding the request to the selected backend. If routeAction - // specifies any weightedBackendServices, service must not be set. Conversely - // if service is set, routeAction cannot contain any weightedBackendServices. - // Only one of urlRedirect, service or routeAction.weightedBackendService must - // be set. URL maps for classic Application Load Balancers only support the - // urlRewrite action within a route rule's routeAction. + // before forwarding the request to the selected backend. Only one of + // urlRedirect, service or routeAction.weightedBackendService can be set. URL + // maps for classic Application Load Balancers only support the urlRewrite + // action within a route rule's routeAction. RouteAction *HttpRouteAction `json:"routeAction,omitempty"` // Service: The full or partial URL of the backend service resource to which // traffic is directed if this rule is matched. If routeAction is also // specified, advanced routing actions, such as URL rewrites, take effect - // before sending the request to the backend. However, if service is specified, - // routeAction cannot contain any weightedBackendServices. Conversely, if - // routeAction specifies any weightedBackendServices, service must not be - // specified. Only one of urlRedirect, service or - // routeAction.weightedBackendService must be set. + // before sending the request to the backend. Only one of urlRedirect, service + // or routeAction.weightedBackendService can be set. Service string `json:"service,omitempty"` // UrlRedirect: When this rule is matched, the request is redirected to a URL - // specified by urlRedirect. If urlRedirect is specified, service or - // routeAction must not be set. Not supported when the URL map is bound to a - // target gRPC proxy. + // specified by urlRedirect. Only one of urlRedirect, service or + // routeAction.weightedBackendService can be set. Not supported when the URL + // map is bound to a target gRPC proxy. UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomErrorResponsePolicy") // to unconditionally include in API requests. By default, fields with empty or @@ -16448,6 +16532,8 @@ type HttpsHealthCheckListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -16873,6 +16959,8 @@ type ImageListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -17169,6 +17257,7 @@ type Instance struct { // "DEPROVISIONING" - The instance is halted and we are performing tear down // tasks like network deprogramming, releasing quota, IP, tearing down disks // etc. + // "PENDING_STOP" - The instance is gracefully shutting down. // "PROVISIONING" - Resources are being allocated for the instance. // "REPAIRING" - The instance is in repair. // "RUNNING" - The instance is running. @@ -17304,6 +17393,8 @@ type InstanceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -17590,6 +17681,8 @@ type InstanceGroupAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -17744,6 +17837,8 @@ type InstanceGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -18140,6 +18235,8 @@ type InstanceGroupManagerAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -18475,6 +18572,8 @@ type InstanceGroupManagerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -18953,6 +19052,8 @@ type InstanceGroupManagerResizeRequestsListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -19676,6 +19777,8 @@ type InstanceGroupManagersListPerInstanceConfigsRespWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -19922,6 +20025,8 @@ type InstanceGroupManagersScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -20270,6 +20375,8 @@ type InstanceGroupsListInstancesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -20460,6 +20567,8 @@ type InstanceGroupsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -20643,6 +20752,8 @@ type InstanceListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -20797,6 +20908,8 @@ type InstanceListReferrersWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -21447,6 +21560,8 @@ type InstanceTemplateAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -21601,6 +21716,8 @@ type InstanceTemplateListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -21741,6 +21858,8 @@ type InstanceTemplatesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -21820,6 +21939,7 @@ type InstanceWithNamedPorts struct { // "DEPROVISIONING" - The instance is halted and we are performing tear down // tasks like network deprogramming, releasing quota, IP, tearing down disks // etc. + // "PENDING_STOP" - The instance is gracefully shutting down. // "PROVISIONING" - Resources are being allocated for the instance. // "REPAIRING" - The instance is in repair. // "RUNNING" - The instance is running. @@ -21928,6 +22048,9 @@ type InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { DisplayName string `json:"displayName,omitempty"` // Name: [Output Only] The name of the firewall policy. Name string `json:"name,omitempty"` + // PacketMirroringRules: [Output Only] The packet mirroring rules that apply to + // the instance. + PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` // Priority: [Output only] Priority of firewall policy association. Not // applicable for type=HIERARCHY. Priority int64 `json:"priority,omitempty"` @@ -22115,6 +22238,8 @@ type InstancesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -22573,6 +22698,8 @@ type InstantSnapshotAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -22726,6 +22853,8 @@ type InstantSnapshotListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -22887,6 +23016,8 @@ type InstantSnapshotsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -23657,6 +23788,8 @@ type InterconnectAttachmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -23876,6 +24009,8 @@ type InterconnectAttachmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -24074,6 +24209,8 @@ type InterconnectAttachmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -24496,6 +24633,8 @@ type InterconnectListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -24577,7 +24716,8 @@ type InterconnectLocation struct { // "zone1" or "zone2". AvailabilityZone string `json:"availabilityZone,omitempty"` // AvailableFeatures: [Output only] List of features available at this - // InterconnectLocation, which can take one of the following values: - MACSEC + // InterconnectLocation, which can take one of the following values: - + // IF_MACSEC // // Possible values: // "IF_MACSEC" - Media Access Control security (MACsec) @@ -24761,6 +24901,8 @@ type InterconnectLocationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -25353,6 +25495,8 @@ type InterconnectRemoteLocationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -25517,7 +25661,8 @@ type License struct { LicenseCode uint64 `json:"licenseCode,omitempty,string"` // Name: Name of the resource. The name must be 1-63 characters long and comply // with RFC1035. - Name string `json:"name,omitempty"` + Name string `json:"name,omitempty"` + // ResourceRequirements: [Input Only] Deprecated. ResourceRequirements *LicenseResourceRequirements `json:"resourceRequirements,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -25657,11 +25802,11 @@ func (s LicenseResourceCommitment) MarshalJSON() ([]byte, error) { } type LicenseResourceRequirements struct { - // MinGuestCpuCount: Minimum number of guest cpus required to use the Instance. - // Enforced at Instance creation and Instance start. + // MinGuestCpuCount: [Input Only] Deprecated. This field no longer reflects the + // minimum number of guest cpus required to use the Instance. MinGuestCpuCount int64 `json:"minGuestCpuCount,omitempty"` - // MinMemoryMb: Minimum memory required to use the Instance. Enforced at - // Instance creation and Instance start. + // MinMemoryMb: [Input Only] Deprecated. This field no longer reflects the + // minimum memory required to use the Instance. MinMemoryMb int64 `json:"minMemoryMb,omitempty"` // ForceSendFields is a list of field names (e.g. "MinGuestCpuCount") to // unconditionally include in API requests. By default, fields with empty or @@ -25764,6 +25909,8 @@ type LicensesListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26170,6 +26317,8 @@ type MachineImageListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26423,6 +26572,8 @@ type MachineTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26577,6 +26728,8 @@ type MachineTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26716,6 +26869,8 @@ type MachineTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26853,6 +27008,7 @@ type ManagedInstance struct { // "DEPROVISIONING" - The instance is halted and we are performing tear down // tasks like network deprogramming, releasing quota, IP, tearing down disks // etc. + // "PENDING_STOP" - The instance is gracefully shutting down. // "PROVISIONING" - Resources are being allocated for the instance. // "REPAIRING" - The instance is in repair. // "RUNNING" - The instance is running. @@ -27080,6 +27236,8 @@ type ManagedInstancePropertiesFromFlexibilityPolicy struct { // ProvisioningModel: The provisioning model to be used for this instance. // // Possible values: + // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which + // it is provisioned. // "SPOT" - Heavily discounted, no guaranteed runtime. // "STANDARD" - Standard provisioning with user controlled runtime, no // discounts. @@ -27317,7 +27475,16 @@ func (s MultiMig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// MultiMigResourcePolicies: Resource policies message for a multi-MIG. +// Specifies the workload policy configuration of the multi-MIG. type MultiMigResourcePolicies struct { + // WorkloadPolicy: The URL of the workload policy for this multi-MIG. It can be + // a full or partial URL. For example, the following are all valid URLs to a + // workload policy: - + // https://www.googleapis.com/compute/v1/projects/project/regions/region + // /resourcePolicies/resourcePolicy - + // projects/project/regions/region/resourcePolicies/resourcePolicy - + // regions/region/resourcePolicies/resourcePolicy WorkloadPolicy string `json:"workloadPolicy,omitempty"` // ForceSendFields is a list of field names (e.g. "WorkloadPolicy") to // unconditionally include in API requests. By default, fields with empty or @@ -27424,6 +27591,8 @@ type MultiMigsListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -27669,7 +27838,7 @@ type Network struct { // NetworkProfile: A full or partial URL of the network profile to apply to // this network. This field can be set only at resource creation time. For // example, the following are valid URLs: - - // https://www.googleapis.com/compute/alpha/projects/{project_id}/global/networkProfiles/{network_profile_name} + // https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} // - projects/{project_id}/global/networkProfiles/{network_profile_name} NetworkProfile string `json:"networkProfile,omitempty"` // Peerings: [Output Only] A list of network peerings for the resource. @@ -27873,6 +28042,8 @@ type NetworkAttachmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -28077,6 +28248,8 @@ type NetworkAttachmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -28216,6 +28389,8 @@ type NetworkAttachmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -28437,6 +28612,8 @@ type NetworkEdgeSecurityServiceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -28577,6 +28754,8 @@ type NetworkEdgeSecurityServicesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -28902,6 +29081,8 @@ type NetworkEndpointGroupAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29208,6 +29389,8 @@ type NetworkEndpointGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29547,6 +29730,8 @@ type NetworkEndpointGroupsListNetworkEndpointsWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29688,6 +29873,8 @@ type NetworkEndpointGroupsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29981,6 +30168,8 @@ type NetworkListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30172,6 +30361,8 @@ type NetworkProfile struct { // Kind: [Output Only] Type of the resource. Always compute#networkProfile for // network profiles. Kind string `json:"kind,omitempty"` + // Location: [Output Only] Location to which the network is restricted. + Location *NetworkProfileLocation `json:"location,omitempty"` // Name: [Output Only] Name of the resource. Name string `json:"name,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -30202,6 +30393,30 @@ func (s NetworkProfile) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type NetworkProfileLocation struct { + Name string `json:"name,omitempty"` + // Possible values: + // "REGION" + // "ZONE" + Scope string `json:"scope,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s NetworkProfileLocation) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfileLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type NetworkProfileNetworkFeatures struct { // AddressPurposes: Specifies what address purposes are supported. If empty, // all address purposes are supported. @@ -30474,6 +30689,8 @@ type NetworkProfilesListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30566,6 +30783,16 @@ type NetworkRoutingConfig struct { // "ADD_COST_TO_MED" // "DEFAULT" BgpInterRegionCost string `json:"bgpInterRegionCost,omitempty"` + // EffectiveBgpAlwaysCompareMed: [Output Only] Effective value of the + // bgp_always_compare_med field. + EffectiveBgpAlwaysCompareMed bool `json:"effectiveBgpAlwaysCompareMed,omitempty"` + // EffectiveBgpInterRegionCost: [Output Only] Effective value of the + // bgp_inter_region_cost field. + // + // Possible values: + // "ADD_COST_TO_MED" + // "DEFAULT" + EffectiveBgpInterRegionCost string `json:"effectiveBgpInterRegionCost,omitempty"` // RoutingMode: The network-wide routing mode to use. If set to REGIONAL, this // network's Cloud Routers will only advertise routes with subnets of this // network in the same region as the router. If set to GLOBAL, this network's @@ -30670,6 +30897,9 @@ type NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { DisplayName string `json:"displayName,omitempty"` // Name: [Output Only] The name of the firewall policy. Name string `json:"name,omitempty"` + // PacketMirroringRules: [Output Only] The packet mirroring rules that apply to + // the network. + PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` // Priority: [Output only] Priority of firewall policy association. Not // applicable for type=HIERARCHY. Priority int64 `json:"priority,omitempty"` @@ -30969,6 +31199,8 @@ type NodeGroupAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -31157,6 +31389,8 @@ type NodeGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -31441,6 +31675,8 @@ type NodeGroupsListNodesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -31604,6 +31840,8 @@ type NodeGroupsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -31887,6 +32125,8 @@ type NodeTemplateAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -32041,6 +32281,8 @@ type NodeTemplateListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -32203,6 +32445,8 @@ type NodeTemplatesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -32416,6 +32660,8 @@ type NodeTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -32570,6 +32816,8 @@ type NodeTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -32709,6 +32957,8 @@ type NodeTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -32960,6 +33210,8 @@ type NotificationEndpointListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -33270,6 +33522,8 @@ type OperationWarnings struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -33426,6 +33680,8 @@ type OperationAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -33581,6 +33837,8 @@ type OperationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -33720,6 +33978,8 @@ type OperationsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34115,6 +34375,8 @@ type PacketMirroringAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34333,6 +34595,8 @@ type PacketMirroringListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34577,6 +34841,8 @@ type PacketMirroringsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34711,14 +34977,10 @@ type PathMatcher struct { // DefaultRouteAction: defaultRouteAction takes effect when none of the // pathRules or routeRules match. The load balancer performs advanced routing // actions, such as URL rewrites and header transformations, before forwarding - // the request to the selected backend. If defaultRouteAction specifies any - // weightedBackendServices, defaultService must not be set. Conversely if - // defaultService is set, defaultRouteAction cannot contain any - // weightedBackendServices. If defaultRouteAction is specified, don't set - // defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is - // specified, don't set defaultService. URL maps for classic Application Load - // Balancers only support the urlRewrite action within a path matcher's - // defaultRouteAction. + // the request to the selected backend. Only one of defaultUrlRedirect, + // defaultService or defaultRouteAction.weightedBackendService can be set. URL + // maps for classic Application Load Balancers only support the urlRewrite + // action within a path matcher's defaultRouteAction. DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` // DefaultService: The full or partial URL to the BackendService resource. This // URL is used if none of the pathRules or routeRules defined by this @@ -34729,20 +34991,17 @@ type PathMatcher struct { // compute/v1/projects/project/global/backendServices/backendService - // global/backendServices/backendService If defaultRouteAction is also // specified, advanced routing actions, such as URL rewrites, take effect - // before sending the request to the backend. However, if defaultService is - // specified, defaultRouteAction cannot contain any weightedBackendServices. - // Conversely, if defaultRouteAction specifies any weightedBackendServices, - // defaultService must not be specified. If defaultService is specified, then - // set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. - // Don't set both. Authorization requires one or more of the following Google - // IAM permissions on the specified resource default_service: - - // compute.backendBuckets.use - compute.backendServices.use + // before sending the request to the backend. Only one of defaultUrlRedirect, + // defaultService or defaultRouteAction.weightedBackendService can be set. + // Authorization requires one or more of the following Google IAM permissions + // on the specified resource default_service: - compute.backendBuckets.use - + // compute.backendServices.use DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified pathRules or routeRules // match, the request is redirected to a URL specified by defaultUrlRedirect. - // If defaultUrlRedirect is specified, then set either defaultService or - // defaultRouteAction. Don't set both. Not supported when the URL map is bound - // to a target gRPC proxy. + // Only one of defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. Not supported when the + // URL map is bound to a target gRPC proxy. DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` // Description: An optional description of this resource. Provide this property // when you create the resource. @@ -34821,26 +35080,21 @@ type PathRule struct { Paths []string `json:"paths,omitempty"` // RouteAction: In response to a matching path, the load balancer performs // advanced routing actions, such as URL rewrites and header transformations, - // before forwarding the request to the selected backend. If routeAction - // specifies any weightedBackendServices, service must not be set. Conversely - // if service is set, routeAction cannot contain any weightedBackendServices. - // Only one of routeAction or urlRedirect must be set. URL maps for classic - // Application Load Balancers only support the urlRewrite action within a path - // rule's routeAction. + // before forwarding the request to the selected backend. Only one of + // urlRedirect, service or routeAction.weightedBackendService can be set. URL + // maps for classic Application Load Balancers only support the urlRewrite + // action within a path rule's routeAction. RouteAction *HttpRouteAction `json:"routeAction,omitempty"` // Service: The full or partial URL of the backend service resource to which // traffic is directed if this rule is matched. If routeAction is also // specified, advanced routing actions, such as URL rewrites, take effect - // before sending the request to the backend. However, if service is specified, - // routeAction cannot contain any weightedBackendServices. Conversely, if - // routeAction specifies any weightedBackendServices, service must not be - // specified. Only one of urlRedirect, service or - // routeAction.weightedBackendService must be set. + // before sending the request to the backend. Only one of urlRedirect, service + // or routeAction.weightedBackendService can be set. Service string `json:"service,omitempty"` // UrlRedirect: When a path pattern is matched, the request is redirected to a - // URL specified by urlRedirect. If urlRedirect is specified, service or - // routeAction must not be set. Not supported when the URL map is bound to a - // target gRPC proxy. + // URL specified by urlRedirect. Only one of urlRedirect, service or + // routeAction.weightedBackendService can be set. Not supported when the URL + // map is bound to a target gRPC proxy. UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomErrorResponsePolicy") // to unconditionally include in API requests. By default, fields with empty or @@ -34870,8 +35124,8 @@ type PerInstanceConfig struct { // instance. Serves as a merge key during UpdatePerInstanceConfigs operations, // that is, if a per-instance configuration with the same name exists then it // will be updated, otherwise a new one will be created for the VM instance - // with the same name. An attempt to create a per-instance configconfiguration - // for a VM instance that either doesn't exist or is not part of the group will + // with the same name. An attempt to create a per-instance configuration for a + // VM instance that either doesn't exist or is not part of the group will // result in an error. Name string `json:"name,omitempty"` // PreservedState: The intended preserved state for the given instance. Does @@ -35189,7 +35443,8 @@ type Project struct { DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"` // Description: An optional textual description of the resource. Description string `json:"description,omitempty"` - // EnabledFeatures: Restricted features enabled for use on this project. + // EnabledFeatures: An optional list of restricted features enabled for use on + // this project. EnabledFeatures []string `json:"enabledFeatures,omitempty"` // Id: [Output Only] The unique identifier for the resource. This identifier is // defined by the server. This is *not* the project ID, and is just a unique ID @@ -35215,8 +35470,8 @@ type Project struct { Quotas []*Quota `json:"quotas,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // UsageExportLocation: The naming prefix for daily usage reports and the - // Google Cloud Storage bucket where they are stored. + // UsageExportLocation: An optional naming prefix for daily usage reports and + // the Google Cloud Storage bucket where they are stored. UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` // VmDnsSetting: [Output Only] Default internal DNS setting used by VMs running // in this project. @@ -35636,6 +35891,8 @@ type PublicAdvertisedPrefixListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -35789,6 +36046,9 @@ type PublicDelegatedPrefix struct { // "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" - The public delegated prefix is // used for creating forwarding rules only. Such prefixes cannot set // publicDelegatedSubPrefixes. + // "EXTERNAL_IPV6_SUBNETWORK_CREATION" - The public delegated prefix is used + // for creating dual-mode subnetworks only. Such prefixes cannot set + // publicDelegatedSubPrefixes. Mode string `json:"mode,omitempty"` // Name: Name of the resource. Provided by the client when the resource is // created. The name must be 1-63 characters long, and comply with RFC1035. @@ -35940,6 +36200,8 @@ type PublicDelegatedPrefixAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36094,6 +36356,8 @@ type PublicDelegatedPrefixListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36186,6 +36450,9 @@ type PublicDelegatedPrefixPublicDelegatedSubPrefix struct { // "EXTERNAL_IPV6_FORWARDING_RULE_CREATION" - The public delegated prefix is // used for creating forwarding rules only. Such prefixes cannot set // publicDelegatedSubPrefixes. + // "EXTERNAL_IPV6_SUBNETWORK_CREATION" - The public delegated prefix is used + // for creating dual-mode subnetworks only. Such prefixes cannot set + // publicDelegatedSubPrefixes. Mode string `json:"mode,omitempty"` // Name: The name of the sub public delegated prefix. Name string `json:"name,omitempty"` @@ -36290,6 +36557,8 @@ type PublicDelegatedPrefixesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36762,6 +37031,8 @@ type RegionQuotaStatusWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36945,6 +37216,8 @@ type RegionAutoscalerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37120,6 +37393,8 @@ type RegionDiskTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37366,6 +37641,8 @@ type RegionInstanceGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37546,6 +37823,8 @@ type RegionInstanceGroupManagerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37729,6 +38008,8 @@ type RegionInstanceGroupManagerResizeRequestsListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -38064,6 +38345,8 @@ type RegionInstanceGroupManagersListInstanceConfigsRespWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -38470,6 +38753,8 @@ type RegionInstanceGroupsListInstancesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -38683,6 +38968,8 @@ type RegionListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -38826,6 +39113,9 @@ type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewall DisplayName string `json:"displayName,omitempty"` // Name: [Output Only] The name of the firewall policy. Name string `json:"name,omitempty"` + // PacketMirroringRules: [Output only] The packet mirroring rules that apply to + // the network. + PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` // Priority: [Output only] Priority of firewall policy association. Not // applicable for type=HIERARCHY. Priority int64 `json:"priority,omitempty"` @@ -39042,16 +39332,6 @@ type Reservation struct { // Id: [Output Only] The unique identifier for the resource. This identifier is // defined by the server. Id uint64 `json:"id,omitempty,string"` - // InstanceTerminationAction: Instance termination action is invoked when the - // reservation is deleted. This only applies to reservations with a Deployment - // type. - // - // Possible values: - // "DELETE" - Delete the VM. - // "INSTANCE_TERMINATION_ACTION_UNSPECIFIED" - Default value. This value is - // unused. - // "STOP" - Stop the VM without storing in-memory content. default action. - InstanceTerminationAction string `json:"instanceTerminationAction,omitempty"` // Kind: [Output Only] Type of the resource. Always compute#reservations for // reservations. Kind string `json:"kind,omitempty"` @@ -39266,6 +39546,8 @@ type ReservationAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -39527,6 +39809,8 @@ type ReservationBlocksListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -39681,6 +39965,8 @@ type ReservationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -39842,6 +40128,8 @@ type ReservationsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -40042,6 +40330,8 @@ type ResourcePoliciesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -40267,6 +40557,8 @@ type ResourcePolicyAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -40586,6 +40878,8 @@ type ResourcePolicyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -40916,11 +41210,18 @@ func (s ResourcePolicyWorkloadPolicy) MarshalJSON() ([]byte, error) { // values set on Instance attributes as compared to the value requested by the // user (intent) in their instance CRUD calls. type ResourceStatus struct { - // PhysicalHost: [Output Only] An opaque ID of the host on which the VM is - // running. - PhysicalHost string `json:"physicalHost,omitempty"` - Scheduling *ResourceStatusScheduling `json:"scheduling,omitempty"` - UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` + // PhysicalHost: [Output Only] The precise location of your instance within the + // zone's data center, including the block, sub-block, and host. The field is + // formatted as follows: blockId/subBlockId/hostId. + PhysicalHost string `json:"physicalHost,omitempty"` + // PhysicalHostTopology: [Output Only] A series of fields containing the global + // name of the Compute Engine cluster, as well as the ID of the block, + // sub-block, and host on which the running instance is located. + PhysicalHostTopology *ResourceStatusPhysicalHostTopology `json:"physicalHostTopology,omitempty"` + Scheduling *ResourceStatusScheduling `json:"scheduling,omitempty"` + // ShutdownDetails: [Output Only] Details about the instance stopping state. + ShutdownDetails *ResourceStatusShutdownDetails `json:"shutdownDetails,omitempty"` + UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` // ForceSendFields is a list of field names (e.g. "PhysicalHost") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See @@ -40939,6 +41240,41 @@ func (s ResourceStatus) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ResourceStatusPhysicalHostTopology: Represents the physical host topology of +// the host on which the VM is running. +type ResourceStatusPhysicalHostTopology struct { + // Block: [Output Only] The ID of the block in which the running instance is + // located. Instances within the same block experience low network latency. + Block string `json:"block,omitempty"` + // Cluster: [Output Only] The global name of the Compute Engine cluster where + // the running instance is located. + Cluster string `json:"cluster,omitempty"` + // Host: [Output Only] The ID of the host on which the running instance is + // located. Instances on the same host experience the lowest possible network + // latency. + Host string `json:"host,omitempty"` + // Subblock: [Output Only] The ID of the sub-block in which the running + // instance is located. Instances in the same sub-block experience lower + // network latency than instances in the same block. + Subblock string `json:"subblock,omitempty"` + // ForceSendFields is a list of field names (e.g. "Block") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Block") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ResourceStatusPhysicalHostTopology) MarshalJSON() ([]byte, error) { + type NoMethod ResourceStatusPhysicalHostTopology + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ResourceStatusScheduling struct { // AvailabilityDomain: Specifies the availability domain to place the instance // in. The value must be a number between 1 and the number of availability @@ -40965,6 +41301,35 @@ func (s ResourceStatusScheduling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type ResourceStatusShutdownDetails struct { + MaxDuration *Duration `json:"maxDuration,omitempty"` + RequestTimestamp string `json:"requestTimestamp,omitempty"` + // Possible values: + // "PENDING_STOP" + // "STOPPING" + StopState string `json:"stopState,omitempty"` + // Possible values: + // "DELETED" + // "STOPPED" + TargetState string `json:"targetState,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaxDuration") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaxDuration") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ResourceStatusShutdownDetails) MarshalJSON() ([]byte, error) { + type NoMethod ResourceStatusShutdownDetails + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // RolloutPolicy: A rollout policy configuration. type RolloutPolicy struct { // DefaultRolloutTime: An optional RFC3339 timestamp on or after which the @@ -41191,6 +41556,8 @@ type RouteWarnings struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -41379,6 +41746,8 @@ type RouteListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -41696,6 +42065,8 @@ type RouterAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -42213,6 +42584,8 @@ type RouterListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -42370,6 +42743,10 @@ type RouterNat struct { // Name: Unique name of this Nat service. The name must be 1-63 characters long // and comply with RFC1035. Name string `json:"name,omitempty"` + // Nat64Subnetworks: List of Subnetwork resources whose traffic should be + // translated by NAT64 Gateway. It is used only when LIST_OF_IPV6_SUBNETWORKS + // is selected for the SubnetworkIpRangeToNat64Option above. + Nat64Subnetworks []*RouterNatSubnetworkToNat64 `json:"nat64Subnetworks,omitempty"` // NatIpAllocateOption: Specify the NatIpAllocateOption, which can take one of // the following values: - MANUAL_ONLY: Uses only Nat IP addresses provided by // customers. When there are not enough specified Nat IPs, the Nat service @@ -42407,6 +42784,22 @@ type RouterNat struct { // "LIST_OF_SUBNETWORKS" - A list of Subnetworks are allowed to Nat // (specified in the field subnetwork below) SourceSubnetworkIpRangesToNat string `json:"sourceSubnetworkIpRangesToNat,omitempty"` + // SourceSubnetworkIpRangesToNat64: Specify the Nat option for NAT64, which can + // take one of the following values: - ALL_IPV6_SUBNETWORKS: All of the IP + // ranges in every Subnetwork are allowed to Nat. - LIST_OF_IPV6_SUBNETWORKS: A + // list of Subnetworks are allowed to Nat (specified in the field + // nat64_subnetwork below) The default is NAT64_OPTION_UNSPECIFIED. Note that + // if this field contains NAT64_ALL_V6_SUBNETWORKS no other Router.Nat section + // in this region can also enable NAT64 for any Subnetworks in this network. + // Other Router.Nat sections can still be present to enable NAT44 only. + // + // Possible values: + // "ALL_IPV6_SUBNETWORKS" - NAT64 is enabled for all the IPv6 subnet ranges. + // In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs. + // "LIST_OF_IPV6_SUBNETWORKS" - NAT64 is enabled for a list of IPv6 subnet + // ranges. In dual stack subnets, NAT64 will only be enabled for IPv6-only VMs. + // If this option is used, the nat64_subnetworks field must be specified. + SourceSubnetworkIpRangesToNat64 string `json:"sourceSubnetworkIpRangesToNat64,omitempty"` // Subnetworks: A list of Subnetwork resources whose traffic should be // translated by NAT Gateway. It is used only when LIST_OF_SUBNETWORKS is // selected for the SubnetworkIpRangeToNatOption above. @@ -42597,6 +42990,28 @@ func (s RouterNatSubnetworkToNat) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// RouterNatSubnetworkToNat64: Specifies a subnetwork to enable NAT64. +type RouterNatSubnetworkToNat64 struct { + // Name: URL for the subnetwork resource that will use NAT64. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RouterNatSubnetworkToNat64) MarshalJSON() ([]byte, error) { + type NoMethod RouterNatSubnetworkToNat64 + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type RouterStatus struct { // BestRoutes: A list of the best dynamic routes for this Cloud Router's // Virtual Private Cloud (VPC) network in the same region as this Cloud Router. @@ -42934,6 +43349,8 @@ type RoutersListBgpRoutesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43092,6 +43509,8 @@ type RoutersListRoutePoliciesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43255,6 +43674,8 @@ type RoutersScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43574,7 +43995,8 @@ type Scheduling struct { // AvailabilityDomain: Specifies the availability domain to place the instance // in. The value must be a number between 1 and the number of availability // domains specified in the spread placement policy attached to the instance. - AvailabilityDomain int64 `json:"availabilityDomain,omitempty"` + AvailabilityDomain int64 `json:"availabilityDomain,omitempty"` + GracefulShutdown *SchedulingGracefulShutdown `json:"gracefulShutdown,omitempty"` // HostErrorTimeoutSeconds: Specify the time in seconds for host error // detection, the value must be within the range of [90, 330] with the // increment of 30, if unset, the default behavior of host error recovery will @@ -43655,6 +44077,8 @@ type Scheduling struct { // ProvisioningModel: Specifies the provisioning model of the instance. // // Possible values: + // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which + // it is provisioned. // "SPOT" - Heavily discounted, no guaranteed runtime. // "STANDARD" - Standard provisioning with user controlled runtime, no // discounts. @@ -43681,6 +44105,33 @@ func (s Scheduling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// SchedulingGracefulShutdown: The configuration for gracefully shutting down +// the instance. +type SchedulingGracefulShutdown struct { + // Enabled: Opts-in for graceful shutdown. + Enabled bool `json:"enabled,omitempty"` + // MaxDuration: The time allotted for the instance to gracefully shut down. If + // the graceful shutdown isn't complete after this time, then the instance + // transitions to the STOPPING state. + MaxDuration *Duration `json:"maxDuration,omitempty"` + // ForceSendFields is a list of field names (e.g. "Enabled") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Enabled") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s SchedulingGracefulShutdown) MarshalJSON() ([]byte, error) { + type NoMethod SchedulingGracefulShutdown + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // SchedulingNodeAffinity: Node Affinity: the configuration of desired nodes // onto which this Instance could be scheduled. type SchedulingNodeAffinity struct { @@ -43857,6 +44308,8 @@ type SecurityPoliciesAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -44019,6 +44472,8 @@ type SecurityPoliciesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -44454,6 +44909,10 @@ type SecurityPolicyAdvancedOptionsConfig struct { // "NORMAL" // "VERBOSE" LogLevel string `json:"logLevel,omitempty"` + // RequestBodyInspectionSize: The maximum request size chosen by the customer + // with Waf enabled. Currently only "8KB" and "128KB" are supported. Values are + // case insensitive. + RequestBodyInspectionSize string `json:"requestBodyInspectionSize,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"` @@ -44646,6 +45105,8 @@ type SecurityPolicyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -45284,7 +45745,9 @@ type SecurityPolicyRuleRateLimitOptions struct { // defaults to ALL. - USER_IP: The IP address of the originating client, which // is resolved based on "userIpRequestHeaders" configured with the security // policy. If there is no "userIpRequestHeaders" configuration or an IP address - // cannot be resolved from it, the key type defaults to IP. + // cannot be resolved from it, the key type defaults to IP. - + // TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client connects using + // HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. // // Possible values: // "ALL" @@ -45296,6 +45759,7 @@ type SecurityPolicyRuleRateLimitOptions struct { // "REGION_CODE" // "SNI" // "TLS_JA3_FINGERPRINT" + // "TLS_JA4_FINGERPRINT" // "USER_IP" // "XFF_IP" EnforceOnKey string `json:"enforceOnKey,omitempty"` @@ -45374,7 +45838,9 @@ type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { // USER_IP: The IP address of the originating client, which is resolved based // on "userIpRequestHeaders" configured with the security policy. If there is // no "userIpRequestHeaders" configuration or an IP address cannot be resolved - // from it, the key type defaults to IP. + // from it, the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL + // fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not + // available, the key type defaults to ALL. // // Possible values: // "ALL" @@ -45386,6 +45852,7 @@ type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { // "REGION_CODE" // "SNI" // "TLS_JA3_FINGERPRINT" + // "TLS_JA4_FINGERPRINT" // "USER_IP" // "XFF_IP" EnforceOnKeyType string `json:"enforceOnKeyType,omitempty"` @@ -45866,6 +46333,8 @@ type ServiceAttachmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -46088,6 +46557,8 @@ type ServiceAttachmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -46268,6 +46739,8 @@ type ServiceAttachmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -46977,6 +47450,8 @@ type SnapshotListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -47452,6 +47927,8 @@ type SslCertificateAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -47605,6 +48082,8 @@ type SslCertificateListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -47822,6 +48301,8 @@ type SslCertificatesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -47979,6 +48460,8 @@ type SslPoliciesAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -48132,6 +48615,8 @@ type SslPoliciesListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -48294,6 +48779,8 @@ type SslPoliciesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -48498,6 +48985,8 @@ type SslPolicyWarnings struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -48931,6 +49420,8 @@ type StoragePoolAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49141,6 +49632,8 @@ type StoragePoolListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49298,6 +49791,8 @@ type StoragePoolListDisksWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49571,6 +50066,8 @@ type StoragePoolTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49725,6 +50222,8 @@ type StoragePoolTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49865,6 +50364,8 @@ type StoragePoolTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -50004,6 +50505,8 @@ type StoragePoolsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -50152,6 +50655,16 @@ type Subnetwork struct { // ranges list. The range can be expanded after creation using // expandIpCidrRange. IpCidrRange string `json:"ipCidrRange,omitempty"` + // IpCollection: Reference to the source of IP, like a PublicDelegatedPrefix + // (PDP) for BYOIP. The PDP must be a sub-PDP in + // EXTERNAL_IPV6_SUBNETWORK_CREATION mode. Use one of the following formats to + // specify a sub-PDP when creating a dual stack subnetwork with external access + // using BYOIP: - Full resource URL, as in + // https://www.googleapis.com/compute/v1/projects/projectId/regions/region + // /publicDelegatedPrefixes/sub-pdp-name - Partial URL, as in - + // projects/projectId/regions/region/publicDelegatedPrefixes/ sub-pdp-name - + // regions/region/publicDelegatedPrefixes/sub-pdp-name + IpCollection string `json:"ipCollection,omitempty"` // Ipv6AccessType: The access type of IPv6 address this subnet holds. It's // immutable and can only be specified during creation or the first time the // subnet is updated into IPV4_IPV6 dual stack. @@ -50164,6 +50677,19 @@ type Subnetwork struct { Ipv6AccessType string `json:"ipv6AccessType,omitempty"` // Ipv6CidrRange: [Output Only] This field is for internal use. Ipv6CidrRange string `json:"ipv6CidrRange,omitempty"` + // Ipv6GceEndpoint: [Output Only] Possible endpoints of this subnetwork. It can + // be one of the following: - VM_ONLY: The subnetwork can be used for creating + // instances and IPv6 addresses with VM endpoint type. Such a subnetwork gets + // external IPv6 ranges from a public delegated prefix and cannot be used to + // create NetLb. - VM_AND_FR: The subnetwork can be used for creating both VM + // instances and Forwarding Rules. It can also be used to reserve IPv6 + // addresses with both VM and FR endpoint types. Such a subnetwork gets its + // IPv6 range from Google IP Pool directly. + // + // Possible values: + // "VM_AND_FR" + // "VM_ONLY" + Ipv6GceEndpoint string `json:"ipv6GceEndpoint,omitempty"` // Kind: [Output Only] Type of the resource. Always compute#subnetwork for // Subnetwork resources. Kind string `json:"kind,omitempty"` @@ -50198,14 +50724,16 @@ type Subnetwork struct { // VMs in this subnet to Google services. PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` // Purpose: The purpose of the resource. This field can be either PRIVATE, - // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or - // PRIVATE is the default purpose for user-created subnets or subnets that are - // automatically created in auto mode networks. Subnets with purpose set to - // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks - // that are reserved for Envoy-based load balancers. A subnet with purpose set - // to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service - // Connect. If unspecified, the subnet purpose defaults to PRIVATE. The - // enableFlowLogs field isn't supported if the subnet purpose field is set to + // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or + // PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created + // subnets or subnets that are automatically created in auto mode networks. + // Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY + // are user-created subnetworks that are reserved for Envoy-based load + // balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to + // publish services using Private Service Connect. A subnet with purpose set to + // PEER_MIGRATION is used for subnet migration from one peered VPC to another. + // If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs + // field isn't supported if the subnet purpose field is set to // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. // // Possible values: @@ -50214,6 +50742,9 @@ type Subnetwork struct { // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal HTTP(S) Load // Balancing. This is a legacy purpose, please use REGIONAL_MANAGED_PROXY // instead. + // "PEER_MIGRATION" - Subnetwork will be used for Migration from one peered + // VPC to another. (a transient state of subnetwork while migrating resources + // from one project to another). // "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. @@ -50379,6 +50910,8 @@ type SubnetworkAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -50533,6 +51066,8 @@ type SubnetworkListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -50806,6 +51341,8 @@ type SubnetworksScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -51198,6 +51735,8 @@ type TargetGrpcProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -51337,6 +51876,8 @@ type TargetHttpProxiesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -51590,6 +52131,8 @@ type TargetHttpProxyAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -51744,6 +52287,8 @@ type TargetHttpProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -51883,6 +52428,8 @@ type TargetHttpsProxiesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -52029,14 +52576,14 @@ func (s TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, erro // Engine has two Target HTTPS Proxy resources: * Global // (/compute/docs/reference/rest/beta/targetHttpsProxies) * Regional // (/compute/docs/reference/rest/beta/regionTargetHttpsProxies) A target HTTPS -// proxy is a component of GCP HTTPS load balancers. * targetHttpProxies are -// used by global external Application Load Balancers, classic Application Load -// Balancers, cross-region internal Application Load Balancers, and Traffic -// Director. * regionTargetHttpProxies are used by regional internal -// Application Load Balancers and regional external Application Load Balancers. -// Forwarding rules reference a target HTTPS proxy, and the target proxy then -// references a URL map. For more information, read Using Target Proxies and -// Forwarding rule concepts. +// proxy is a component of Google Cloud HTTPS load balancers. * +// targetHttpProxies are used by global external Application Load Balancers, +// classic Application Load Balancers, cross-region internal Application Load +// Balancers, and Traffic Director. * regionTargetHttpProxies are used by +// regional internal Application Load Balancers and regional external +// Application Load Balancers. Forwarding rules reference a target HTTPS proxy, +// and the target proxy then references a URL map. For more information, read +// Using Target Proxies and Forwarding rule concepts. type TargetHttpsProxy struct { // Authentication: [Deprecated] Use serverTlsPolicy instead. Authentication string `json:"authentication,omitempty"` @@ -52193,6 +52740,12 @@ type TargetHttpsProxy struct { // included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) // without query parameters. Requests that send Early Data with non-idempotent // HTTP methods or with query parameters will be rejected with a HTTP 425. + // "UNRESTRICTED" - This enables TLS 1.3 Early Data for requests with any + // HTTP method including non-idempotent methods list POST. This mode does not + // enforce any other limitations. This may be valuable for gRPC use cases. + // However, we do not recommend this method unless you have evaluated your + // security stance and mitigated the risk of replay attacks using other + // mechanisms. TlsEarlyData string `json:"tlsEarlyData,omitempty"` // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource that // defines the mapping from URL to the BackendService. For example, the @@ -52310,6 +52863,8 @@ type TargetHttpsProxyAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -52464,6 +53019,8 @@ type TargetHttpsProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -52692,6 +53249,8 @@ type TargetInstanceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -52845,6 +53404,8 @@ type TargetInstanceListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -52984,6 +53545,8 @@ type TargetInstancesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -53276,6 +53839,8 @@ type TargetPoolAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -53456,6 +54021,8 @@ type TargetPoolListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -53689,6 +54256,8 @@ type TargetPoolsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -54029,6 +54598,8 @@ type TargetSslProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -54168,6 +54739,8 @@ type TargetTcpProxiesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -54440,6 +55013,8 @@ type TargetTcpProxyAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -54593,6 +55168,8 @@ type TargetTcpProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -54831,6 +55408,8 @@ type TargetVpnGatewayAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -54985,6 +55564,8 @@ type TargetVpnGatewayListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -55125,6 +55706,8 @@ type TargetVpnGatewaysScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -55395,31 +55978,27 @@ type UrlMap struct { // DefaultRouteAction: defaultRouteAction takes effect when none of the // hostRules match. The load balancer performs advanced routing actions, such // as URL rewrites and header transformations, before forwarding the request to - // the selected backend. If defaultRouteAction specifies any - // weightedBackendServices, defaultService must not be set. Conversely if - // defaultService is set, defaultRouteAction cannot contain any - // weightedBackendServices. Only one of defaultRouteAction or - // defaultUrlRedirect must be set. URL maps for classic Application Load - // Balancers only support the urlRewrite action within defaultRouteAction. - // defaultRouteAction has no effect when the URL map is bound to a target gRPC - // proxy that has the validateForProxyless field set to true. + // the selected backend. Only one of defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. URL maps for classic + // Application Load Balancers only support the urlRewrite action within + // defaultRouteAction. defaultRouteAction has no effect when the URL map is + // bound to a target gRPC proxy that has the validateForProxyless field set to + // true. DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` // DefaultService: The full or partial URL of the defaultService resource to // which traffic is directed if none of the hostRules match. If // defaultRouteAction is also specified, advanced routing actions, such as URL - // rewrites, take effect before sending the request to the backend. However, if - // defaultService is specified, defaultRouteAction cannot contain any - // defaultRouteAction.weightedBackendServices. Conversely, if - // defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, - // defaultService must not be specified. If defaultService is specified, then - // set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService - // Don't set both. defaultService has no effect when the URL map is bound to a - // target gRPC proxy that has the validateForProxyless field set to true. + // rewrites, take effect before sending the request to the backend. Only one of + // defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. defaultService has no + // effect when the URL map is bound to a target gRPC proxy that has the + // validateForProxyless field set to true. DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified hostRules match, the request - // is redirected to a URL specified by defaultUrlRedirect. If - // defaultUrlRedirect is specified, defaultService or defaultRouteAction must - // not be set. Not supported when the URL map is bound to a target gRPC proxy. + // is redirected to a URL specified by defaultUrlRedirect. Only one of + // defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. Not supported when the + // URL map is bound to a target gRPC proxy. DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` // Description: An optional description of this resource. Provide this property // when you create the resource. @@ -55575,6 +56154,8 @@ type UrlMapListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -55855,6 +56436,8 @@ type UrlMapsAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -55994,6 +56577,8 @@ type UrlMapsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -56196,14 +56781,16 @@ type UsableSubnetwork struct { // Network: Network URL. Network string `json:"network,omitempty"` // Purpose: The purpose of the resource. This field can be either PRIVATE, - // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or - // PRIVATE is the default purpose for user-created subnets or subnets that are - // automatically created in auto mode networks. Subnets with purpose set to - // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks - // that are reserved for Envoy-based load balancers. A subnet with purpose set - // to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service - // Connect. If unspecified, the subnet purpose defaults to PRIVATE. The - // enableFlowLogs field isn't supported if the subnet purpose field is set to + // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or + // PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created + // subnets or subnets that are automatically created in auto mode networks. + // Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY + // are user-created subnetworks that are reserved for Envoy-based load + // balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to + // publish services using Private Service Connect. A subnet with purpose set to + // PEER_MIGRATION is used for subnet migration from one peered VPC to another. + // If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs + // field isn't supported if the subnet purpose field is set to // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. // // Possible values: @@ -56212,6 +56799,9 @@ type UsableSubnetwork struct { // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal HTTP(S) Load // Balancing. This is a legacy purpose, please use REGIONAL_MANAGED_PROXY // instead. + // "PEER_MIGRATION" - Subnetwork will be used for Migration from one peered + // VPC to another. (a transient state of subnetwork while migrating resources + // from one project to another). // "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. @@ -56384,6 +56974,8 @@ type UsableSubnetworksAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -56684,6 +57276,8 @@ type VmEndpointNatMappingsListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -56926,6 +57520,8 @@ type VpnGatewayAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -57080,6 +57676,8 @@ type VpnGatewayListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -57413,6 +58011,8 @@ type VpnGatewaysScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -57725,6 +58325,8 @@ type VpnTunnelAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -57879,6 +58481,8 @@ type VpnTunnelListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -58018,6 +58622,8 @@ type VpnTunnelsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -58275,6 +58881,8 @@ type XpnHostListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -58513,6 +59121,8 @@ type ZoneListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is diff --git a/compute/v0.beta/compute2-gen.go b/compute/v0.beta/compute2-gen.go index 43552a0171e..7a9062e4b49 100644 --- a/compute/v0.beta/compute2-gen.go +++ b/compute/v0.beta/compute2-gen.go @@ -5072,6 +5072,119 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi return ret, nil } +type BackendServicesGetEffectiveSecurityPoliciesCall struct { + s *Service + project string + backendService string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetEffectiveSecurityPolicies: Returns effective security policies applied to +// this backend service. +// +// - backendService: Name of the Backend Service for this request. +// - project: Project ID for this request. +func (r *BackendServicesService) GetEffectiveSecurityPolicies(project string, backendService string) *BackendServicesGetEffectiveSecurityPoliciesCall { + c := &BackendServicesGetEffectiveSecurityPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.backendService = backendService + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Fields(s ...googleapi.Field) *BackendServicesGetEffectiveSecurityPoliciesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) IfNoneMatch(entityTag string) *BackendServicesGetEffectiveSecurityPoliciesCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Context(ctx context.Context) *BackendServicesGetEffectiveSecurityPoliciesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "backendService": c.backendService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.backendServices.getEffectiveSecurityPolicies" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServicesGetEffectiveSecurityPoliciesResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Do(opts ...googleapi.CallOption) (*BackendServicesGetEffectiveSecurityPoliciesResponse, 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 := &BackendServicesGetEffectiveSecurityPoliciesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type BackendServicesGetHealthCall struct { s *Service project string @@ -33670,6 +33783,13 @@ func (r *InstancesService) Delete(project string, zone string, instance string) return c } +// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": If set +// to true, Graceful Shutdown is skipped. +func (c *InstancesDeleteCall) NoGracefulShutdown(noGracefulShutdown bool) *InstancesDeleteCall { + c.urlParams_.Set("noGracefulShutdown", fmt.Sprint(noGracefulShutdown)) + return c +} + // RequestId sets the optional parameter "requestId": An optional 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 @@ -34793,7 +34913,9 @@ func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialP // adjusted start position is returned as the `start` property value. You can // also provide a negative start position, which translates to the most recent // number of bytes written to the serial port. For example, -3 is interpreted -// as the most recent 3 bytes written to the serial console. +// as the most recent 3 bytes written to the serial console. Note that the +// negative start is bounded by the retained buffer size, and the returned +// serial console output will not exceed the max buffer size. func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall { c.urlParams_.Set("start", fmt.Sprint(start)) return c @@ -38681,6 +38803,13 @@ func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStop return c } +// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": If set +// to true, Graceful Shutdown is skipped. +func (c *InstancesStopCall) NoGracefulShutdown(noGracefulShutdown bool) *InstancesStopCall { + c.urlParams_.Set("noGracefulShutdown", fmt.Sprint(noGracefulShutdown)) + return c +} + // RequestId sets the optional parameter "requestId": An optional 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 diff --git a/compute/v0.beta/compute3-gen.go b/compute/v0.beta/compute3-gen.go index 72c3d901b74..1de0a863fc9 100644 --- a/compute/v0.beta/compute3-gen.go +++ b/compute/v0.beta/compute3-gen.go @@ -20131,6 +20131,131 @@ func (c *RegionSecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) return ret, nil } +type RegionSecurityPoliciesSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLabels: Sets the labels on a security policy. To learn more about labels, +// read the Labeling Resources documentation. +// +// - project: Project ID for this request. +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionSecurityPoliciesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionSecurityPoliciesSetLabelsCall { + c := &RegionSecurityPoliciesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionSecurityPoliciesSetLabelsCall) RequestId(requestId string) *RegionSecurityPoliciesSetLabelsCall { + 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 +// details. +func (c *RegionSecurityPoliciesSetLabelsCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesSetLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionSecurityPoliciesSetLabelsCall) Context(ctx context.Context) *RegionSecurityPoliciesSetLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionSecurityPoliciesSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.setLabels" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionSecurityPoliciesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type RegionSslCertificatesDeleteCall struct { s *Service project string diff --git a/eventarc/v1/eventarc-api.json b/eventarc/v1/eventarc-api.json index 687f970746b..a2baddb086b 100644 --- a/eventarc/v1/eventarc-api.json +++ b/eventarc/v1/eventarc-api.json @@ -1445,7 +1445,7 @@ "type": "string" }, "parent": { - "description": "Required. The parent collection to list triggers on.", + "description": "Required. The parent collection to list message buses on.", "location": "path", "pattern": "^projects/[^/]+/locations/[^/]+$", "required": true, @@ -2369,7 +2369,7 @@ } } }, - "revision": "20241119", + "revision": "20241203", "rootUrl": "https://eventarc.googleapis.com/", "schemas": { "AuditConfig": { @@ -2974,7 +2974,7 @@ "id": "GoogleCloudEventarcV1PipelineDestinationHttpEndpoint", "properties": { "messageBindingTemplate": { - "description": "Optional. The CEL expression used to modify how the destination-bound HTTP request is constructed. If a binding expression is not specified here, the message is treated as a CloudEvent and is mapped to the HTTP request according to the CloudEvent HTTP Protocol Binding Binary Content Mode. In this representation, all fields except the `data` and `datacontenttype` field on the message are mapped to HTTP request headers with a prefix of `ce-`. To construct the HTTP request payload and the value of the content-type HTTP header, the payload format is defined as follows: 1) Use the output_payload_format_type on the Pipeline.Destination if it is set, else: 2) Use the input_payload_format_type on the Pipeline if it is set, else: 3) Treat the payload as opaque binary data. The `data` field of the message is converted to the payload format or left as-is for case 3) and then attached as the payload of the HTTP request. The `content-type` header on the HTTP request is set to the payload format type or left empty for case 3). However, if a mediation has updated the `datacontenttype` field on the message so that it is not the same as the payload format type but it is still a prefix of the payload format type, then the `content-type` header on the HTTP request is set to this `datacontenttype` value. For example, if the `datacontenttype` is \"application/json\" and the payload format type is \"application/json; charset=utf-8\", then the `content-type` header on the HTTP request is set to \"application/json; charset=utf-8\". If a non-empty binding expression is specified then this expression is used to modify the default CloudEvent HTTP Protocol Binding Binary Content representation. The result of the CEL expression must be a map of key/value pairs which is used as follows: - If a map named `headers` exists on the result of the expression, then its key/value pairs are directly mapped to the HTTP request headers. The headers values are constructed from the corresponding value type's canonical representation. If the `headers` field doesn't exist then the resulting HTTP request will be the headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message. Note: If the specified binding expression, has updated the `datacontenttype` field on the message so that it is not the same as the payload format type but it is still a prefix of the payload format type, then the `content-type` header in the `headers` map is set to this `datacontenttype` value. - If a field named `body` exists on the result of the expression then its value is directly mapped to the body of the request. If the value of the `body` field is of type bytes or string then it is used for the HTTP request body as-is, with no conversion. If the body field is of any other type then it is converted to a JSON string. If the body field does not exist then the resulting payload of the HTTP request will be data value of the CloudEvent HTTP Binding Binary Content Mode representation of the final message as described earlier. - Any other fields in the resulting expression will be ignored. The CEL expression may access the incoming CloudEvent message in its definition, as follows: - The `data` field of the incoming CloudEvent message can be accessed using the `message.data` value. Subfields of `message.data` may also be accessed if an input_payload_format has been specified on the Pipeline. - Each attribute of the incoming CloudEvent message can be accessed using the `message.` value, where is replaced with the name of the attribute. - Existing headers can be accessed in the CEL expression using the `headers` variable. The `headers` variable defines a map of key/value pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message as described earlier. For example, the following CEL expression can be used to construct an HTTP request by adding an additional header to the HTTP headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message and by overwriting the body of the request: ``` { \"headers\": headers.merge({\"new-header-key\": \"new-header-value\"}), \"body\": \"new-body\" } ``` - The default binding for the message payload can be accessed using the `body` variable. It conatins a string representation of the message payload in the format specified by the `output_payload_format` field. If the `input_payload_format` field is not set, the `body` variable contains the same message payload bytes that were published. Additionally, the following CEL extension functions are provided for use in this CEL expression: - toBase64Url: map.toBase64Url() -\u003e string - Converts a CelValue to a base64url encoded string - toJsonString: map.toJsonString() -\u003e string - Converts a CelValue to a JSON string - merge: map1.merge(map2) -\u003e map3 - Merges the passed CEL map with the existing CEL map the function is applied to. - If the same key exists in both maps, if the key's value is type map both maps are merged else the value from the passed map is used. - denormalize: map.denormalize() -\u003e map - Denormalizes a CEL map such that every value of type map or key in the map is expanded to return a single level map. - The resulting keys are \".\" separated indices of the map keys. - For example: { \"a\": 1, \"b\": { \"c\": 2, \"d\": 3 } \"e\": [4, 5] } .denormalize() -\u003e { \"a\": 1, \"b.c\": 2, \"b.d\": 3, \"e.0\": 4, \"e.1\": 5 } - setField: map.setField(key, value) -\u003e message - Sets the field of the message with the given key to the given value. - If the field is not present it will be added. - If the field is present it will be overwritten. - The key can be a dot separated path to set a field in a nested message. - Key must be of type string. - Value may be any valid type. - removeFields: map.removeFields([key1, key2, ...]) -\u003e message - Removes the fields of the map with the given keys. - The keys can be a dot separated path to remove a field in a nested message. - If a key is not found it will be ignored. - Keys must be of type string. - toMap: [map1, map2, ...].toMap() -\u003e map - Converts a CEL list of CEL maps to a single CEL map - toCloudEventJsonWithPayloadFormat: message.toCloudEventJsonWithPayloadFormat() -\u003e map - Converts a message to the corresponding structure of JSON format for CloudEvents. - It converts `data` to destination payload format specified in `output_payload_format`. If `output_payload_format` is not set, the data will remain unchanged. - It also sets the corresponding datacontenttype of the CloudEvent, as indicated by `output_payload_format`. If no `output_payload_format` is set it will use the value of the \"datacontenttype\" attribute on the CloudEvent if present, else remove \"datacontenttype\" attribute. - This function expects that the content of the message will adhere to the standard CloudEvent format. If it doesn't then this function will fail. - The result is a CEL map that corresponds to the JSON representation of the CloudEvent. To convert that data to a JSON string it can be chained with the toJsonString function. The Pipeline expects that the message it receives adheres to the standard CloudEvent format. If it doesn't then the outgoing message request may fail with a persistent error.", + "description": "Optional. The CEL expression used to modify how the destination-bound HTTP request is constructed. If a binding expression is not specified here, the message is treated as a CloudEvent and is mapped to the HTTP request according to the CloudEvent HTTP Protocol Binding Binary Content Mode (https://github.com/cloudevents/spec/blob/main/cloudevents/bindings/http-protocol-binding.md#31-binary-content-mode). In this representation, all fields except the `data` and `datacontenttype` field on the message are mapped to HTTP request headers with a prefix of `ce-`. To construct the HTTP request payload and the value of the content-type HTTP header, the payload format is defined as follows: 1) Use the output_payload_format_type on the Pipeline.Destination if it is set, else: 2) Use the input_payload_format_type on the Pipeline if it is set, else: 3) Treat the payload as opaque binary data. The `data` field of the message is converted to the payload format or left as-is for case 3) and then attached as the payload of the HTTP request. The `content-type` header on the HTTP request is set to the payload format type or left empty for case 3). However, if a mediation has updated the `datacontenttype` field on the message so that it is not the same as the payload format type but it is still a prefix of the payload format type, then the `content-type` header on the HTTP request is set to this `datacontenttype` value. For example, if the `datacontenttype` is \"application/json\" and the payload format type is \"application/json; charset=utf-8\", then the `content-type` header on the HTTP request is set to \"application/json; charset=utf-8\". If a non-empty binding expression is specified then this expression is used to modify the default CloudEvent HTTP Protocol Binding Binary Content representation. The result of the CEL expression must be a map of key/value pairs which is used as follows: - If a map named `headers` exists on the result of the expression, then its key/value pairs are directly mapped to the HTTP request headers. The headers values are constructed from the corresponding value type's canonical representation. If the `headers` field doesn't exist then the resulting HTTP request will be the headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message. Note: If the specified binding expression, has updated the `datacontenttype` field on the message so that it is not the same as the payload format type but it is still a prefix of the payload format type, then the `content-type` header in the `headers` map is set to this `datacontenttype` value. - If a field named `body` exists on the result of the expression then its value is directly mapped to the body of the request. If the value of the `body` field is of type bytes or string then it is used for the HTTP request body as-is, with no conversion. If the body field is of any other type then it is converted to a JSON string. If the body field does not exist then the resulting payload of the HTTP request will be data value of the CloudEvent HTTP Binding Binary Content Mode representation of the final message as described earlier. - Any other fields in the resulting expression will be ignored. The CEL expression may access the incoming CloudEvent message in its definition, as follows: - The `data` field of the incoming CloudEvent message can be accessed using the `message.data` value. Subfields of `message.data` may also be accessed if an input_payload_format has been specified on the Pipeline. - Each attribute of the incoming CloudEvent message can be accessed using the `message.` value, where is replaced with the name of the attribute. - Existing headers can be accessed in the CEL expression using the `headers` variable. The `headers` variable defines a map of key/value pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message as described earlier. For example, the following CEL expression can be used to construct an HTTP request by adding an additional header to the HTTP headers of the CloudEvent HTTP Binding Binary Content Mode representation of the final message and by overwriting the body of the request: ``` { \"headers\": headers.merge({\"new-header-key\": \"new-header-value\"}), \"body\": \"new-body\" } ``` - The default binding for the message payload can be accessed using the `body` variable. It conatins a string representation of the message payload in the format specified by the `output_payload_format` field. If the `input_payload_format` field is not set, the `body` variable contains the same message payload bytes that were published. Additionally, the following CEL extension functions are provided for use in this CEL expression: - toBase64Url: map.toBase64Url() -\u003e string - Converts a CelValue to a base64url encoded string - toJsonString: map.toJsonString() -\u003e string - Converts a CelValue to a JSON string - merge: map1.merge(map2) -\u003e map3 - Merges the passed CEL map with the existing CEL map the function is applied to. - If the same key exists in both maps, if the key's value is type map both maps are merged else the value from the passed map is used. - denormalize: map.denormalize() -\u003e map - Denormalizes a CEL map such that every value of type map or key in the map is expanded to return a single level map. - The resulting keys are \".\" separated indices of the map keys. - For example: { \"a\": 1, \"b\": { \"c\": 2, \"d\": 3 } \"e\": [4, 5] } .denormalize() -\u003e { \"a\": 1, \"b.c\": 2, \"b.d\": 3, \"e.0\": 4, \"e.1\": 5 } - setField: map.setField(key, value) -\u003e message - Sets the field of the message with the given key to the given value. - If the field is not present it will be added. - If the field is present it will be overwritten. - The key can be a dot separated path to set a field in a nested message. - Key must be of type string. - Value may be any valid type. - removeFields: map.removeFields([key1, key2, ...]) -\u003e message - Removes the fields of the map with the given keys. - The keys can be a dot separated path to remove a field in a nested message. - If a key is not found it will be ignored. - Keys must be of type string. - toMap: [map1, map2, ...].toMap() -\u003e map - Converts a CEL list of CEL maps to a single CEL map - toCloudEventJsonWithPayloadFormat: message.toCloudEventJsonWithPayloadFormat() -\u003e map - Converts a message to the corresponding structure of JSON format for CloudEvents. - It converts `data` to destination payload format specified in `output_payload_format`. If `output_payload_format` is not set, the data will remain unchanged. - It also sets the corresponding datacontenttype of the CloudEvent, as indicated by `output_payload_format`. If no `output_payload_format` is set it will use the value of the \"datacontenttype\" attribute on the CloudEvent if present, else remove \"datacontenttype\" attribute. - This function expects that the content of the message will adhere to the standard CloudEvent format. If it doesn't then this function will fail. - The result is a CEL map that corresponds to the JSON representation of the CloudEvent. To convert that data to a JSON string it can be chained with the toJsonString function. The Pipeline expects that the message it receives adheres to the standard CloudEvent format. If it doesn't then the outgoing message request may fail with a persistent error.", "type": "string" }, "uri": { diff --git a/eventarc/v1/eventarc-gen.go b/eventarc/v1/eventarc-gen.go index d420a030748..9e86e19c9f8 100644 --- a/eventarc/v1/eventarc-gen.go +++ b/eventarc/v1/eventarc-gen.go @@ -1167,14 +1167,16 @@ type GoogleCloudEventarcV1PipelineDestinationHttpEndpoint struct { // destination-bound HTTP request is constructed. If a binding expression is // not specified here, the message is treated as a CloudEvent and is mapped to // the HTTP request according to the CloudEvent HTTP Protocol Binding Binary - // Content Mode. In this representation, all fields except the `data` and - // `datacontenttype` field on the message are mapped to HTTP request headers - // with a prefix of `ce-`. To construct the HTTP request payload and the value - // of the content-type HTTP header, the payload format is defined as follows: - // 1) Use the output_payload_format_type on the Pipeline.Destination if it is - // set, else: 2) Use the input_payload_format_type on the Pipeline if it is - // set, else: 3) Treat the payload as opaque binary data. The `data` field of - // the message is converted to the payload format or left as-is for case 3) and + // Content Mode + // (https://github.com/cloudevents/spec/blob/main/cloudevents/bindings/http-protocol-binding.md#31-binary-content-mode). + // In this representation, all fields except the `data` and `datacontenttype` + // field on the message are mapped to HTTP request headers with a prefix of + // `ce-`. To construct the HTTP request payload and the value of the + // content-type HTTP header, the payload format is defined as follows: 1) Use + // the output_payload_format_type on the Pipeline.Destination if it is set, + // else: 2) Use the input_payload_format_type on the Pipeline if it is set, + // else: 3) Treat the payload as opaque binary data. The `data` field of the + // message is converted to the payload format or left as-is for case 3) and // then attached as the payload of the HTTP request. The `content-type` header // on the HTTP request is set to the payload format type or left empty for case // 3). However, if a mediation has updated the `datacontenttype` field on the @@ -7326,7 +7328,7 @@ type ProjectsLocationsMessageBusesListCall struct { // List: List message buses. // -// - parent: The parent collection to list triggers on. +// - parent: The parent collection to list message buses on. func (r *ProjectsLocationsMessageBusesService) List(parent string) *ProjectsLocationsMessageBusesListCall { c := &ProjectsLocationsMessageBusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.parent = parent diff --git a/netapp/v1/netapp-api.json b/netapp/v1/netapp-api.json index 912d4081d0f..08490dbc1c2 100644 --- a/netapp/v1/netapp-api.json +++ b/netapp/v1/netapp-api.json @@ -1073,7 +1073,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "netapp.projects.locations.operations.cancel", @@ -1385,6 +1385,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "validateDirectoryService": { + "description": "ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/storagePools/{storagePoolsId}:validateDirectoryService", + "httpMethod": "POST", + "id": "netapp.projects.locations.storagePools.validateDirectoryService", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the storage pool", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/storagePools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:validateDirectoryService", + "request": { + "$ref": "ValidateDirectoryServiceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1588,173 +1616,6 @@ } }, "resources": { - "quotaRules": { - "methods": { - "create": { - "description": "Creates a new quota rule.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules", - "httpMethod": "POST", - "id": "netapp.projects.locations.volumes.quotaRules.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Parent value for CreateQuotaRuleRequest", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", - "required": true, - "type": "string" - }, - "quotaRuleId": { - "description": "Required. ID of the quota rule to create. Must be unique within the parent resource. Must contain only letters, numbers, underscore and hyphen, with the first character a letter or underscore, the last a letter or underscore or a number, and a 63 character maximum.", - "location": "query", - "type": "string" - } - }, - "path": "v1/{+parent}/quotaRules", - "request": { - "$ref": "QuotaRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a quota rule.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", - "httpMethod": "DELETE", - "id": "netapp.projects.locations.volumes.quotaRules.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the quota rule.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Returns details of the specified quota rule.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", - "httpMethod": "GET", - "id": "netapp.projects.locations.volumes.quotaRules.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the quota rule", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+name}", - "response": { - "$ref": "QuotaRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Returns list of all quota rules in a location.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules", - "httpMethod": "GET", - "id": "netapp.projects.locations.volumes.quotaRules.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. Filtering results", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Hint for how to order the results", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A token identifying a page of results the server should return.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. Parent value for ListQuotaRulesRequest", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1/{+parent}/quotaRules", - "response": { - "$ref": "ListQuotaRulesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates a quota rule.", - "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", - "httpMethod": "PATCH", - "id": "netapp.projects.locations.volumes.quotaRules.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. The resource name of the active directory. Format: `projects/{project_number}/locations/{location_id}/quotaRules/{quota_rule_id}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the Quota Rule 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": "QuotaRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, "replications": { "methods": { "create": { @@ -2236,7 +2097,7 @@ } } }, - "revision": "20241106", + "revision": "20241203", "rootUrl": "https://netapp.googleapis.com/", "schemas": { "ActiveDirectory": { @@ -2651,6 +2512,10 @@ "description": "Required. Existing destination StoragePool name.", "type": "string" }, + "tieringPolicy": { + "$ref": "TieringPolicy", + "description": "Optional. Tiering policy for the volume." + }, "volumeId": { "description": "Desired destination volume resource id. If not specified, source volume's resource id will be used. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.", "type": "string" @@ -3037,31 +2902,6 @@ }, "type": "object" }, - "ListQuotaRulesResponse": { - "description": "ListQuotaRulesResponse is the response to a ListQuotaRulesRequest.", - "id": "ListQuotaRulesResponse", - "properties": { - "nextPageToken": { - "description": "A token identifying a page of results the server should return.", - "type": "string" - }, - "quotaRules": { - "description": "List of quota rules", - "items": { - "$ref": "QuotaRule" - }, - "type": "array" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "ListReplicationsResponse": { "description": "ListReplicationsResponse is the result of ListReplicationsRequest.", "id": "ListReplicationsResponse", @@ -3365,87 +3205,6 @@ }, "type": "object" }, - "QuotaRule": { - "description": "QuotaRule specifies the maximum disk space a user or group can use within a volume. They can be used for creating default and individual quota rules.", - "id": "QuotaRule", - "properties": { - "createTime": { - "description": "Output only. Create time of the quota rule", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. Description of the quota rule", - "type": "string" - }, - "diskLimitMib": { - "description": "Required. The maximum allowed disk space in MiB.", - "format": "int32", - "type": "integer" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Labels of the quota rule", - "type": "object" - }, - "name": { - "description": "Identifier. The resource name of the active directory. Format: `projects/{project_number}/locations/{location_id}/quotaRules/{quota_rule_id}`.", - "type": "string" - }, - "state": { - "description": "Output only. State of the quota rule", - "enum": [ - "STATE_UNSPECIFIED", - "CREATING", - "UPDATING", - "DELETING", - "READY", - "ERROR" - ], - "enumDescriptions": [ - "Unspecified state for quota rule", - "Quota rule is creating", - "Quota rule is updating", - "Quota rule is deleting", - "Quota rule is ready", - "Quota rule is in error state." - ], - "readOnly": true, - "type": "string" - }, - "stateDetails": { - "description": "Output only. State details of the quota rule", - "readOnly": true, - "type": "string" - }, - "target": { - "description": "Optional. The quota rule applies to the specified user or group, identified by a Unix UID/GID, Windows SID, or null for default.", - "type": "string" - }, - "type": { - "description": "Required. The type of quota rule.", - "enum": [ - "TYPE_UNSPECIFIED", - "INDIVIDUAL_USER_QUOTA", - "INDIVIDUAL_GROUP_QUOTA", - "DEFAULT_USER_QUOTA", - "DEFAULT_GROUP_QUOTA" - ], - "enumDescriptions": [ - "Unspecified type for quota rule", - "Individual user quota rule", - "Individual group quota rule", - "Default user quota rule", - "Default group quota rule" - ], - "type": "string" - } - }, - "type": "object" - }, "Replication": { "description": "Replication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.", "id": "Replication", @@ -4063,6 +3822,25 @@ }, "type": "object" }, + "ValidateDirectoryServiceRequest": { + "description": "ValidateDirectoryServiceRequest validates the directory service policy attached to the storage pool.", + "id": "ValidateDirectoryServiceRequest", + "properties": { + "directoryServiceType": { + "description": "Type of directory service policy attached to the storage pool.", + "enum": [ + "DIRECTORY_SERVICE_TYPE_UNSPECIFIED", + "ACTIVE_DIRECTORY" + ], + "enumDescriptions": [ + "Directory service type is not specified.", + "Active directory policy attached to the storage pool." + ], + "type": "string" + } + }, + "type": "object" + }, "VerifyKmsConfigRequest": { "description": "VerifyKmsConfigRequest specifies the KMS config to be validated.", "id": "VerifyKmsConfigRequest", diff --git a/netapp/v1/netapp-gen.go b/netapp/v1/netapp-gen.go index 11aa52af2ec..0e63955575e 100644 --- a/netapp/v1/netapp-gen.go +++ b/netapp/v1/netapp-gen.go @@ -264,7 +264,6 @@ type ProjectsLocationsStoragePoolsService struct { func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesService { rs := &ProjectsLocationsVolumesService{s: s} - rs.QuotaRules = NewProjectsLocationsVolumesQuotaRulesService(s) rs.Replications = NewProjectsLocationsVolumesReplicationsService(s) rs.Snapshots = NewProjectsLocationsVolumesSnapshotsService(s) return rs @@ -273,22 +272,11 @@ func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesSer type ProjectsLocationsVolumesService struct { s *Service - QuotaRules *ProjectsLocationsVolumesQuotaRulesService - Replications *ProjectsLocationsVolumesReplicationsService Snapshots *ProjectsLocationsVolumesSnapshotsService } -func NewProjectsLocationsVolumesQuotaRulesService(s *Service) *ProjectsLocationsVolumesQuotaRulesService { - rs := &ProjectsLocationsVolumesQuotaRulesService{s: s} - return rs -} - -type ProjectsLocationsVolumesQuotaRulesService struct { - s *Service -} - func NewProjectsLocationsVolumesReplicationsService(s *Service) *ProjectsLocationsVolumesReplicationsService { rs := &ProjectsLocationsVolumesReplicationsService{s: s} return rs @@ -665,6 +653,8 @@ type DestinationVolumeParameters struct { ShareName string `json:"shareName,omitempty"` // StoragePool: Required. Existing destination StoragePool name. StoragePool string `json:"storagePool,omitempty"` + // TieringPolicy: Optional. Tiering policy for the volume. + TieringPolicy *TieringPolicy `json:"tieringPolicy,omitempty"` // VolumeId: Desired destination volume resource id. If not specified, source // volume's resource id will be used. This value must start with a lowercase // letter followed by up to 62 lowercase letters, numbers, or hyphens, and @@ -1149,37 +1139,6 @@ func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListQuotaRulesResponse: ListQuotaRulesResponse is the response to a -// ListQuotaRulesRequest. -type ListQuotaRulesResponse struct { - // NextPageToken: A token identifying a page of results the server should - // return. - NextPageToken string `json:"nextPageToken,omitempty"` - // QuotaRules: List of quota rules - QuotaRules []*QuotaRule `json:"quotaRules,omitempty"` - // Unreachable: Locations that could not be reached. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListQuotaRulesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListQuotaRulesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // ListReplicationsResponse: ListReplicationsResponse is the result of // ListReplicationsRequest. type ListReplicationsResponse struct { @@ -1540,67 +1499,6 @@ func (s OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// QuotaRule: QuotaRule specifies the maximum disk space a user or group can -// use within a volume. They can be used for creating default and individual -// quota rules. -type QuotaRule struct { - // CreateTime: Output only. Create time of the quota rule - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. Description of the quota rule - Description string `json:"description,omitempty"` - // DiskLimitMib: Required. The maximum allowed disk space in MiB. - DiskLimitMib int64 `json:"diskLimitMib,omitempty"` - // Labels: Optional. Labels of the quota rule - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. The resource name of the active directory. Format: - // `projects/{project_number}/locations/{location_id}/quotaRules/{quota_rule_id} - // `. - Name string `json:"name,omitempty"` - // State: Output only. State of the quota rule - // - // Possible values: - // "STATE_UNSPECIFIED" - Unspecified state for quota rule - // "CREATING" - Quota rule is creating - // "UPDATING" - Quota rule is updating - // "DELETING" - Quota rule is deleting - // "READY" - Quota rule is ready - // "ERROR" - Quota rule is in error state. - State string `json:"state,omitempty"` - // StateDetails: Output only. State details of the quota rule - StateDetails string `json:"stateDetails,omitempty"` - // Target: Optional. The quota rule applies to the specified user or group, - // identified by a Unix UID/GID, Windows SID, or null for default. - Target string `json:"target,omitempty"` - // Type: Required. The type of quota rule. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified type for quota rule - // "INDIVIDUAL_USER_QUOTA" - Individual user quota rule - // "INDIVIDUAL_GROUP_QUOTA" - Individual group quota rule - // "DEFAULT_USER_QUOTA" - Default user quota rule - // "DEFAULT_GROUP_QUOTA" - Default group quota rule - 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. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QuotaRule) MarshalJSON() ([]byte, error) { - type NoMethod QuotaRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // Replication: Replication is a nested resource under Volume, that describes a // cross-region replication relationship between 2 volumes in different // regions. @@ -2175,6 +2073,35 @@ func (s TransferStats) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ValidateDirectoryServiceRequest: ValidateDirectoryServiceRequest validates +// the directory service policy attached to the storage pool. +type ValidateDirectoryServiceRequest struct { + // DirectoryServiceType: Type of directory service policy attached to the + // storage pool. + // + // Possible values: + // "DIRECTORY_SERVICE_TYPE_UNSPECIFIED" - Directory service type is not + // specified. + // "ACTIVE_DIRECTORY" - Active directory policy attached to the storage pool. + DirectoryServiceType string `json:"directoryServiceType,omitempty"` + // ForceSendFields is a list of field names (e.g. "DirectoryServiceType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DirectoryServiceType") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ValidateDirectoryServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod ValidateDirectoryServiceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // VerifyKmsConfigRequest: VerifyKmsConfigRequest specifies the KMS config to // be validated. type VerifyKmsConfigRequest struct { @@ -5874,7 +5801,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -7008,6 +6935,108 @@ func (c *ProjectsLocationsStoragePoolsSwitchCall) Do(opts ...googleapi.CallOptio return ret, nil } +type ProjectsLocationsStoragePoolsValidateDirectoryServiceCall struct { + s *Service + name string + validatedirectoryservicerequest *ValidateDirectoryServiceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ValidateDirectoryService: ValidateDirectoryService does a connectivity check +// for a directory service policy attached to the storage pool. +// +// - name: Name of the storage pool. +func (r *ProjectsLocationsStoragePoolsService) ValidateDirectoryService(name string, validatedirectoryservicerequest *ValidateDirectoryServiceRequest) *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall { + c := &ProjectsLocationsStoragePoolsValidateDirectoryServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.validatedirectoryservicerequest = validatedirectoryservicerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.validatedirectoryservicerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:validateDirectoryService") + 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 "netapp.projects.locations.storagePools.validateDirectoryService" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsVolumesCreateCall struct { s *Service parent string @@ -7702,590 +7731,6 @@ func (c *ProjectsLocationsVolumesRevertCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsVolumesQuotaRulesCreateCall struct { - s *Service - parent string - quotarule *QuotaRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new quota rule. -// -// - parent: Parent value for CreateQuotaRuleRequest. -func (r *ProjectsLocationsVolumesQuotaRulesService) Create(parent string, quotarule *QuotaRule) *ProjectsLocationsVolumesQuotaRulesCreateCall { - c := &ProjectsLocationsVolumesQuotaRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.quotarule = quotarule - return c -} - -// QuotaRuleId sets the optional parameter "quotaRuleId": Required. ID of the -// quota rule to create. Must be unique within the parent resource. Must -// contain only letters, numbers, underscore and hyphen, with the first -// character a letter or underscore, the last a letter or underscore or a -// number, and a 63 character maximum. -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) QuotaRuleId(quotaRuleId string) *ProjectsLocationsVolumesQuotaRulesCreateCall { - c.urlParams_.Set("quotaRuleId", quotaRuleId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.quotarule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/quotaRules") - 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 "netapp.projects.locations.volumes.quotaRules.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsVolumesQuotaRulesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a quota rule. -// -// - name: Name of the quota rule. -func (r *ProjectsLocationsVolumesQuotaRulesService) Delete(name string) *ProjectsLocationsVolumesQuotaRulesDeleteCall { - c := &ProjectsLocationsVolumesQuotaRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "netapp.projects.locations.volumes.quotaRules.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsVolumesQuotaRulesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns details of the specified quota rule. -// -// - name: Name of the quota rule. -func (r *ProjectsLocationsVolumesQuotaRulesService) Get(name string) *ProjectsLocationsVolumesQuotaRulesGetCall { - c := &ProjectsLocationsVolumesQuotaRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesQuotaRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "netapp.projects.locations.volumes.quotaRules.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *QuotaRule.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Do(opts ...googleapi.CallOption) (*QuotaRule, 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 := &QuotaRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsVolumesQuotaRulesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns list of all quota rules in a location. -// -// - parent: Parent value for ListQuotaRulesRequest. -func (r *ProjectsLocationsVolumesQuotaRulesService) List(parent string) *ProjectsLocationsVolumesQuotaRulesListCall { - c := &ProjectsLocationsVolumesQuotaRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Filter(filter string) *ProjectsLocationsVolumesQuotaRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint for how to order the -// results -func (c *ProjectsLocationsVolumesQuotaRulesListCall) OrderBy(orderBy string) *ProjectsLocationsVolumesQuotaRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. Server -// may return fewer items than requested. If unspecified, the server will pick -// an appropriate default. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesQuotaRulesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token identifying a -// page of results the server should return. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) PageToken(pageToken string) *ProjectsLocationsVolumesQuotaRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesQuotaRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsVolumesQuotaRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/quotaRules") - 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 "netapp.projects.locations.volumes.quotaRules.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListQuotaRulesResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Do(opts ...googleapi.CallOption) (*ListQuotaRulesResponse, 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 := &ListQuotaRulesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Pages(ctx context.Context, f func(*ListQuotaRulesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsVolumesQuotaRulesPatchCall struct { - s *Service - name string - quotarule *QuotaRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a quota rule. -// -// - name: Identifier. The resource name of the active directory. Format: -// `projects/{project_number}/locations/{location_id}/quotaRules/{quota_rule_i -// d}`. -func (r *ProjectsLocationsVolumesQuotaRulesService) Patch(name string, quotarule *QuotaRule) *ProjectsLocationsVolumesQuotaRulesPatchCall { - c := &ProjectsLocationsVolumesQuotaRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.quotarule = quotarule - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Quota Rule 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 *ProjectsLocationsVolumesQuotaRulesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesQuotaRulesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.quotarule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "netapp.projects.locations.volumes.quotaRules.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - type ProjectsLocationsVolumesReplicationsCreateCall struct { s *Service parent string diff --git a/netapp/v1beta1/netapp-api.json b/netapp/v1beta1/netapp-api.json index b0b584e94fb..da4c5ecffd8 100644 --- a/netapp/v1beta1/netapp-api.json +++ b/netapp/v1beta1/netapp-api.json @@ -1073,7 +1073,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "netapp.projects.locations.operations.cancel", @@ -1385,6 +1385,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "validateDirectoryService": { + "description": "ValidateDirectoryService does a connectivity check for a directory service policy attached to the storage pool.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/storagePools/{storagePoolsId}:validateDirectoryService", + "httpMethod": "POST", + "id": "netapp.projects.locations.storagePools.validateDirectoryService", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Name of the storage pool", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/storagePools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:validateDirectoryService", + "request": { + "$ref": "ValidateDirectoryServiceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -1588,173 +1616,6 @@ } }, "resources": { - "quotaRules": { - "methods": { - "create": { - "description": "Creates a new quota rule.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules", - "httpMethod": "POST", - "id": "netapp.projects.locations.volumes.quotaRules.create", - "parameterOrder": [ - "parent" - ], - "parameters": { - "parent": { - "description": "Required. Parent value for CreateQuotaRuleRequest", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", - "required": true, - "type": "string" - }, - "quotaRuleId": { - "description": "Required. ID of the quota rule to create. Must be unique within the parent resource. Must contain only letters, numbers, underscore and hyphen, with the first character a letter or underscore, the last a letter or underscore or a number, and a 63 character maximum.", - "location": "query", - "type": "string" - } - }, - "path": "v1beta1/{+parent}/quotaRules", - "request": { - "$ref": "QuotaRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "delete": { - "description": "Deletes a quota rule.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", - "httpMethod": "DELETE", - "id": "netapp.projects.locations.volumes.quotaRules.delete", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the quota rule.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "get": { - "description": "Returns details of the specified quota rule.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", - "httpMethod": "GET", - "id": "netapp.projects.locations.volumes.quotaRules.get", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Required. Name of the quota rule", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+name}", - "response": { - "$ref": "QuotaRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "list": { - "description": "Returns list of all quota rules in a location.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules", - "httpMethod": "GET", - "id": "netapp.projects.locations.volumes.quotaRules.list", - "parameterOrder": [ - "parent" - ], - "parameters": { - "filter": { - "description": "Optional. Filtering results", - "location": "query", - "type": "string" - }, - "orderBy": { - "description": "Optional. Hint for how to order the results", - "location": "query", - "type": "string" - }, - "pageSize": { - "description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, the server will pick an appropriate default.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A token identifying a page of results the server should return.", - "location": "query", - "type": "string" - }, - "parent": { - "description": "Required. Parent value for ListQuotaRulesRequest", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+parent}/quotaRules", - "response": { - "$ref": "ListQuotaRulesResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - }, - "patch": { - "description": "Updates a quota rule.", - "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/volumes/{volumesId}/quotaRules/{quotaRulesId}", - "httpMethod": "PATCH", - "id": "netapp.projects.locations.volumes.quotaRules.patch", - "parameterOrder": [ - "name" - ], - "parameters": { - "name": { - "description": "Identifier. The resource name of the active directory. Format: `projects/{project_number}/locations/{location_id}/quotaRules/{quota_rule_id}`.", - "location": "path", - "pattern": "^projects/[^/]+/locations/[^/]+/volumes/[^/]+/quotaRules/[^/]+$", - "required": true, - "type": "string" - }, - "updateMask": { - "description": "Optional. Field mask is used to specify the fields to be overwritten in the Quota Rule 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": "v1beta1/{+name}", - "request": { - "$ref": "QuotaRule" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, "replications": { "methods": { "create": { @@ -2236,7 +2097,7 @@ } } }, - "revision": "20241106", + "revision": "20241203", "rootUrl": "https://netapp.googleapis.com/", "schemas": { "ActiveDirectory": { @@ -2651,6 +2512,10 @@ "description": "Required. Existing destination StoragePool name.", "type": "string" }, + "tieringPolicy": { + "$ref": "TieringPolicy", + "description": "Optional. Tiering policy for the volume." + }, "volumeId": { "description": "Desired destination volume resource id. If not specified, source volume's resource id will be used. This value must start with a lowercase letter followed by up to 62 lowercase letters, numbers, or hyphens, and cannot end with a hyphen.", "type": "string" @@ -3037,31 +2902,6 @@ }, "type": "object" }, - "ListQuotaRulesResponse": { - "description": "ListQuotaRulesResponse is the response to a ListQuotaRulesRequest.", - "id": "ListQuotaRulesResponse", - "properties": { - "nextPageToken": { - "description": "A token identifying a page of results the server should return.", - "type": "string" - }, - "quotaRules": { - "description": "List of quota rules", - "items": { - "$ref": "QuotaRule" - }, - "type": "array" - }, - "unreachable": { - "description": "Locations that could not be reached.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "ListReplicationsResponse": { "description": "ListReplicationsResponse is the result of ListReplicationsRequest.", "id": "ListReplicationsResponse", @@ -3365,87 +3205,6 @@ }, "type": "object" }, - "QuotaRule": { - "description": "QuotaRule specifies the maximum disk space a user or group can use within a volume. They can be used for creating default and individual quota rules.", - "id": "QuotaRule", - "properties": { - "createTime": { - "description": "Output only. Create time of the quota rule", - "format": "google-datetime", - "readOnly": true, - "type": "string" - }, - "description": { - "description": "Optional. Description of the quota rule", - "type": "string" - }, - "diskLimitMib": { - "description": "Required. The maximum allowed disk space in MiB.", - "format": "int32", - "type": "integer" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "Optional. Labels of the quota rule", - "type": "object" - }, - "name": { - "description": "Identifier. The resource name of the active directory. Format: `projects/{project_number}/locations/{location_id}/quotaRules/{quota_rule_id}`.", - "type": "string" - }, - "state": { - "description": "Output only. State of the quota rule", - "enum": [ - "STATE_UNSPECIFIED", - "CREATING", - "UPDATING", - "DELETING", - "READY", - "ERROR" - ], - "enumDescriptions": [ - "Unspecified state for quota rule", - "Quota rule is creating", - "Quota rule is updating", - "Quota rule is deleting", - "Quota rule is ready", - "Quota rule is in error state." - ], - "readOnly": true, - "type": "string" - }, - "stateDetails": { - "description": "Output only. State details of the quota rule", - "readOnly": true, - "type": "string" - }, - "target": { - "description": "Optional. The quota rule applies to the specified user or group, identified by a Unix UID/GID, Windows SID, or null for default.", - "type": "string" - }, - "type": { - "description": "Required. The type of quota rule.", - "enum": [ - "TYPE_UNSPECIFIED", - "INDIVIDUAL_USER_QUOTA", - "INDIVIDUAL_GROUP_QUOTA", - "DEFAULT_USER_QUOTA", - "DEFAULT_GROUP_QUOTA" - ], - "enumDescriptions": [ - "Unspecified type for quota rule", - "Individual user quota rule", - "Individual group quota rule", - "Default user quota rule", - "Default group quota rule" - ], - "type": "string" - } - }, - "type": "object" - }, "Replication": { "description": "Replication is a nested resource under Volume, that describes a cross-region replication relationship between 2 volumes in different regions.", "id": "Replication", @@ -4063,6 +3822,25 @@ }, "type": "object" }, + "ValidateDirectoryServiceRequest": { + "description": "ValidateDirectoryServiceRequest validates the directory service policy attached to the storage pool.", + "id": "ValidateDirectoryServiceRequest", + "properties": { + "directoryServiceType": { + "description": "Type of directory service policy attached to the storage pool.", + "enum": [ + "DIRECTORY_SERVICE_TYPE_UNSPECIFIED", + "ACTIVE_DIRECTORY" + ], + "enumDescriptions": [ + "Directory service type is not specified.", + "Active directory policy attached to the storage pool." + ], + "type": "string" + } + }, + "type": "object" + }, "VerifyKmsConfigRequest": { "description": "VerifyKmsConfigRequest specifies the KMS config to be validated.", "id": "VerifyKmsConfigRequest", diff --git a/netapp/v1beta1/netapp-gen.go b/netapp/v1beta1/netapp-gen.go index 8f8ea268095..07f7890b2c9 100644 --- a/netapp/v1beta1/netapp-gen.go +++ b/netapp/v1beta1/netapp-gen.go @@ -264,7 +264,6 @@ type ProjectsLocationsStoragePoolsService struct { func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesService { rs := &ProjectsLocationsVolumesService{s: s} - rs.QuotaRules = NewProjectsLocationsVolumesQuotaRulesService(s) rs.Replications = NewProjectsLocationsVolumesReplicationsService(s) rs.Snapshots = NewProjectsLocationsVolumesSnapshotsService(s) return rs @@ -273,22 +272,11 @@ func NewProjectsLocationsVolumesService(s *Service) *ProjectsLocationsVolumesSer type ProjectsLocationsVolumesService struct { s *Service - QuotaRules *ProjectsLocationsVolumesQuotaRulesService - Replications *ProjectsLocationsVolumesReplicationsService Snapshots *ProjectsLocationsVolumesSnapshotsService } -func NewProjectsLocationsVolumesQuotaRulesService(s *Service) *ProjectsLocationsVolumesQuotaRulesService { - rs := &ProjectsLocationsVolumesQuotaRulesService{s: s} - return rs -} - -type ProjectsLocationsVolumesQuotaRulesService struct { - s *Service -} - func NewProjectsLocationsVolumesReplicationsService(s *Service) *ProjectsLocationsVolumesReplicationsService { rs := &ProjectsLocationsVolumesReplicationsService{s: s} return rs @@ -665,6 +653,8 @@ type DestinationVolumeParameters struct { ShareName string `json:"shareName,omitempty"` // StoragePool: Required. Existing destination StoragePool name. StoragePool string `json:"storagePool,omitempty"` + // TieringPolicy: Optional. Tiering policy for the volume. + TieringPolicy *TieringPolicy `json:"tieringPolicy,omitempty"` // VolumeId: Desired destination volume resource id. If not specified, source // volume's resource id will be used. This value must start with a lowercase // letter followed by up to 62 lowercase letters, numbers, or hyphens, and @@ -1149,37 +1139,6 @@ func (s ListOperationsResponse) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ListQuotaRulesResponse: ListQuotaRulesResponse is the response to a -// ListQuotaRulesRequest. -type ListQuotaRulesResponse struct { - // NextPageToken: A token identifying a page of results the server should - // return. - NextPageToken string `json:"nextPageToken,omitempty"` - // QuotaRules: List of quota rules - QuotaRules []*QuotaRule `json:"quotaRules,omitempty"` - // Unreachable: Locations that could not be reached. - 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. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ListQuotaRulesResponse) MarshalJSON() ([]byte, error) { - type NoMethod ListQuotaRulesResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // ListReplicationsResponse: ListReplicationsResponse is the result of // ListReplicationsRequest. type ListReplicationsResponse struct { @@ -1540,67 +1499,6 @@ func (s OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// QuotaRule: QuotaRule specifies the maximum disk space a user or group can -// use within a volume. They can be used for creating default and individual -// quota rules. -type QuotaRule struct { - // CreateTime: Output only. Create time of the quota rule - CreateTime string `json:"createTime,omitempty"` - // Description: Optional. Description of the quota rule - Description string `json:"description,omitempty"` - // DiskLimitMib: Required. The maximum allowed disk space in MiB. - DiskLimitMib int64 `json:"diskLimitMib,omitempty"` - // Labels: Optional. Labels of the quota rule - Labels map[string]string `json:"labels,omitempty"` - // Name: Identifier. The resource name of the active directory. Format: - // `projects/{project_number}/locations/{location_id}/quotaRules/{quota_rule_id} - // `. - Name string `json:"name,omitempty"` - // State: Output only. State of the quota rule - // - // Possible values: - // "STATE_UNSPECIFIED" - Unspecified state for quota rule - // "CREATING" - Quota rule is creating - // "UPDATING" - Quota rule is updating - // "DELETING" - Quota rule is deleting - // "READY" - Quota rule is ready - // "ERROR" - Quota rule is in error state. - State string `json:"state,omitempty"` - // StateDetails: Output only. State details of the quota rule - StateDetails string `json:"stateDetails,omitempty"` - // Target: Optional. The quota rule applies to the specified user or group, - // identified by a Unix UID/GID, Windows SID, or null for default. - Target string `json:"target,omitempty"` - // Type: Required. The type of quota rule. - // - // Possible values: - // "TYPE_UNSPECIFIED" - Unspecified type for quota rule - // "INDIVIDUAL_USER_QUOTA" - Individual user quota rule - // "INDIVIDUAL_GROUP_QUOTA" - Individual group quota rule - // "DEFAULT_USER_QUOTA" - Default user quota rule - // "DEFAULT_GROUP_QUOTA" - Default group quota rule - 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. "CreateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CreateTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s QuotaRule) MarshalJSON() ([]byte, error) { - type NoMethod QuotaRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // Replication: Replication is a nested resource under Volume, that describes a // cross-region replication relationship between 2 volumes in different // regions. @@ -2175,6 +2073,35 @@ func (s TransferStats) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// ValidateDirectoryServiceRequest: ValidateDirectoryServiceRequest validates +// the directory service policy attached to the storage pool. +type ValidateDirectoryServiceRequest struct { + // DirectoryServiceType: Type of directory service policy attached to the + // storage pool. + // + // Possible values: + // "DIRECTORY_SERVICE_TYPE_UNSPECIFIED" - Directory service type is not + // specified. + // "ACTIVE_DIRECTORY" - Active directory policy attached to the storage pool. + DirectoryServiceType string `json:"directoryServiceType,omitempty"` + // ForceSendFields is a list of field names (e.g. "DirectoryServiceType") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DirectoryServiceType") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ValidateDirectoryServiceRequest) MarshalJSON() ([]byte, error) { + type NoMethod ValidateDirectoryServiceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // VerifyKmsConfigRequest: VerifyKmsConfigRequest specifies the KMS config to // be validated. type VerifyKmsConfigRequest struct { @@ -5874,7 +5801,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. @@ -7008,6 +6935,108 @@ func (c *ProjectsLocationsStoragePoolsSwitchCall) Do(opts ...googleapi.CallOptio return ret, nil } +type ProjectsLocationsStoragePoolsValidateDirectoryServiceCall struct { + s *Service + name string + validatedirectoryservicerequest *ValidateDirectoryServiceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ValidateDirectoryService: ValidateDirectoryService does a connectivity check +// for a directory service policy attached to the storage pool. +// +// - name: Name of the storage pool. +func (r *ProjectsLocationsStoragePoolsService) ValidateDirectoryService(name string, validatedirectoryservicerequest *ValidateDirectoryServiceRequest) *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall { + c := &ProjectsLocationsStoragePoolsValidateDirectoryServiceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.validatedirectoryservicerequest = validatedirectoryservicerequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall) Fields(s ...googleapi.Field) *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall) Context(ctx context.Context) *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.validatedirectoryservicerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:validateDirectoryService") + 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 "netapp.projects.locations.storagePools.validateDirectoryService" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsStoragePoolsValidateDirectoryServiceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ProjectsLocationsVolumesCreateCall struct { s *Service parent string @@ -7702,590 +7731,6 @@ func (c *ProjectsLocationsVolumesRevertCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type ProjectsLocationsVolumesQuotaRulesCreateCall struct { - s *Service - parent string - quotarule *QuotaRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new quota rule. -// -// - parent: Parent value for CreateQuotaRuleRequest. -func (r *ProjectsLocationsVolumesQuotaRulesService) Create(parent string, quotarule *QuotaRule) *ProjectsLocationsVolumesQuotaRulesCreateCall { - c := &ProjectsLocationsVolumesQuotaRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.quotarule = quotarule - return c -} - -// QuotaRuleId sets the optional parameter "quotaRuleId": Required. ID of the -// quota rule to create. Must be unique within the parent resource. Must -// contain only letters, numbers, underscore and hyphen, with the first -// character a letter or underscore, the last a letter or underscore or a -// number, and a 63 character maximum. -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) QuotaRuleId(quotaRuleId string) *ProjectsLocationsVolumesQuotaRulesCreateCall { - c.urlParams_.Set("quotaRuleId", quotaRuleId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.quotarule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/quotaRules") - 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 "netapp.projects.locations.volumes.quotaRules.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsVolumesQuotaRulesCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsVolumesQuotaRulesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a quota rule. -// -// - name: Name of the quota rule. -func (r *ProjectsLocationsVolumesQuotaRulesService) Delete(name string) *ProjectsLocationsVolumesQuotaRulesDeleteCall { - c := &ProjectsLocationsVolumesQuotaRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "netapp.projects.locations.volumes.quotaRules.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsVolumesQuotaRulesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsVolumesQuotaRulesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Returns details of the specified quota rule. -// -// - name: Name of the quota rule. -func (r *ProjectsLocationsVolumesQuotaRulesService) Get(name string) *ProjectsLocationsVolumesQuotaRulesGetCall { - c := &ProjectsLocationsVolumesQuotaRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesQuotaRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "netapp.projects.locations.volumes.quotaRules.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *QuotaRule.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsVolumesQuotaRulesGetCall) Do(opts ...googleapi.CallOption) (*QuotaRule, 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 := &QuotaRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsVolumesQuotaRulesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Returns list of all quota rules in a location. -// -// - parent: Parent value for ListQuotaRulesRequest. -func (r *ProjectsLocationsVolumesQuotaRulesService) List(parent string) *ProjectsLocationsVolumesQuotaRulesListCall { - c := &ProjectsLocationsVolumesQuotaRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filtering results -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Filter(filter string) *ProjectsLocationsVolumesQuotaRulesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": Hint for how to order the -// results -func (c *ProjectsLocationsVolumesQuotaRulesListCall) OrderBy(orderBy string) *ProjectsLocationsVolumesQuotaRulesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageSize sets the optional parameter "pageSize": Requested page size. Server -// may return fewer items than requested. If unspecified, the server will pick -// an appropriate default. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) PageSize(pageSize int64) *ProjectsLocationsVolumesQuotaRulesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": A token identifying a -// page of results the server should return. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) PageToken(pageToken string) *ProjectsLocationsVolumesQuotaRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsVolumesQuotaRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsVolumesQuotaRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/quotaRules") - 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 "netapp.projects.locations.volumes.quotaRules.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListQuotaRulesResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Do(opts ...googleapi.CallOption) (*ListQuotaRulesResponse, 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 := &ListQuotaRulesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsVolumesQuotaRulesListCall) Pages(ctx context.Context, f func(*ListQuotaRulesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsVolumesQuotaRulesPatchCall struct { - s *Service - name string - quotarule *QuotaRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a quota rule. -// -// - name: Identifier. The resource name of the active directory. Format: -// `projects/{project_number}/locations/{location_id}/quotaRules/{quota_rule_i -// d}`. -func (r *ProjectsLocationsVolumesQuotaRulesService) Patch(name string, quotarule *QuotaRule) *ProjectsLocationsVolumesQuotaRulesPatchCall { - c := &ProjectsLocationsVolumesQuotaRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.quotarule = quotarule - return c -} - -// UpdateMask sets the optional parameter "updateMask": Field mask is used to -// specify the fields to be overwritten in the Quota Rule 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 *ProjectsLocationsVolumesQuotaRulesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsVolumesQuotaRulesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsVolumesQuotaRulesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Context(ctx context.Context) *ProjectsLocationsVolumesQuotaRulesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.quotarule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "netapp.projects.locations.volumes.quotaRules.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsVolumesQuotaRulesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - type ProjectsLocationsVolumesReplicationsCreateCall struct { s *Service parent string diff --git a/securitycenter/v1/securitycenter-api.json b/securitycenter/v1/securitycenter-api.json index 9bdeea25926..5365c096840 100644 --- a/securitycenter/v1/securitycenter-api.json +++ b/securitycenter/v1/securitycenter-api.json @@ -1971,6 +1971,51 @@ } } }, + "attackPaths": { + "methods": { + "list": { + "description": "Lists the attack paths for a set of simulation results or valued resources and filter.", + "flatPath": "v1/organizations/{organizationsId}/attackPaths", + "httpMethod": "GET", + "id": "securitycenter.organizations.attackPaths.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "The filter expression that filters the attack path in the response. Supported fields: * `valued_resources` supports =", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The value returned by the last `ListAttackPathsResponse`; indicates that this is a continuation of a prior `ListAttackPaths` call, and that the system should return the next page of data.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of parent to list attack paths. Valid formats: `organizations/{organization}`, `organizations/{organization}/simulations/{simulation}` `organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}` `organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}`", + "location": "path", + "pattern": "^organizations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/attackPaths", + "response": { + "$ref": "ListAttackPathsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, "bigQueryExports": { "methods": { "create": { @@ -2856,7 +2901,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/organizations/{organizationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "securitycenter.organizations.operations.cancel", @@ -5893,7 +5938,7 @@ } } }, - "revision": "20241111", + "revision": "20241205", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -10606,6 +10651,403 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV2Issue": { + "description": "Security Command Center Issue.", + "id": "GoogleCloudSecuritycenterV2Issue", + "properties": { + "createTime": { + "description": "Output only. The time the issue was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the issue in Markdown format.", + "type": "string" + }, + "detection": { + "description": "The finding category or rule name that generated the issue.", + "type": "string" + }, + "domains": { + "description": "The domains of the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueDomain" + }, + "type": "array" + }, + "exposureScore": { + "description": "The exposure score of the issue.", + "format": "double", + "type": "number" + }, + "issueType": { + "description": "The type of the issue.", + "enum": [ + "ISSUE_TYPE_UNSPECIFIED", + "CHOKEPOINT", + "TOXIC_COMBINATION", + "INSIGHT" + ], + "enumDescriptions": [ + "Unspecified issue type.", + "Chokepoint issue type.", + "Toxic combination issue type.", + "Insight issue type." + ], + "type": "string" + }, + "lastObservationTime": { + "description": "The time the issue was last observed.", + "format": "google-datetime", + "type": "string" + }, + "mute": { + "$ref": "GoogleCloudSecuritycenterV2IssueMute", + "description": "The mute information of the issue." + }, + "name": { + "description": "Identifier. The name of the issue. Format: organizations/{organization}/locations/{location}/issues/{issue}", + "type": "string" + }, + "primaryResource": { + "$ref": "GoogleCloudSecuritycenterV2IssueResource", + "description": "The primary resource associated with the issue." + }, + "relatedFindings": { + "description": "The findings related to the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueFinding" + }, + "type": "array" + }, + "remediations": { + "description": "Approaches to remediate the issue in Markdown format.", + "items": { + "type": "string" + }, + "type": "array" + }, + "secondaryResources": { + "description": "Additional resources associated with the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueResource" + }, + "type": "array" + }, + "securityContexts": { + "description": "The security context of the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueSecurityContext" + }, + "type": "array" + }, + "severity": { + "description": "The severity of the issue.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "Unspecified severity.", + "Critical severity.", + "High severity.", + "Medium severity.", + "Low severity." + ], + "type": "string" + }, + "state": { + "description": "Output only. The state of the issue.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "INACTIVE" + ], + "enumDescriptions": [ + "Unspecified state.", + "Active state.", + "Inactive state." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time the issue was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueDomain": { + "description": "The domains of an issue.", + "id": "GoogleCloudSecuritycenterV2IssueDomain", + "properties": { + "domainCategory": { + "description": "The domain category of the issue.", + "enum": [ + "DOMAIN_CATEGORY_UNSPECIFIED", + "AI", + "CODE", + "CONTAINER", + "DATA", + "IDENTITY_AND_ACCESS", + "VULNERABILITY" + ], + "enumDescriptions": [ + "Unspecified domain category.", + "Issues in the AI domain.", + "Issues in the code domain.", + "Issues in the container domain.", + "Issues in the data domain.", + "Issues in the identity and access domain.", + "Issues in the vulnerability domain." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueFinding": { + "description": "Finding related to an issue.", + "id": "GoogleCloudSecuritycenterV2IssueFinding", + "properties": { + "cve": { + "$ref": "GoogleCloudSecuritycenterV2IssueFindingCve", + "description": "The CVE of the finding." + }, + "name": { + "description": "The name of the finding.", + "type": "string" + }, + "securityBulletin": { + "$ref": "GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin", + "description": "The security bulletin of the finding." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueFindingCve": { + "description": "The CVE of the finding.", + "id": "GoogleCloudSecuritycenterV2IssueFindingCve", + "properties": { + "name": { + "description": "The CVE name.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin": { + "description": "The security bulletin of the finding.", + "id": "GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin", + "properties": { + "name": { + "description": "The security bulletin name.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueMute": { + "description": "The mute information of the issue.", + "id": "GoogleCloudSecuritycenterV2IssueMute", + "properties": { + "muteInitiator": { + "description": "The email address of the user who last changed the mute state of the issue.", + "type": "string" + }, + "muteReason": { + "description": "The user-provided reason for muting the issue.", + "type": "string" + }, + "muteState": { + "description": "Output only. The mute state of the issue.", + "enum": [ + "MUTE_STATE_UNSPECIFIED", + "NOT_MUTED", + "MUTED" + ], + "enumDescriptions": [ + "Unspecified mute state.", + "Not muted.", + "Muted." + ], + "readOnly": true, + "type": "string" + }, + "muteUpdateTime": { + "description": "The time the issue was muted.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResource": { + "description": "A resource associated with the an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResource", + "properties": { + "awsMetadata": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadata", + "description": "The AWS metadata of the resource associated with the issue. Only populated for AWS resources." + }, + "azureMetadata": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadata", + "description": "The Azure metadata of the resource associated with the issue. Only populated for Azure resources." + }, + "cloudProvider": { + "description": "The cloud provider of the resource associated with the issue.", + "enum": [ + "CLOUD_PROVIDER_UNSPECIFIED", + "GOOGLE_CLOUD", + "AMAZON_WEB_SERVICES", + "MICROSOFT_AZURE" + ], + "enumDescriptions": [ + "Unspecified cloud provider.", + "Google Cloud.", + "Amazon Web Services.", + "Microsoft Azure." + ], + "type": "string" + }, + "displayName": { + "description": "The resource-type specific display name of the resource associated with the issue.", + "type": "string" + }, + "googleCloudMetadata": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata", + "description": "The Google Cloud metadata of the resource associated with the issue. Only populated for Google Cloud resources." + }, + "name": { + "description": "The full resource name of the resource associated with the issue.", + "type": "string" + }, + "type": { + "description": "The type of the resource associated with the issue.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAwsMetadata": { + "description": "The AWS metadata of a resource associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadata", + "properties": { + "account": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount", + "description": "The AWS account of the resource associated with the issue." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount": { + "description": "The AWS account of the resource associated with the issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount", + "properties": { + "id": { + "description": "The AWS account ID of the resource associated with the issue.", + "type": "string" + }, + "name": { + "description": "The AWS account name of the resource associated with the issue.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAzureMetadata": { + "description": "The Azure metadata of a resource associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadata", + "properties": { + "subscription": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription", + "description": "The Azure subscription of the resource associated with the issue." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription": { + "description": "The Azure subscription of the resource associated with the issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription", + "properties": { + "displayName": { + "description": "The Azure subscription display name of the resource associated with the issue.", + "type": "string" + }, + "id": { + "description": "The Azure subscription ID of the resource associated with the issue.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata": { + "description": "Google Cloud metadata of a resource associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata", + "properties": { + "projectId": { + "description": "The project ID that the resource associated with the issue belongs to.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueSecurityContext": { + "description": "Security context associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueSecurityContext", + "properties": { + "aggregatedCount": { + "$ref": "GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount", + "description": "The aggregated count of the security context." + }, + "context": { + "$ref": "GoogleCloudSecuritycenterV2IssueSecurityContextContext", + "description": "The context of the security context." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount": { + "description": "Aggregated count of a security context.", + "id": "GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount", + "properties": { + "key": { + "description": "Aggregation key.", + "type": "string" + }, + "value": { + "description": "Aggregation value.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueSecurityContextContext": { + "description": "Context of a security context.", + "id": "GoogleCloudSecuritycenterV2IssueSecurityContextContext", + "properties": { + "type": { + "description": "Context type.", + "type": "string" + }, + "values": { + "description": "Context values.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV2KernelRootkit": { "description": "Kernel mode rootkit signatures.", "id": "GoogleCloudSecuritycenterV2KernelRootkit", diff --git a/securitycenter/v1/securitycenter-gen.go b/securitycenter/v1/securitycenter-gen.go index b98e8117b88..a511b0fafbb 100644 --- a/securitycenter/v1/securitycenter-gen.go +++ b/securitycenter/v1/securitycenter-gen.go @@ -364,6 +364,7 @@ type FoldersSourcesFindingsExternalSystemsService struct { func NewOrganizationsService(s *Service) *OrganizationsService { rs := &OrganizationsService{s: s} rs.Assets = NewOrganizationsAssetsService(s) + rs.AttackPaths = NewOrganizationsAttackPathsService(s) rs.BigQueryExports = NewOrganizationsBigQueryExportsService(s) rs.EventThreatDetectionSettings = NewOrganizationsEventThreatDetectionSettingsService(s) rs.Findings = NewOrganizationsFindingsService(s) @@ -384,6 +385,8 @@ type OrganizationsService struct { Assets *OrganizationsAssetsService + AttackPaths *OrganizationsAttackPathsService + BigQueryExports *OrganizationsBigQueryExportsService EventThreatDetectionSettings *OrganizationsEventThreatDetectionSettingsService @@ -418,6 +421,15 @@ type OrganizationsAssetsService struct { s *Service } +func NewOrganizationsAttackPathsService(s *Service) *OrganizationsAttackPathsService { + rs := &OrganizationsAttackPathsService{s: s} + return rs +} + +type OrganizationsAttackPathsService struct { + s *Service +} + func NewOrganizationsBigQueryExportsService(s *Service) *OrganizationsBigQueryExportsService { rs := &OrganizationsBigQueryExportsService{s: s} return rs @@ -6659,6 +6671,471 @@ func (s GoogleCloudSecuritycenterV2Indicator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudSecuritycenterV2Issue: Security Command Center Issue. +type GoogleCloudSecuritycenterV2Issue struct { + // CreateTime: Output only. The time the issue was created. + CreateTime string `json:"createTime,omitempty"` + // Description: The description of the issue in Markdown format. + Description string `json:"description,omitempty"` + // Detection: The finding category or rule name that generated the issue. + Detection string `json:"detection,omitempty"` + // Domains: The domains of the issue. + Domains []*GoogleCloudSecuritycenterV2IssueDomain `json:"domains,omitempty"` + // ExposureScore: The exposure score of the issue. + ExposureScore float64 `json:"exposureScore,omitempty"` + // IssueType: The type of the issue. + // + // Possible values: + // "ISSUE_TYPE_UNSPECIFIED" - Unspecified issue type. + // "CHOKEPOINT" - Chokepoint issue type. + // "TOXIC_COMBINATION" - Toxic combination issue type. + // "INSIGHT" - Insight issue type. + IssueType string `json:"issueType,omitempty"` + // LastObservationTime: The time the issue was last observed. + LastObservationTime string `json:"lastObservationTime,omitempty"` + // Mute: The mute information of the issue. + Mute *GoogleCloudSecuritycenterV2IssueMute `json:"mute,omitempty"` + // Name: Identifier. The name of the issue. Format: + // organizations/{organization}/locations/{location}/issues/{issue} + Name string `json:"name,omitempty"` + // PrimaryResource: The primary resource associated with the issue. + PrimaryResource *GoogleCloudSecuritycenterV2IssueResource `json:"primaryResource,omitempty"` + // RelatedFindings: The findings related to the issue. + RelatedFindings []*GoogleCloudSecuritycenterV2IssueFinding `json:"relatedFindings,omitempty"` + // Remediations: Approaches to remediate the issue in Markdown format. + Remediations []string `json:"remediations,omitempty"` + // SecondaryResources: Additional resources associated with the issue. + SecondaryResources []*GoogleCloudSecuritycenterV2IssueResource `json:"secondaryResources,omitempty"` + // SecurityContexts: The security context of the issue. + SecurityContexts []*GoogleCloudSecuritycenterV2IssueSecurityContext `json:"securityContexts,omitempty"` + // Severity: The severity of the issue. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Unspecified severity. + // "CRITICAL" - Critical severity. + // "HIGH" - High severity. + // "MEDIUM" - Medium severity. + // "LOW" - Low severity. + Severity string `json:"severity,omitempty"` + // State: Output only. The state of the issue. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "ACTIVE" - Active state. + // "INACTIVE" - Inactive state. + State string `json:"state,omitempty"` + // UpdateTime: Output only. The time the issue was last updated. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2Issue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2Issue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudSecuritycenterV2Issue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudSecuritycenterV2Issue + var s1 struct { + ExposureScore gensupport.JSONFloat64 `json:"exposureScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExposureScore = float64(s1.ExposureScore) + return nil +} + +// GoogleCloudSecuritycenterV2IssueDomain: The domains of an issue. +type GoogleCloudSecuritycenterV2IssueDomain struct { + // DomainCategory: The domain category of the issue. + // + // Possible values: + // "DOMAIN_CATEGORY_UNSPECIFIED" - Unspecified domain category. + // "AI" - Issues in the AI domain. + // "CODE" - Issues in the code domain. + // "CONTAINER" - Issues in the container domain. + // "DATA" - Issues in the data domain. + // "IDENTITY_AND_ACCESS" - Issues in the identity and access domain. + // "VULNERABILITY" - Issues in the vulnerability domain. + DomainCategory string `json:"domainCategory,omitempty"` + // ForceSendFields is a list of field names (e.g. "DomainCategory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DomainCategory") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueDomain) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueDomain + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueFinding: Finding related to an issue. +type GoogleCloudSecuritycenterV2IssueFinding struct { + // Cve: The CVE of the finding. + Cve *GoogleCloudSecuritycenterV2IssueFindingCve `json:"cve,omitempty"` + // Name: The name of the finding. + Name string `json:"name,omitempty"` + // SecurityBulletin: The security bulletin of the finding. + SecurityBulletin *GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin `json:"securityBulletin,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cve") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cve") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueFinding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueFinding + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueFindingCve: The CVE of the finding. +type GoogleCloudSecuritycenterV2IssueFindingCve struct { + // Name: The CVE name. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueFindingCve) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueFindingCve + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin: The security +// bulletin of the finding. +type GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin struct { + // Name: The security bulletin name. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueMute: The mute information of the issue. +type GoogleCloudSecuritycenterV2IssueMute struct { + // MuteInitiator: The email address of the user who last changed the mute state + // of the issue. + MuteInitiator string `json:"muteInitiator,omitempty"` + // MuteReason: The user-provided reason for muting the issue. + MuteReason string `json:"muteReason,omitempty"` + // MuteState: Output only. The mute state of the issue. + // + // Possible values: + // "MUTE_STATE_UNSPECIFIED" - Unspecified mute state. + // "NOT_MUTED" - Not muted. + // "MUTED" - Muted. + MuteState string `json:"muteState,omitempty"` + // MuteUpdateTime: The time the issue was muted. + MuteUpdateTime string `json:"muteUpdateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "MuteInitiator") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MuteInitiator") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueMute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueMute + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResource: A resource associated with the an +// issue. +type GoogleCloudSecuritycenterV2IssueResource struct { + // AwsMetadata: The AWS metadata of the resource associated with the issue. + // Only populated for AWS resources. + AwsMetadata *GoogleCloudSecuritycenterV2IssueResourceAwsMetadata `json:"awsMetadata,omitempty"` + // AzureMetadata: The Azure metadata of the resource associated with the issue. + // Only populated for Azure resources. + AzureMetadata *GoogleCloudSecuritycenterV2IssueResourceAzureMetadata `json:"azureMetadata,omitempty"` + // CloudProvider: The cloud provider of the resource associated with the issue. + // + // Possible values: + // "CLOUD_PROVIDER_UNSPECIFIED" - Unspecified cloud provider. + // "GOOGLE_CLOUD" - Google Cloud. + // "AMAZON_WEB_SERVICES" - Amazon Web Services. + // "MICROSOFT_AZURE" - Microsoft Azure. + CloudProvider string `json:"cloudProvider,omitempty"` + // DisplayName: The resource-type specific display name of the resource + // associated with the issue. + DisplayName string `json:"displayName,omitempty"` + // GoogleCloudMetadata: The Google Cloud metadata of the resource associated + // with the issue. Only populated for Google Cloud resources. + GoogleCloudMetadata *GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata `json:"googleCloudMetadata,omitempty"` + // Name: The full resource name of the resource associated with the issue. + Name string `json:"name,omitempty"` + // Type: The type of the resource associated with the issue. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "AwsMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AwsMetadata") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAwsMetadata: The AWS metadata of a +// resource associated with an issue. +type GoogleCloudSecuritycenterV2IssueResourceAwsMetadata struct { + // Account: The AWS account of the resource associated with the issue. + Account *GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount `json:"account,omitempty"` + // ForceSendFields is a list of field names (e.g. "Account") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Account") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAwsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAwsMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount: The AWS +// account of the resource associated with the issue. +type GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount struct { + // Id: The AWS account ID of the resource associated with the issue. + Id string `json:"id,omitempty"` + // Name: The AWS account name of the resource associated with the issue. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Id") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Id") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAzureMetadata: The Azure metadata of +// a resource associated with an issue. +type GoogleCloudSecuritycenterV2IssueResourceAzureMetadata struct { + // Subscription: The Azure subscription of the resource associated with the + // issue. + Subscription *GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription `json:"subscription,omitempty"` + // ForceSendFields is a list of field names (e.g. "Subscription") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Subscription") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAzureMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAzureMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription: The +// Azure subscription of the resource associated with the issue. +type GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription struct { + // DisplayName: The Azure subscription display name of the resource associated + // with the issue. + DisplayName string `json:"displayName,omitempty"` + // Id: The Azure subscription ID of the resource associated with the issue. + Id string `json:"id,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata: Google Cloud +// metadata of a resource associated with an issue. +type GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata struct { + // ProjectId: The project ID that the resource associated with the issue + // belongs to. + ProjectId string `json:"projectId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProjectId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProjectId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueSecurityContext: Security context associated +// with an issue. +type GoogleCloudSecuritycenterV2IssueSecurityContext struct { + // AggregatedCount: The aggregated count of the security context. + AggregatedCount *GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount `json:"aggregatedCount,omitempty"` + // Context: The context of the security context. + Context *GoogleCloudSecuritycenterV2IssueSecurityContextContext `json:"context,omitempty"` + // ForceSendFields is a list of field names (e.g. "AggregatedCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AggregatedCount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueSecurityContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueSecurityContext + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount: Aggregated +// count of a security context. +type GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount struct { + // Key: Aggregation key. + Key string `json:"key,omitempty"` + // Value: Aggregation value. + Value int64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Key") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueSecurityContextContext: Context of a +// security context. +type GoogleCloudSecuritycenterV2IssueSecurityContextContext struct { + // Type: Context type. + Type string `json:"type,omitempty"` + // Values: Context values. + Values []string `json:"values,omitempty"` + // ForceSendFields is a list of field names (e.g. "Type") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Type") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueSecurityContextContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueSecurityContextContext + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV2KernelRootkit: Kernel mode rootkit signatures. type GoogleCloudSecuritycenterV2KernelRootkit struct { // Name: Rootkit name, when available. @@ -18329,6 +18806,167 @@ func (c *OrganizationsAssetsUpdateSecurityMarksCall) Do(opts ...googleapi.CallOp return ret, nil } +type OrganizationsAttackPathsListCall struct { + s *Service + parent string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the attack paths for a set of simulation results or valued +// resources and filter. +// +// - parent: Name of parent to list attack paths. Valid formats: +// `organizations/{organization}`, +// `organizations/{organization}/simulations/{simulation}` +// `organizations/{organization}/simulations/{simulation}/attackExposureResult +// s/{attack_exposure_result_v2}` +// `organizations/{organization}/simulations/{simulation}/valuedResources/{val +// ued_resource}`. +func (r *OrganizationsAttackPathsService) List(parent string) *OrganizationsAttackPathsListCall { + c := &OrganizationsAttackPathsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": The filter expression that +// filters the attack path in the response. Supported fields: * +// `valued_resources` supports = +func (c *OrganizationsAttackPathsListCall) Filter(filter string) *OrganizationsAttackPathsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// PageSize sets the optional parameter "pageSize": The maximum number of +// results to return in a single response. Default is 10, minimum is 1, maximum +// is 1000. +func (c *OrganizationsAttackPathsListCall) PageSize(pageSize int64) *OrganizationsAttackPathsListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": The value returned by the +// last `ListAttackPathsResponse`; indicates that this is a continuation of a +// prior `ListAttackPaths` call, and that the system should return the next +// page of data. +func (c *OrganizationsAttackPathsListCall) PageToken(pageToken string) *OrganizationsAttackPathsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *OrganizationsAttackPathsListCall) Fields(s ...googleapi.Field) *OrganizationsAttackPathsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *OrganizationsAttackPathsListCall) IfNoneMatch(entityTag string) *OrganizationsAttackPathsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *OrganizationsAttackPathsListCall) Context(ctx context.Context) *OrganizationsAttackPathsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *OrganizationsAttackPathsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *OrganizationsAttackPathsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/attackPaths") + 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 "securitycenter.organizations.attackPaths.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *ListAttackPathsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *OrganizationsAttackPathsListCall) Do(opts ...googleapi.CallOption) (*ListAttackPathsResponse, 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 := &ListAttackPathsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *OrganizationsAttackPathsListCall) Pages(ctx context.Context, f func(*ListAttackPathsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + type OrganizationsBigQueryExportsCreateCall struct { s *Service parent string @@ -21672,7 +22310,7 @@ type OrganizationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/securitycenter/v1beta1/securitycenter-api.json b/securitycenter/v1beta1/securitycenter-api.json index 0281d1b73d9..c958d03b47c 100644 --- a/securitycenter/v1beta1/securitycenter-api.json +++ b/securitycenter/v1beta1/securitycenter-api.json @@ -352,7 +352,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta1/organizations/{organizationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "securitycenter.organizations.operations.cancel", @@ -913,7 +913,7 @@ } } }, - "revision": "20241111", + "revision": "20241205", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -5322,6 +5322,403 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV2Issue": { + "description": "Security Command Center Issue.", + "id": "GoogleCloudSecuritycenterV2Issue", + "properties": { + "createTime": { + "description": "Output only. The time the issue was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the issue in Markdown format.", + "type": "string" + }, + "detection": { + "description": "The finding category or rule name that generated the issue.", + "type": "string" + }, + "domains": { + "description": "The domains of the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueDomain" + }, + "type": "array" + }, + "exposureScore": { + "description": "The exposure score of the issue.", + "format": "double", + "type": "number" + }, + "issueType": { + "description": "The type of the issue.", + "enum": [ + "ISSUE_TYPE_UNSPECIFIED", + "CHOKEPOINT", + "TOXIC_COMBINATION", + "INSIGHT" + ], + "enumDescriptions": [ + "Unspecified issue type.", + "Chokepoint issue type.", + "Toxic combination issue type.", + "Insight issue type." + ], + "type": "string" + }, + "lastObservationTime": { + "description": "The time the issue was last observed.", + "format": "google-datetime", + "type": "string" + }, + "mute": { + "$ref": "GoogleCloudSecuritycenterV2IssueMute", + "description": "The mute information of the issue." + }, + "name": { + "description": "Identifier. The name of the issue. Format: organizations/{organization}/locations/{location}/issues/{issue}", + "type": "string" + }, + "primaryResource": { + "$ref": "GoogleCloudSecuritycenterV2IssueResource", + "description": "The primary resource associated with the issue." + }, + "relatedFindings": { + "description": "The findings related to the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueFinding" + }, + "type": "array" + }, + "remediations": { + "description": "Approaches to remediate the issue in Markdown format.", + "items": { + "type": "string" + }, + "type": "array" + }, + "secondaryResources": { + "description": "Additional resources associated with the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueResource" + }, + "type": "array" + }, + "securityContexts": { + "description": "The security context of the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueSecurityContext" + }, + "type": "array" + }, + "severity": { + "description": "The severity of the issue.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "Unspecified severity.", + "Critical severity.", + "High severity.", + "Medium severity.", + "Low severity." + ], + "type": "string" + }, + "state": { + "description": "Output only. The state of the issue.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "INACTIVE" + ], + "enumDescriptions": [ + "Unspecified state.", + "Active state.", + "Inactive state." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time the issue was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueDomain": { + "description": "The domains of an issue.", + "id": "GoogleCloudSecuritycenterV2IssueDomain", + "properties": { + "domainCategory": { + "description": "The domain category of the issue.", + "enum": [ + "DOMAIN_CATEGORY_UNSPECIFIED", + "AI", + "CODE", + "CONTAINER", + "DATA", + "IDENTITY_AND_ACCESS", + "VULNERABILITY" + ], + "enumDescriptions": [ + "Unspecified domain category.", + "Issues in the AI domain.", + "Issues in the code domain.", + "Issues in the container domain.", + "Issues in the data domain.", + "Issues in the identity and access domain.", + "Issues in the vulnerability domain." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueFinding": { + "description": "Finding related to an issue.", + "id": "GoogleCloudSecuritycenterV2IssueFinding", + "properties": { + "cve": { + "$ref": "GoogleCloudSecuritycenterV2IssueFindingCve", + "description": "The CVE of the finding." + }, + "name": { + "description": "The name of the finding.", + "type": "string" + }, + "securityBulletin": { + "$ref": "GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin", + "description": "The security bulletin of the finding." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueFindingCve": { + "description": "The CVE of the finding.", + "id": "GoogleCloudSecuritycenterV2IssueFindingCve", + "properties": { + "name": { + "description": "The CVE name.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin": { + "description": "The security bulletin of the finding.", + "id": "GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin", + "properties": { + "name": { + "description": "The security bulletin name.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueMute": { + "description": "The mute information of the issue.", + "id": "GoogleCloudSecuritycenterV2IssueMute", + "properties": { + "muteInitiator": { + "description": "The email address of the user who last changed the mute state of the issue.", + "type": "string" + }, + "muteReason": { + "description": "The user-provided reason for muting the issue.", + "type": "string" + }, + "muteState": { + "description": "Output only. The mute state of the issue.", + "enum": [ + "MUTE_STATE_UNSPECIFIED", + "NOT_MUTED", + "MUTED" + ], + "enumDescriptions": [ + "Unspecified mute state.", + "Not muted.", + "Muted." + ], + "readOnly": true, + "type": "string" + }, + "muteUpdateTime": { + "description": "The time the issue was muted.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResource": { + "description": "A resource associated with the an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResource", + "properties": { + "awsMetadata": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadata", + "description": "The AWS metadata of the resource associated with the issue. Only populated for AWS resources." + }, + "azureMetadata": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadata", + "description": "The Azure metadata of the resource associated with the issue. Only populated for Azure resources." + }, + "cloudProvider": { + "description": "The cloud provider of the resource associated with the issue.", + "enum": [ + "CLOUD_PROVIDER_UNSPECIFIED", + "GOOGLE_CLOUD", + "AMAZON_WEB_SERVICES", + "MICROSOFT_AZURE" + ], + "enumDescriptions": [ + "Unspecified cloud provider.", + "Google Cloud.", + "Amazon Web Services.", + "Microsoft Azure." + ], + "type": "string" + }, + "displayName": { + "description": "The resource-type specific display name of the resource associated with the issue.", + "type": "string" + }, + "googleCloudMetadata": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata", + "description": "The Google Cloud metadata of the resource associated with the issue. Only populated for Google Cloud resources." + }, + "name": { + "description": "The full resource name of the resource associated with the issue.", + "type": "string" + }, + "type": { + "description": "The type of the resource associated with the issue.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAwsMetadata": { + "description": "The AWS metadata of a resource associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadata", + "properties": { + "account": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount", + "description": "The AWS account of the resource associated with the issue." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount": { + "description": "The AWS account of the resource associated with the issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount", + "properties": { + "id": { + "description": "The AWS account ID of the resource associated with the issue.", + "type": "string" + }, + "name": { + "description": "The AWS account name of the resource associated with the issue.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAzureMetadata": { + "description": "The Azure metadata of a resource associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadata", + "properties": { + "subscription": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription", + "description": "The Azure subscription of the resource associated with the issue." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription": { + "description": "The Azure subscription of the resource associated with the issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription", + "properties": { + "displayName": { + "description": "The Azure subscription display name of the resource associated with the issue.", + "type": "string" + }, + "id": { + "description": "The Azure subscription ID of the resource associated with the issue.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata": { + "description": "Google Cloud metadata of a resource associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata", + "properties": { + "projectId": { + "description": "The project ID that the resource associated with the issue belongs to.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueSecurityContext": { + "description": "Security context associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueSecurityContext", + "properties": { + "aggregatedCount": { + "$ref": "GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount", + "description": "The aggregated count of the security context." + }, + "context": { + "$ref": "GoogleCloudSecuritycenterV2IssueSecurityContextContext", + "description": "The context of the security context." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount": { + "description": "Aggregated count of a security context.", + "id": "GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount", + "properties": { + "key": { + "description": "Aggregation key.", + "type": "string" + }, + "value": { + "description": "Aggregation value.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueSecurityContextContext": { + "description": "Context of a security context.", + "id": "GoogleCloudSecuritycenterV2IssueSecurityContextContext", + "properties": { + "type": { + "description": "Context type.", + "type": "string" + }, + "values": { + "description": "Context values.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV2KernelRootkit": { "description": "Kernel mode rootkit signatures.", "id": "GoogleCloudSecuritycenterV2KernelRootkit", diff --git a/securitycenter/v1beta1/securitycenter-gen.go b/securitycenter/v1beta1/securitycenter-gen.go index 33b60ff6f00..21bcfcb265c 100644 --- a/securitycenter/v1beta1/securitycenter-gen.go +++ b/securitycenter/v1beta1/securitycenter-gen.go @@ -5633,6 +5633,471 @@ func (s GoogleCloudSecuritycenterV2Indicator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudSecuritycenterV2Issue: Security Command Center Issue. +type GoogleCloudSecuritycenterV2Issue struct { + // CreateTime: Output only. The time the issue was created. + CreateTime string `json:"createTime,omitempty"` + // Description: The description of the issue in Markdown format. + Description string `json:"description,omitempty"` + // Detection: The finding category or rule name that generated the issue. + Detection string `json:"detection,omitempty"` + // Domains: The domains of the issue. + Domains []*GoogleCloudSecuritycenterV2IssueDomain `json:"domains,omitempty"` + // ExposureScore: The exposure score of the issue. + ExposureScore float64 `json:"exposureScore,omitempty"` + // IssueType: The type of the issue. + // + // Possible values: + // "ISSUE_TYPE_UNSPECIFIED" - Unspecified issue type. + // "CHOKEPOINT" - Chokepoint issue type. + // "TOXIC_COMBINATION" - Toxic combination issue type. + // "INSIGHT" - Insight issue type. + IssueType string `json:"issueType,omitempty"` + // LastObservationTime: The time the issue was last observed. + LastObservationTime string `json:"lastObservationTime,omitempty"` + // Mute: The mute information of the issue. + Mute *GoogleCloudSecuritycenterV2IssueMute `json:"mute,omitempty"` + // Name: Identifier. The name of the issue. Format: + // organizations/{organization}/locations/{location}/issues/{issue} + Name string `json:"name,omitempty"` + // PrimaryResource: The primary resource associated with the issue. + PrimaryResource *GoogleCloudSecuritycenterV2IssueResource `json:"primaryResource,omitempty"` + // RelatedFindings: The findings related to the issue. + RelatedFindings []*GoogleCloudSecuritycenterV2IssueFinding `json:"relatedFindings,omitempty"` + // Remediations: Approaches to remediate the issue in Markdown format. + Remediations []string `json:"remediations,omitempty"` + // SecondaryResources: Additional resources associated with the issue. + SecondaryResources []*GoogleCloudSecuritycenterV2IssueResource `json:"secondaryResources,omitempty"` + // SecurityContexts: The security context of the issue. + SecurityContexts []*GoogleCloudSecuritycenterV2IssueSecurityContext `json:"securityContexts,omitempty"` + // Severity: The severity of the issue. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Unspecified severity. + // "CRITICAL" - Critical severity. + // "HIGH" - High severity. + // "MEDIUM" - Medium severity. + // "LOW" - Low severity. + Severity string `json:"severity,omitempty"` + // State: Output only. The state of the issue. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "ACTIVE" - Active state. + // "INACTIVE" - Inactive state. + State string `json:"state,omitempty"` + // UpdateTime: Output only. The time the issue was last updated. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2Issue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2Issue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudSecuritycenterV2Issue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudSecuritycenterV2Issue + var s1 struct { + ExposureScore gensupport.JSONFloat64 `json:"exposureScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExposureScore = float64(s1.ExposureScore) + return nil +} + +// GoogleCloudSecuritycenterV2IssueDomain: The domains of an issue. +type GoogleCloudSecuritycenterV2IssueDomain struct { + // DomainCategory: The domain category of the issue. + // + // Possible values: + // "DOMAIN_CATEGORY_UNSPECIFIED" - Unspecified domain category. + // "AI" - Issues in the AI domain. + // "CODE" - Issues in the code domain. + // "CONTAINER" - Issues in the container domain. + // "DATA" - Issues in the data domain. + // "IDENTITY_AND_ACCESS" - Issues in the identity and access domain. + // "VULNERABILITY" - Issues in the vulnerability domain. + DomainCategory string `json:"domainCategory,omitempty"` + // ForceSendFields is a list of field names (e.g. "DomainCategory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DomainCategory") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueDomain) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueDomain + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueFinding: Finding related to an issue. +type GoogleCloudSecuritycenterV2IssueFinding struct { + // Cve: The CVE of the finding. + Cve *GoogleCloudSecuritycenterV2IssueFindingCve `json:"cve,omitempty"` + // Name: The name of the finding. + Name string `json:"name,omitempty"` + // SecurityBulletin: The security bulletin of the finding. + SecurityBulletin *GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin `json:"securityBulletin,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cve") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cve") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueFinding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueFinding + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueFindingCve: The CVE of the finding. +type GoogleCloudSecuritycenterV2IssueFindingCve struct { + // Name: The CVE name. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueFindingCve) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueFindingCve + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin: The security +// bulletin of the finding. +type GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin struct { + // Name: The security bulletin name. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueMute: The mute information of the issue. +type GoogleCloudSecuritycenterV2IssueMute struct { + // MuteInitiator: The email address of the user who last changed the mute state + // of the issue. + MuteInitiator string `json:"muteInitiator,omitempty"` + // MuteReason: The user-provided reason for muting the issue. + MuteReason string `json:"muteReason,omitempty"` + // MuteState: Output only. The mute state of the issue. + // + // Possible values: + // "MUTE_STATE_UNSPECIFIED" - Unspecified mute state. + // "NOT_MUTED" - Not muted. + // "MUTED" - Muted. + MuteState string `json:"muteState,omitempty"` + // MuteUpdateTime: The time the issue was muted. + MuteUpdateTime string `json:"muteUpdateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "MuteInitiator") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MuteInitiator") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueMute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueMute + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResource: A resource associated with the an +// issue. +type GoogleCloudSecuritycenterV2IssueResource struct { + // AwsMetadata: The AWS metadata of the resource associated with the issue. + // Only populated for AWS resources. + AwsMetadata *GoogleCloudSecuritycenterV2IssueResourceAwsMetadata `json:"awsMetadata,omitempty"` + // AzureMetadata: The Azure metadata of the resource associated with the issue. + // Only populated for Azure resources. + AzureMetadata *GoogleCloudSecuritycenterV2IssueResourceAzureMetadata `json:"azureMetadata,omitempty"` + // CloudProvider: The cloud provider of the resource associated with the issue. + // + // Possible values: + // "CLOUD_PROVIDER_UNSPECIFIED" - Unspecified cloud provider. + // "GOOGLE_CLOUD" - Google Cloud. + // "AMAZON_WEB_SERVICES" - Amazon Web Services. + // "MICROSOFT_AZURE" - Microsoft Azure. + CloudProvider string `json:"cloudProvider,omitempty"` + // DisplayName: The resource-type specific display name of the resource + // associated with the issue. + DisplayName string `json:"displayName,omitempty"` + // GoogleCloudMetadata: The Google Cloud metadata of the resource associated + // with the issue. Only populated for Google Cloud resources. + GoogleCloudMetadata *GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata `json:"googleCloudMetadata,omitempty"` + // Name: The full resource name of the resource associated with the issue. + Name string `json:"name,omitempty"` + // Type: The type of the resource associated with the issue. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "AwsMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AwsMetadata") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAwsMetadata: The AWS metadata of a +// resource associated with an issue. +type GoogleCloudSecuritycenterV2IssueResourceAwsMetadata struct { + // Account: The AWS account of the resource associated with the issue. + Account *GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount `json:"account,omitempty"` + // ForceSendFields is a list of field names (e.g. "Account") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Account") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAwsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAwsMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount: The AWS +// account of the resource associated with the issue. +type GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount struct { + // Id: The AWS account ID of the resource associated with the issue. + Id string `json:"id,omitempty"` + // Name: The AWS account name of the resource associated with the issue. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Id") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Id") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAzureMetadata: The Azure metadata of +// a resource associated with an issue. +type GoogleCloudSecuritycenterV2IssueResourceAzureMetadata struct { + // Subscription: The Azure subscription of the resource associated with the + // issue. + Subscription *GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription `json:"subscription,omitempty"` + // ForceSendFields is a list of field names (e.g. "Subscription") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Subscription") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAzureMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAzureMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription: The +// Azure subscription of the resource associated with the issue. +type GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription struct { + // DisplayName: The Azure subscription display name of the resource associated + // with the issue. + DisplayName string `json:"displayName,omitempty"` + // Id: The Azure subscription ID of the resource associated with the issue. + Id string `json:"id,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata: Google Cloud +// metadata of a resource associated with an issue. +type GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata struct { + // ProjectId: The project ID that the resource associated with the issue + // belongs to. + ProjectId string `json:"projectId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProjectId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProjectId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueSecurityContext: Security context associated +// with an issue. +type GoogleCloudSecuritycenterV2IssueSecurityContext struct { + // AggregatedCount: The aggregated count of the security context. + AggregatedCount *GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount `json:"aggregatedCount,omitempty"` + // Context: The context of the security context. + Context *GoogleCloudSecuritycenterV2IssueSecurityContextContext `json:"context,omitempty"` + // ForceSendFields is a list of field names (e.g. "AggregatedCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AggregatedCount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueSecurityContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueSecurityContext + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount: Aggregated +// count of a security context. +type GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount struct { + // Key: Aggregation key. + Key string `json:"key,omitempty"` + // Value: Aggregation value. + Value int64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Key") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueSecurityContextContext: Context of a +// security context. +type GoogleCloudSecuritycenterV2IssueSecurityContextContext struct { + // Type: Context type. + Type string `json:"type,omitempty"` + // Values: Context values. + Values []string `json:"values,omitempty"` + // ForceSendFields is a list of field names (e.g. "Type") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Type") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueSecurityContextContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueSecurityContextContext + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV2KernelRootkit: Kernel mode rootkit signatures. type GoogleCloudSecuritycenterV2KernelRootkit struct { // Name: Rootkit name, when available. @@ -10211,7 +10676,7 @@ type OrganizationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/securitycenter/v1beta2/securitycenter-api.json b/securitycenter/v1beta2/securitycenter-api.json index c55a4adab68..78953a138b3 100644 --- a/securitycenter/v1beta2/securitycenter-api.json +++ b/securitycenter/v1beta2/securitycenter-api.json @@ -2003,7 +2003,7 @@ } } }, - "revision": "20241111", + "revision": "20241205", "rootUrl": "https://securitycenter.googleapis.com/", "schemas": { "Access": { @@ -6315,6 +6315,403 @@ }, "type": "object" }, + "GoogleCloudSecuritycenterV2Issue": { + "description": "Security Command Center Issue.", + "id": "GoogleCloudSecuritycenterV2Issue", + "properties": { + "createTime": { + "description": "Output only. The time the issue was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "description": { + "description": "The description of the issue in Markdown format.", + "type": "string" + }, + "detection": { + "description": "The finding category or rule name that generated the issue.", + "type": "string" + }, + "domains": { + "description": "The domains of the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueDomain" + }, + "type": "array" + }, + "exposureScore": { + "description": "The exposure score of the issue.", + "format": "double", + "type": "number" + }, + "issueType": { + "description": "The type of the issue.", + "enum": [ + "ISSUE_TYPE_UNSPECIFIED", + "CHOKEPOINT", + "TOXIC_COMBINATION", + "INSIGHT" + ], + "enumDescriptions": [ + "Unspecified issue type.", + "Chokepoint issue type.", + "Toxic combination issue type.", + "Insight issue type." + ], + "type": "string" + }, + "lastObservationTime": { + "description": "The time the issue was last observed.", + "format": "google-datetime", + "type": "string" + }, + "mute": { + "$ref": "GoogleCloudSecuritycenterV2IssueMute", + "description": "The mute information of the issue." + }, + "name": { + "description": "Identifier. The name of the issue. Format: organizations/{organization}/locations/{location}/issues/{issue}", + "type": "string" + }, + "primaryResource": { + "$ref": "GoogleCloudSecuritycenterV2IssueResource", + "description": "The primary resource associated with the issue." + }, + "relatedFindings": { + "description": "The findings related to the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueFinding" + }, + "type": "array" + }, + "remediations": { + "description": "Approaches to remediate the issue in Markdown format.", + "items": { + "type": "string" + }, + "type": "array" + }, + "secondaryResources": { + "description": "Additional resources associated with the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueResource" + }, + "type": "array" + }, + "securityContexts": { + "description": "The security context of the issue.", + "items": { + "$ref": "GoogleCloudSecuritycenterV2IssueSecurityContext" + }, + "type": "array" + }, + "severity": { + "description": "The severity of the issue.", + "enum": [ + "SEVERITY_UNSPECIFIED", + "CRITICAL", + "HIGH", + "MEDIUM", + "LOW" + ], + "enumDescriptions": [ + "Unspecified severity.", + "Critical severity.", + "High severity.", + "Medium severity.", + "Low severity." + ], + "type": "string" + }, + "state": { + "description": "Output only. The state of the issue.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "INACTIVE" + ], + "enumDescriptions": [ + "Unspecified state.", + "Active state.", + "Inactive state." + ], + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time the issue was last updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueDomain": { + "description": "The domains of an issue.", + "id": "GoogleCloudSecuritycenterV2IssueDomain", + "properties": { + "domainCategory": { + "description": "The domain category of the issue.", + "enum": [ + "DOMAIN_CATEGORY_UNSPECIFIED", + "AI", + "CODE", + "CONTAINER", + "DATA", + "IDENTITY_AND_ACCESS", + "VULNERABILITY" + ], + "enumDescriptions": [ + "Unspecified domain category.", + "Issues in the AI domain.", + "Issues in the code domain.", + "Issues in the container domain.", + "Issues in the data domain.", + "Issues in the identity and access domain.", + "Issues in the vulnerability domain." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueFinding": { + "description": "Finding related to an issue.", + "id": "GoogleCloudSecuritycenterV2IssueFinding", + "properties": { + "cve": { + "$ref": "GoogleCloudSecuritycenterV2IssueFindingCve", + "description": "The CVE of the finding." + }, + "name": { + "description": "The name of the finding.", + "type": "string" + }, + "securityBulletin": { + "$ref": "GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin", + "description": "The security bulletin of the finding." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueFindingCve": { + "description": "The CVE of the finding.", + "id": "GoogleCloudSecuritycenterV2IssueFindingCve", + "properties": { + "name": { + "description": "The CVE name.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin": { + "description": "The security bulletin of the finding.", + "id": "GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin", + "properties": { + "name": { + "description": "The security bulletin name.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueMute": { + "description": "The mute information of the issue.", + "id": "GoogleCloudSecuritycenterV2IssueMute", + "properties": { + "muteInitiator": { + "description": "The email address of the user who last changed the mute state of the issue.", + "type": "string" + }, + "muteReason": { + "description": "The user-provided reason for muting the issue.", + "type": "string" + }, + "muteState": { + "description": "Output only. The mute state of the issue.", + "enum": [ + "MUTE_STATE_UNSPECIFIED", + "NOT_MUTED", + "MUTED" + ], + "enumDescriptions": [ + "Unspecified mute state.", + "Not muted.", + "Muted." + ], + "readOnly": true, + "type": "string" + }, + "muteUpdateTime": { + "description": "The time the issue was muted.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResource": { + "description": "A resource associated with the an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResource", + "properties": { + "awsMetadata": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadata", + "description": "The AWS metadata of the resource associated with the issue. Only populated for AWS resources." + }, + "azureMetadata": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadata", + "description": "The Azure metadata of the resource associated with the issue. Only populated for Azure resources." + }, + "cloudProvider": { + "description": "The cloud provider of the resource associated with the issue.", + "enum": [ + "CLOUD_PROVIDER_UNSPECIFIED", + "GOOGLE_CLOUD", + "AMAZON_WEB_SERVICES", + "MICROSOFT_AZURE" + ], + "enumDescriptions": [ + "Unspecified cloud provider.", + "Google Cloud.", + "Amazon Web Services.", + "Microsoft Azure." + ], + "type": "string" + }, + "displayName": { + "description": "The resource-type specific display name of the resource associated with the issue.", + "type": "string" + }, + "googleCloudMetadata": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata", + "description": "The Google Cloud metadata of the resource associated with the issue. Only populated for Google Cloud resources." + }, + "name": { + "description": "The full resource name of the resource associated with the issue.", + "type": "string" + }, + "type": { + "description": "The type of the resource associated with the issue.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAwsMetadata": { + "description": "The AWS metadata of a resource associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadata", + "properties": { + "account": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount", + "description": "The AWS account of the resource associated with the issue." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount": { + "description": "The AWS account of the resource associated with the issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount", + "properties": { + "id": { + "description": "The AWS account ID of the resource associated with the issue.", + "type": "string" + }, + "name": { + "description": "The AWS account name of the resource associated with the issue.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAzureMetadata": { + "description": "The Azure metadata of a resource associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadata", + "properties": { + "subscription": { + "$ref": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription", + "description": "The Azure subscription of the resource associated with the issue." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription": { + "description": "The Azure subscription of the resource associated with the issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription", + "properties": { + "displayName": { + "description": "The Azure subscription display name of the resource associated with the issue.", + "type": "string" + }, + "id": { + "description": "The Azure subscription ID of the resource associated with the issue.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata": { + "description": "Google Cloud metadata of a resource associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata", + "properties": { + "projectId": { + "description": "The project ID that the resource associated with the issue belongs to.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueSecurityContext": { + "description": "Security context associated with an issue.", + "id": "GoogleCloudSecuritycenterV2IssueSecurityContext", + "properties": { + "aggregatedCount": { + "$ref": "GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount", + "description": "The aggregated count of the security context." + }, + "context": { + "$ref": "GoogleCloudSecuritycenterV2IssueSecurityContextContext", + "description": "The context of the security context." + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount": { + "description": "Aggregated count of a security context.", + "id": "GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount", + "properties": { + "key": { + "description": "Aggregation key.", + "type": "string" + }, + "value": { + "description": "Aggregation value.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudSecuritycenterV2IssueSecurityContextContext": { + "description": "Context of a security context.", + "id": "GoogleCloudSecuritycenterV2IssueSecurityContextContext", + "properties": { + "type": { + "description": "Context type.", + "type": "string" + }, + "values": { + "description": "Context values.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "GoogleCloudSecuritycenterV2KernelRootkit": { "description": "Kernel mode rootkit signatures.", "id": "GoogleCloudSecuritycenterV2KernelRootkit", diff --git a/securitycenter/v1beta2/securitycenter-gen.go b/securitycenter/v1beta2/securitycenter-gen.go index 04eccba087f..6b03d3c7333 100644 --- a/securitycenter/v1beta2/securitycenter-gen.go +++ b/securitycenter/v1beta2/securitycenter-gen.go @@ -5584,6 +5584,471 @@ func (s GoogleCloudSecuritycenterV2Indicator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// GoogleCloudSecuritycenterV2Issue: Security Command Center Issue. +type GoogleCloudSecuritycenterV2Issue struct { + // CreateTime: Output only. The time the issue was created. + CreateTime string `json:"createTime,omitempty"` + // Description: The description of the issue in Markdown format. + Description string `json:"description,omitempty"` + // Detection: The finding category or rule name that generated the issue. + Detection string `json:"detection,omitempty"` + // Domains: The domains of the issue. + Domains []*GoogleCloudSecuritycenterV2IssueDomain `json:"domains,omitempty"` + // ExposureScore: The exposure score of the issue. + ExposureScore float64 `json:"exposureScore,omitempty"` + // IssueType: The type of the issue. + // + // Possible values: + // "ISSUE_TYPE_UNSPECIFIED" - Unspecified issue type. + // "CHOKEPOINT" - Chokepoint issue type. + // "TOXIC_COMBINATION" - Toxic combination issue type. + // "INSIGHT" - Insight issue type. + IssueType string `json:"issueType,omitempty"` + // LastObservationTime: The time the issue was last observed. + LastObservationTime string `json:"lastObservationTime,omitempty"` + // Mute: The mute information of the issue. + Mute *GoogleCloudSecuritycenterV2IssueMute `json:"mute,omitempty"` + // Name: Identifier. The name of the issue. Format: + // organizations/{organization}/locations/{location}/issues/{issue} + Name string `json:"name,omitempty"` + // PrimaryResource: The primary resource associated with the issue. + PrimaryResource *GoogleCloudSecuritycenterV2IssueResource `json:"primaryResource,omitempty"` + // RelatedFindings: The findings related to the issue. + RelatedFindings []*GoogleCloudSecuritycenterV2IssueFinding `json:"relatedFindings,omitempty"` + // Remediations: Approaches to remediate the issue in Markdown format. + Remediations []string `json:"remediations,omitempty"` + // SecondaryResources: Additional resources associated with the issue. + SecondaryResources []*GoogleCloudSecuritycenterV2IssueResource `json:"secondaryResources,omitempty"` + // SecurityContexts: The security context of the issue. + SecurityContexts []*GoogleCloudSecuritycenterV2IssueSecurityContext `json:"securityContexts,omitempty"` + // Severity: The severity of the issue. + // + // Possible values: + // "SEVERITY_UNSPECIFIED" - Unspecified severity. + // "CRITICAL" - Critical severity. + // "HIGH" - High severity. + // "MEDIUM" - Medium severity. + // "LOW" - Low severity. + Severity string `json:"severity,omitempty"` + // State: Output only. The state of the issue. + // + // Possible values: + // "STATE_UNSPECIFIED" - Unspecified state. + // "ACTIVE" - Active state. + // "INACTIVE" - Inactive state. + State string `json:"state,omitempty"` + // UpdateTime: Output only. The time the issue was last updated. + UpdateTime string `json:"updateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "CreateTime") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreateTime") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2Issue) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2Issue + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +func (s *GoogleCloudSecuritycenterV2Issue) UnmarshalJSON(data []byte) error { + type NoMethod GoogleCloudSecuritycenterV2Issue + var s1 struct { + ExposureScore gensupport.JSONFloat64 `json:"exposureScore"` + *NoMethod + } + s1.NoMethod = (*NoMethod)(s) + if err := json.Unmarshal(data, &s1); err != nil { + return err + } + s.ExposureScore = float64(s1.ExposureScore) + return nil +} + +// GoogleCloudSecuritycenterV2IssueDomain: The domains of an issue. +type GoogleCloudSecuritycenterV2IssueDomain struct { + // DomainCategory: The domain category of the issue. + // + // Possible values: + // "DOMAIN_CATEGORY_UNSPECIFIED" - Unspecified domain category. + // "AI" - Issues in the AI domain. + // "CODE" - Issues in the code domain. + // "CONTAINER" - Issues in the container domain. + // "DATA" - Issues in the data domain. + // "IDENTITY_AND_ACCESS" - Issues in the identity and access domain. + // "VULNERABILITY" - Issues in the vulnerability domain. + DomainCategory string `json:"domainCategory,omitempty"` + // ForceSendFields is a list of field names (e.g. "DomainCategory") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DomainCategory") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueDomain) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueDomain + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueFinding: Finding related to an issue. +type GoogleCloudSecuritycenterV2IssueFinding struct { + // Cve: The CVE of the finding. + Cve *GoogleCloudSecuritycenterV2IssueFindingCve `json:"cve,omitempty"` + // Name: The name of the finding. + Name string `json:"name,omitempty"` + // SecurityBulletin: The security bulletin of the finding. + SecurityBulletin *GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin `json:"securityBulletin,omitempty"` + // ForceSendFields is a list of field names (e.g. "Cve") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Cve") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueFinding) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueFinding + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueFindingCve: The CVE of the finding. +type GoogleCloudSecuritycenterV2IssueFindingCve struct { + // Name: The CVE name. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueFindingCve) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueFindingCve + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin: The security +// bulletin of the finding. +type GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin struct { + // Name: The security bulletin name. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueFindingSecurityBulletin + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueMute: The mute information of the issue. +type GoogleCloudSecuritycenterV2IssueMute struct { + // MuteInitiator: The email address of the user who last changed the mute state + // of the issue. + MuteInitiator string `json:"muteInitiator,omitempty"` + // MuteReason: The user-provided reason for muting the issue. + MuteReason string `json:"muteReason,omitempty"` + // MuteState: Output only. The mute state of the issue. + // + // Possible values: + // "MUTE_STATE_UNSPECIFIED" - Unspecified mute state. + // "NOT_MUTED" - Not muted. + // "MUTED" - Muted. + MuteState string `json:"muteState,omitempty"` + // MuteUpdateTime: The time the issue was muted. + MuteUpdateTime string `json:"muteUpdateTime,omitempty"` + // ForceSendFields is a list of field names (e.g. "MuteInitiator") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MuteInitiator") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueMute) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueMute + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResource: A resource associated with the an +// issue. +type GoogleCloudSecuritycenterV2IssueResource struct { + // AwsMetadata: The AWS metadata of the resource associated with the issue. + // Only populated for AWS resources. + AwsMetadata *GoogleCloudSecuritycenterV2IssueResourceAwsMetadata `json:"awsMetadata,omitempty"` + // AzureMetadata: The Azure metadata of the resource associated with the issue. + // Only populated for Azure resources. + AzureMetadata *GoogleCloudSecuritycenterV2IssueResourceAzureMetadata `json:"azureMetadata,omitempty"` + // CloudProvider: The cloud provider of the resource associated with the issue. + // + // Possible values: + // "CLOUD_PROVIDER_UNSPECIFIED" - Unspecified cloud provider. + // "GOOGLE_CLOUD" - Google Cloud. + // "AMAZON_WEB_SERVICES" - Amazon Web Services. + // "MICROSOFT_AZURE" - Microsoft Azure. + CloudProvider string `json:"cloudProvider,omitempty"` + // DisplayName: The resource-type specific display name of the resource + // associated with the issue. + DisplayName string `json:"displayName,omitempty"` + // GoogleCloudMetadata: The Google Cloud metadata of the resource associated + // with the issue. Only populated for Google Cloud resources. + GoogleCloudMetadata *GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata `json:"googleCloudMetadata,omitempty"` + // Name: The full resource name of the resource associated with the issue. + Name string `json:"name,omitempty"` + // Type: The type of the resource associated with the issue. + Type string `json:"type,omitempty"` + // ForceSendFields is a list of field names (e.g. "AwsMetadata") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AwsMetadata") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResource) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResource + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAwsMetadata: The AWS metadata of a +// resource associated with an issue. +type GoogleCloudSecuritycenterV2IssueResourceAwsMetadata struct { + // Account: The AWS account of the resource associated with the issue. + Account *GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount `json:"account,omitempty"` + // ForceSendFields is a list of field names (e.g. "Account") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Account") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAwsMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAwsMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount: The AWS +// account of the resource associated with the issue. +type GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount struct { + // Id: The AWS account ID of the resource associated with the issue. + Id string `json:"id,omitempty"` + // Name: The AWS account name of the resource associated with the issue. + Name string `json:"name,omitempty"` + // ForceSendFields is a list of field names (e.g. "Id") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Id") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAwsMetadataAwsAccount + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAzureMetadata: The Azure metadata of +// a resource associated with an issue. +type GoogleCloudSecuritycenterV2IssueResourceAzureMetadata struct { + // Subscription: The Azure subscription of the resource associated with the + // issue. + Subscription *GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription `json:"subscription,omitempty"` + // ForceSendFields is a list of field names (e.g. "Subscription") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Subscription") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAzureMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAzureMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription: The +// Azure subscription of the resource associated with the issue. +type GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription struct { + // DisplayName: The Azure subscription display name of the resource associated + // with the issue. + DisplayName string `json:"displayName,omitempty"` + // Id: The Azure subscription ID of the resource associated with the issue. + Id string `json:"id,omitempty"` + // 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. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "DisplayName") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceAzureMetadataAzureSubscription + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata: Google Cloud +// metadata of a resource associated with an issue. +type GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata struct { + // ProjectId: The project ID that the resource associated with the issue + // belongs to. + ProjectId string `json:"projectId,omitempty"` + // ForceSendFields is a list of field names (e.g. "ProjectId") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ProjectId") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueResourceGoogleCloudMetadata + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueSecurityContext: Security context associated +// with an issue. +type GoogleCloudSecuritycenterV2IssueSecurityContext struct { + // AggregatedCount: The aggregated count of the security context. + AggregatedCount *GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount `json:"aggregatedCount,omitempty"` + // Context: The context of the security context. + Context *GoogleCloudSecuritycenterV2IssueSecurityContextContext `json:"context,omitempty"` + // ForceSendFields is a list of field names (e.g. "AggregatedCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AggregatedCount") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueSecurityContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueSecurityContext + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount: Aggregated +// count of a security context. +type GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount struct { + // Key: Aggregation key. + Key string `json:"key,omitempty"` + // Value: Aggregation value. + Value int64 `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Key") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueSecurityContextAggregatedCount + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// GoogleCloudSecuritycenterV2IssueSecurityContextContext: Context of a +// security context. +type GoogleCloudSecuritycenterV2IssueSecurityContextContext struct { + // Type: Context type. + Type string `json:"type,omitempty"` + // Values: Context values. + Values []string `json:"values,omitempty"` + // ForceSendFields is a list of field names (e.g. "Type") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Type") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s GoogleCloudSecuritycenterV2IssueSecurityContextContext) MarshalJSON() ([]byte, error) { + type NoMethod GoogleCloudSecuritycenterV2IssueSecurityContextContext + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // GoogleCloudSecuritycenterV2KernelRootkit: Kernel mode rootkit signatures. type GoogleCloudSecuritycenterV2KernelRootkit struct { // Name: Rootkit name, when available. From 40ca97ec2003da68305e0647ae5794f910e1e856 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 9 Dec 2024 17:18:23 +0100 Subject: [PATCH 07/11] chore(all): update all (#2904) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | Type | Update | |---|---|---|---|---|---|---|---| | [cloud.google.com/go/auth](https://redirect.github.com/googleapis/google-cloud-go) | `v0.11.0` -> `v0.12.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/cloud.google.com%2fgo%2fauth/v0.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/cloud.google.com%2fgo%2fauth/v0.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/cloud.google.com%2fgo%2fauth/v0.11.0/v0.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/cloud.google.com%2fgo%2fauth/v0.11.0/v0.12.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | minor | | golang.org/x/net | `v0.31.0` -> `v0.32.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fnet/v0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fnet/v0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fnet/v0.31.0/v0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fnet/v0.31.0/v0.32.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | minor | | golang.org/x/sync | `v0.9.0` -> `v0.10.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fsync/v0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fsync/v0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fsync/v0.9.0/v0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fsync/v0.9.0/v0.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | minor | | [google.golang.org/genproto](https://redirect.github.com/googleapis/go-genproto) | `e639e21` -> `a4fef06` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgenproto/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgenproto/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgenproto/v0.0.0-20241118233622-e639e219e697/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgenproto/v0.0.0-20241118233622-e639e219e697/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | digest | | [google.golang.org/genproto/googleapis/bytestream](https://redirect.github.com/googleapis/go-genproto) | `e639e21` -> `a4fef06` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgenproto%2fgoogleapis%2fbytestream/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgenproto%2fgoogleapis%2fbytestream/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgenproto%2fgoogleapis%2fbytestream/v0.0.0-20241118233622-e639e219e697/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgenproto%2fgoogleapis%2fbytestream/v0.0.0-20241118233622-e639e219e697/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | digest | | [google.golang.org/genproto/googleapis/rpc](https://redirect.github.com/googleapis/go-genproto) | `e639e21` -> `a4fef06` | [![age](https://developer.mend.io/api/mc/badges/age/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20241118233622-e639e219e697/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/google.golang.org%2fgenproto%2fgoogleapis%2frpc/v0.0.0-20241118233622-e639e219e697/v0.0.0-20241206012308-a4fef0638583?slim=true)](https://docs.renovatebot.com/merge-confidence/) | require | digest | --- ### Release Notes
googleapis/google-cloud-go (cloud.google.com/go/auth) ### [`v0.12.0`](https://redirect.github.com/googleapis/google-cloud-go/blob/HEAD/CHANGES.md#v0120) [Compare Source](https://redirect.github.com/googleapis/google-cloud-go/compare/v0.11.0...v0.12.0) - pubsub: Subscription.Receive now uses streaming pull. - pubsub: add Client.TopicInProject to access topics in a different project than the client. - errors: renamed errorreporting. The errors package will be removed shortly. - datastore: improved retry behavior. - bigquery: support updates to dataset metadata, with etags. - bigquery: add etag support to Table.Update (BREAKING: etag argument added). - bigquery: generate all job IDs on the client. - storage: support bucket lifecycle configurations.
--- ### Configuration 📅 **Schedule**: Branch creation - "* 0-3 * * 1" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/googleapis/google-api-go-client). --- go.mod | 18 +++++++++--------- go.sum | 40 ++++++++++++++++++++-------------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/go.mod b/go.mod index c6a24a547cc..7af3d205953 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( cloud.google.com/go v0.116.0 - cloud.google.com/go/auth v0.11.0 + cloud.google.com/go/auth v0.12.0 cloud.google.com/go/auth/oauth2adapt v0.2.6 cloud.google.com/go/compute/metadata v0.5.2 github.com/google/go-cmp v0.6.0 @@ -14,13 +14,13 @@ require ( github.com/googleapis/gax-go/v2 v2.14.0 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 - golang.org/x/net v0.31.0 + golang.org/x/net v0.32.0 golang.org/x/oauth2 v0.24.0 - golang.org/x/sync v0.9.0 + golang.org/x/sync v0.10.0 golang.org/x/time v0.8.0 - google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 - google.golang.org/genproto/googleapis/bytestream v0.0.0-20241118233622-e639e219e697 - google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 + google.golang.org/genproto v0.0.0-20241206012308-a4fef0638583 + google.golang.org/genproto/googleapis/bytestream v0.0.0-20241206012308-a4fef0638583 + google.golang.org/genproto/googleapis/rpc v0.0.0-20241206012308-a4fef0638583 google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.35.2 ) @@ -34,7 +34,7 @@ require ( go.opentelemetry.io/otel v1.29.0 // indirect go.opentelemetry.io/otel/metric v1.29.0 // indirect go.opentelemetry.io/otel/trace v1.29.0 // indirect - golang.org/x/crypto v0.29.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/text v0.20.0 // indirect + golang.org/x/crypto v0.30.0 // indirect + golang.org/x/sys v0.28.0 // indirect + golang.org/x/text v0.21.0 // indirect ) diff --git a/go.sum b/go.sum index b0213d369bb..3c182db2203 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= -cloud.google.com/go/auth v0.11.0 h1:Ic5SZz2lsvbYcWT5dfjNWgw6tTlGi2Wc8hyQSC9BstA= -cloud.google.com/go/auth v0.11.0/go.mod h1:xxA5AqpDrvS+Gkmo9RqrGGRh6WSNKKOXhY3zNOr38tI= +cloud.google.com/go/auth v0.12.0 h1:ARAD8r0lkiHw2go7kEnmviF6TOYhzLM+yDGcDt9mP68= +cloud.google.com/go/auth v0.12.0/go.mod h1:xxA5AqpDrvS+Gkmo9RqrGGRh6WSNKKOXhY3zNOr38tI= cloud.google.com/go/auth/oauth2adapt v0.2.6 h1:V6a6XDu2lTwPZWOawrAa9HUK+DB2zfJyTuciBG5hFkU= cloud.google.com/go/auth/oauth2adapt v0.2.6/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= @@ -83,8 +83,8 @@ go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt3 go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.29.0 h1:L5SG1JTTXupVV3n6sUqMTeWbjAyfPwoda2DLX8J8FrQ= -golang.org/x/crypto v0.29.0/go.mod h1:+F4F4N5hv6v38hfeYwTdx20oUvLLc+QfrE9Ax9HtgRg= +golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= +golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -95,26 +95,26 @@ golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= -golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= +golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= +golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= +golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= -golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= +golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= +golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -128,14 +128,14 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 h1:ToEetK57OidYuqD4Q5w+vfEnPvPpuTwedCNVohYJfNk= -google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc= -google.golang.org/genproto/googleapis/api v0.0.0-20241113202542-65e8d215514f h1:M65LEviCfuZTfrfzwwEoxVtgvfkFkBUbFnRbxCXuXhU= -google.golang.org/genproto/googleapis/api v0.0.0-20241113202542-65e8d215514f/go.mod h1:Yo94eF2nj7igQt+TiJ49KxjIH8ndLYPZMIRSiRcEbg0= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20241118233622-e639e219e697 h1:rY93Be8/KL+EtFM4im9lxMzjGn796GnwVUd75cyFCJg= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20241118233622-e639e219e697/go.mod h1:qUsLYwbwz5ostUWtuFuXPlHmSJodC5NI/88ZlHj4M1o= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 h1:LWZqQOEjDyONlF1H6afSWpAL/znlREo2tHfLoe+8LMA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= +google.golang.org/genproto v0.0.0-20241206012308-a4fef0638583 h1:pjPnE7Rv3PAwHISLRJhA3HQTnM2uu5qcnroxTkRb5G8= +google.golang.org/genproto v0.0.0-20241206012308-a4fef0638583/go.mod h1:dW27OyXi0Ph+N43jeCWMFC86aTT5VgdeQtOSf0Hehdw= +google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 h1:pgr/4QbFyktUv9CtQ/Fq4gzEE6/Xs7iCXbktaGzLHbQ= +google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697/go.mod h1:+D9ySVjN8nY8YCVjc5O7PZDIdZporIDY3KaGfJunh88= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20241206012308-a4fef0638583 h1:QNxhiucJGWLF/fFpnyTIk8GdEGTa6tUC7/JYG7VN3XU= +google.golang.org/genproto/googleapis/bytestream v0.0.0-20241206012308-a4fef0638583/go.mod h1:qUsLYwbwz5ostUWtuFuXPlHmSJodC5NI/88ZlHj4M1o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241206012308-a4fef0638583 h1:IfdSdTcLFy4lqUQrQJLkLt1PB+AsqVz6lwkWPzWEz10= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241206012308-a4fef0638583/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= From 91960b196e5b2dedfc21045964b07944d284a629 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 10 Dec 2024 06:43:23 -0800 Subject: [PATCH 08/11] feat(all): auto-regenerate discovery clients (#2906) --- compute/v0.alpha/compute-api.json | 1326 +- compute/v0.alpha/compute-gen.go | 1158 +- compute/v0.alpha/compute2-gen.go | 281 +- compute/v0.alpha/compute3-gen.go | 389 +- compute/v1/compute-api.json | 4139 ++- compute/v1/compute-gen.go | 1282 +- compute/v1/compute2-gen.go | 22403 ++++++++-------- compute/v1/compute3-gen.go | 7889 +++--- dataform/v1beta1/dataform-api.json | 221 +- dataform/v1beta1/dataform-gen.go | 1987 +- datafusion/v1/datafusion-api.json | 393 +- datafusion/v1/datafusion-gen.go | 438 +- datafusion/v1beta1/datafusion-api.json | 362 +- datafusion/v1beta1/datafusion-gen.go | 391 +- datamigration/v1beta1/datamigration-api.json | 4 +- datamigration/v1beta1/datamigration-gen.go | 2 +- .../v1/digitalassetlinks-api.json | 3 +- go.work.sum | 1 + 18 files changed, 23403 insertions(+), 19266 deletions(-) diff --git a/compute/v0.alpha/compute-api.json b/compute/v0.alpha/compute-api.json index 9296effc52c..cca9ae6d9a6 100644 --- a/compute/v0.alpha/compute-api.json +++ b/compute/v0.alpha/compute-api.json @@ -1894,6 +1894,41 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "getEffectiveSecurityPolicies": { + "description": "Returns effective security policies applied to this backend service.", + "flatPath": "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies", + "httpMethod": "GET", + "id": "compute.backendServices.getEffectiveSecurityPolicies", + "parameterOrder": [ + "project", + "backendService" + ], + "parameters": { + "backendService": { + "description": "Name of the Backend Service for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies", + "response": { + "$ref": "BackendServicesGetEffectiveSecurityPoliciesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, "getHealth": { "description": "Gets the most recent health check results for this BackendService. Example request body: { \"group\": \"/zones/us-east1-b/instanceGroups/lb-backend-example\" }", "flatPath": "projects/{project}/global/backendServices/{backendService}/getHealth", @@ -2457,7 +2492,7 @@ "type": "string" }, "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't create it. If applicable, any configuration notices are returned in the `configurationNotices` field.", + "description": "[Input Only] Validate the new configuration, but don't create it.", "location": "query", "type": "boolean" } @@ -2558,8 +2593,14 @@ "location": "query", "type": "string" }, + "updateMask": { + "description": "update_mask indicates fields to be updated as part of this request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + }, "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't update it. If applicable, any configuration notices are returned in the `configurationNotices` field.", + "description": "[Input Only] Validate the new configuration, but don't update it.", "location": "query", "type": "boolean" } @@ -11621,7 +11662,7 @@ ] }, "addNetworkInterface": { - "description": "Adds a network interface to an instance.", + "description": "Adds one dynamic network interface to an active instance.", "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/addNetworkInterface", "httpMethod": "POST", "id": "compute.instances.addNetworkInterface", @@ -11901,7 +11942,7 @@ "type": "string" }, "noGracefulShutdown": { - "description": "If true, skips Graceful Shutdown.", + "description": "If set to true, Graceful Shutdown is skipped.", "location": "query", "type": "boolean" }, @@ -11996,7 +12037,7 @@ ] }, "deleteNetworkInterface": { - "description": "Deletes one network interface from an active instance. InstancesDeleteNetworkInterfaceRequest indicates: - instance from which to delete, using project+zone+resource_id fields; - network interface to be deleted, using network_interface_name field; Only VLAN interface deletion is supported for now.", + "description": "Deletes one dynamic network interface from an active instance. InstancesDeleteNetworkInterfaceRequest indicates: - instance from which to delete, using project+zone+resource_id fields; - dynamic network interface to be deleted, using network_interface_name field;", "flatPath": "projects/{project}/zones/{zone}/instances/{instance}/deleteNetworkInterface", "httpMethod": "POST", "id": "compute.instances.deleteNetworkInterface", @@ -12014,7 +12055,7 @@ "type": "string" }, "networkInterfaceName": { - "description": "The name of the network interface to be deleted from the instance. Only VLAN network interface deletion is supported.", + "description": "The name of the dynamic network interface to be deleted from the instance.", "location": "query", "required": true, "type": "string" @@ -12438,7 +12479,7 @@ "type": "string" }, "start": { - "description": "Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console.", + "description": "Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console. Note that the negative start is bounded by the retained buffer size, and the returned serial console output will not exceed the max buffer size.", "format": "int64", "location": "query", "type": "string" @@ -14013,7 +14054,7 @@ "type": "string" }, "noGracefulShutdown": { - "description": "If true, skips Graceful Shutdown.", + "description": "If set to true, Graceful Shutdown is skipped.", "location": "query", "type": "boolean" }, @@ -17604,6 +17645,54 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "update": { + "description": "Updates a License resource in the specified project. *Caution* This resource is intended for use only by third-party partners who are creating Cloud Marketplace images. ", + "flatPath": "projects/{project}/global/licenses/{license}", + "httpMethod": "PATCH", + "id": "compute.licenses.update", + "parameterOrder": [ + "project", + "license" + ], + "parameters": { + "license": { + "description": "The license name for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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": "update_mask indicates fields to be updated as part of this request.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "projects/{project}/global/licenses/{license}", + "request": { + "$ref": "License" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -33125,6 +33214,56 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "setLabels": { + "description": "Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels", + "httpMethod": "POST", + "id": "compute.regionSecurityPolicies.setLabels", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels", + "request": { + "$ref": "RegionSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -35856,6 +35995,62 @@ "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] + }, + "performMaintenance": { + "description": "Allows customers to perform maintenance on a reservation block", + "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}/performMaintenance", + "httpMethod": "POST", + "id": "compute.reservationBlocks.performMaintenance", + "parameterOrder": [ + "project", + "zone", + "reservation", + "reservationBlock" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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" + }, + "reservation": { + "description": "The name of the reservation. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "reservationBlock": { + "description": "The name of the reservation block. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request. Zone name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}/performMaintenance", + "request": { + "$ref": "ReservationsBlocksPerformMaintenanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -36171,6 +36366,54 @@ "https://www.googleapis.com/auth/compute.readonly" ] }, + "performMaintenance": { + "description": "Perform maintenance on an extended reservation", + "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/performMaintenance", + "httpMethod": "POST", + "id": "compute.reservations.performMaintenance", + "parameterOrder": [ + "project", + "zone", + "reservation" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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" + }, + "reservation": { + "description": "The name of the reservation. Name should conform to RFC1035 or be a resource ID.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "zone": { + "description": "Name of the zone for this request. Zone name should conform to RFC1035.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/reservations/{reservation}/performMaintenance", + "request": { + "$ref": "ReservationsPerformMaintenanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "resize": { "description": "Resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.", "flatPath": "projects/{project}/zones/{zone}/reservations/{reservation}/resize", @@ -46441,7 +46684,7 @@ "type": "string" }, "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't create it. If applicable, any configuration notices are returned in the `configurationNotices` field.", + "description": "[Input Only] Validate the new configuration, but don't create it.", "location": "query", "type": "boolean" } @@ -46556,7 +46799,7 @@ "type": "string" }, "validateOnly": { - "description": "[Input Only] Validate the new configuration, but don't update it. If applicable, any configuration notices are returned in the `configurationNotices` field.", + "description": "[Input Only] Validate the new configuration, but don't update it.", "location": "query", "type": "boolean" }, @@ -47179,7 +47422,7 @@ } } }, - "revision": "20241112", + "revision": "20241201", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -47334,6 +47577,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -47370,6 +47614,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -47394,6 +47639,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -47486,6 +47732,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -47522,6 +47769,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -47546,6 +47794,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -47620,6 +47869,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -47656,6 +47906,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -47680,6 +47931,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -48041,6 +48293,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -48077,6 +48330,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -48101,6 +48355,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -48193,6 +48448,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -48229,6 +48485,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -48253,6 +48510,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -48327,6 +48585,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -48363,6 +48622,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -48387,6 +48647,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49308,6 +49569,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -49344,6 +49606,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -49368,6 +49631,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49460,6 +49724,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -49496,6 +49761,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -49520,6 +49786,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49652,6 +49919,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -49688,6 +49956,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -49712,6 +49981,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -50161,7 +50431,7 @@ "description": "The CacheKeyPolicy for this CdnPolicy." }, "cacheMode": { - "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached.", + "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. If no value is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC.", "enum": [ "CACHE_ALL_STATIC", "FORCE_CACHE_ALL", @@ -50330,6 +50600,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -50366,6 +50637,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -50390,6 +50662,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -50481,6 +50754,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -50517,6 +50791,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -50541,6 +50816,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -50860,6 +51136,7 @@ "enum": [ "ALL", "GRPC", + "H2C", "HTTP", "HTTP2", "HTTPS", @@ -50871,6 +51148,7 @@ "enumDescriptions": [ "ALL includes TCP, UDP, ICMP, ESP, AH and SCTP. Note that this should never be used together with target_xx_proxies.", "gRPC (available for Traffic Director).", + "HTTP2 over cleartext", "", "HTTP/2 with SSL.", "", @@ -51039,6 +51317,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -51075,6 +51354,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -51099,6 +51379,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -51152,7 +51433,7 @@ "description": "The CacheKeyPolicy for this CdnPolicy." }, "cacheMode": { - "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached.", + "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. If no value is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC.", "enum": [ "CACHE_ALL_STATIC", "FORCE_CACHE_ALL", @@ -51514,6 +51795,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -51550,6 +51832,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -51574,6 +51857,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -51666,6 +51950,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -51702,6 +51987,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -51726,6 +52012,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -51970,6 +52257,19 @@ }, "type": "object" }, + "BackendServicesGetEffectiveSecurityPoliciesResponse": { + "id": "BackendServicesGetEffectiveSecurityPoliciesResponse", + "properties": { + "securityPolicies": { + "description": "Effective security policies for the backend service.", + "items": { + "$ref": "SecurityPolicy" + }, + "type": "array" + } + }, + "type": "object" + }, "BackendServicesScopedList": { "id": "BackendServicesScopedList", "properties": { @@ -52007,6 +52307,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -52043,6 +52344,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -52067,6 +52369,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -52600,6 +52903,13 @@ "CacheInvalidationRule": { "id": "CacheInvalidationRule", "properties": { + "cacheTags": { + "description": "Not implemented.", + "items": { + "type": "string" + }, + "type": "array" + }, "host": { "description": "If set, this invalidation rule will only apply to requests with a Host header matching host.", "type": "string" @@ -52953,6 +53263,7 @@ "GRAPHICS_OPTIMIZED", "MEMORY_OPTIMIZED", "MEMORY_OPTIMIZED_M3", + "MEMORY_OPTIMIZED_M4", "MEMORY_OPTIMIZED_X4", "MEMORY_OPTIMIZED_X4_16TB", "MEMORY_OPTIMIZED_X4_24TB", @@ -52986,6 +53297,7 @@ "", "", "", + "", "" ], "type": "string" @@ -53055,6 +53367,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -53091,6 +53404,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -53115,6 +53429,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -53207,6 +53522,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -53243,6 +53559,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -53267,6 +53584,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -53382,6 +53700,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -53418,6 +53737,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -53442,6 +53762,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -53715,6 +54036,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -53751,6 +54073,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -53775,6 +54098,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -54330,6 +54654,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -54366,6 +54691,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -54390,6 +54716,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -54554,6 +54881,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -54590,6 +54918,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -54614,6 +54943,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -54669,12 +54999,12 @@ "id": "DiskPairReplicationState", "properties": { "dataReplicationState": { - "description": "[Output Only] The status of disk creation. - ASYNC_REPLICATION_STATE_INITIALIZING: The device is doing the initial replication after starting the replication. - ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY: The primary disk is healthily replicating to the secondary device i.e. last_replication_time is within RPO. - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND: The replication is lagging above the SLO limit due to some internal issue. - ASYNC_REPLICATION_STATE_REPLICATING_UNHEALTHY: The replication is lagging, and the RPO is not being met due to some internal issue. . - ASYNC_REPLICATION_STATE_REPLICATION_STUCK: The replication is completely stuck due to some internal error. - ASYNC_REPLICATION_STATE_STOPPING: The replication is under the process of being stopped. This is a transient state. - ASYNC_REPLICATION_STATE_STOPPED: The replication between the disk-pairs have stopped. ", + "description": "[Output Only] The status of disk creation. - ASYNC_REPLICATION_STATE_INITIALIZING: The device is doing the initial replication after starting the replication. - ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY: The primary disk is healthily replicating to the secondary device i.e. last_replication_time is within RPO. - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN: The replication is lagging above the SLO limit due to some internal issue. - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING: The replication is lagging, and the RPO is not being met due to some internal issue. - ASYNC_REPLICATION_STATE_REPLICATION_STUCK: The replication is completely stuck due to some internal error. - ASYNC_REPLICATION_STATE_STOPPING: The replication is under the process of being stopped. This is a transient state. - ASYNC_REPLICATION_STATE_STOPPED: The replication between the disk-pairs have stopped. ", "enum": [ "ASYNC_REPLICATION_STATE_INITIALIZING", - "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND", + "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN", + "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING", "ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY", - "ASYNC_REPLICATION_STATE_REPLICATING_UNHEALTHY", "ASYNC_REPLICATION_STATE_REPLICATION_STUCK", "ASYNC_REPLICATION_STATE_STOPPED", "ASYNC_REPLICATION_STATE_STOPPING", @@ -54683,8 +55013,8 @@ "enumDescriptions": [ "The device is doing the initial replication after starting the replication.", "The replication is lagging behind (last_replication_time \u003e RPO), because the disk's change rate is above the supported limit.", - "The primary disk is healthily replicating to the secondary device i.e. last_replication_time is within RPO.", "The replication is lagging, and the RPO is not being met due to some internal issue.", + "The primary disk is healthily replicating to the secondary device i.e. last_replication_time is within RPO.", "The replication is completely stuck due to some internal error.", "The replication between the disk-pairs have stopped.", "The replication is under the process of being stopped. This is a transient sate.", @@ -54939,6 +55269,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -54975,6 +55306,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -54999,6 +55331,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -55091,6 +55424,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -55127,6 +55461,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -55151,6 +55486,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -55225,6 +55561,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -55261,6 +55598,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -55285,6 +55623,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -55396,6 +55735,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -55432,6 +55772,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -55456,6 +55797,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -55700,6 +56042,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -55736,6 +56079,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -55760,6 +56104,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -55970,6 +56315,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -56006,6 +56352,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -56030,6 +56377,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -56307,6 +56655,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -56343,6 +56692,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -56367,6 +56717,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -56626,6 +56977,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -56662,6 +57014,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -56686,6 +57039,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -57339,6 +57693,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -57375,6 +57730,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -57399,6 +57755,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -57491,6 +57848,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -57527,6 +57885,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -57551,6 +57910,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -57653,6 +58013,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -57689,6 +58050,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -57713,6 +58075,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -57753,6 +58116,10 @@ "FutureReservation": { "id": "FutureReservation", "properties": { + "aggregateReservation": { + "$ref": "AllocationAggregateReservation", + "description": "Aggregate reservation details for the future reservation." + }, "autoCreatedReservationsDeleteTime": { "description": "Future timestamp when the FR auto-created reservations will be deleted by Compute Engine. Format of this field must be a valid href=\"https://www.ietf.org/rfc/rfc3339.txt\"\u003eRFC3339 value.", "type": "string" @@ -57791,29 +58158,11 @@ "description": "An optional description of this resource. Provide this property when you create the future reservation.", "type": "string" }, - "enableOpportunisticMaintenance": { - "description": "Indicates if this group of VMs have opportunistic maintenance enabled. This will be set on the FR by customers, and will be used for reservation and reservation block maintenance .", - "type": "boolean" - }, "id": { "description": "[Output Only] A unique identifier for this future reservation. The server defines this identifier.", "format": "uint64", "type": "string" }, - "instanceTerminationAction": { - "description": "Action to take during reservation termination.", - "enum": [ - "DELETE", - "INSTANCE_TERMINATION_ACTION_UNSPECIFIED", - "STOP" - ], - "enumDescriptions": [ - "Delete the VM.", - "Default value. This value is unused.", - "Stop the VM without storing in-memory content. default action." - ], - "type": "string" - }, "kind": { "default": "compute#futureReservation", "description": "[Output Only] Type of the resource. Always compute#futureReservation for future reservations.", @@ -57847,6 +58196,20 @@ ], "type": "string" }, + "reservationMode": { + "description": "The reservation mode which determines reservation-termination behavior and expected pricing.", + "enum": [ + "CALENDAR", + "DEFAULT", + "RESERVATION_MODE_UNSPECIFIED" + ], + "enumDescriptions": [ + "The delivered reservations will delivered at specified start time and terminated at specified end time along with terminating the VMs running on it.", + "The delivered reservations do not terminate VMs at the end of reservations. This is default mode.", + "" + ], + "type": "string" + }, "reservationName": { "description": "Name of reservations where the capacity is provisioned at the time of delivery of future reservations. If the reservation with the given name does not exist already, it is created automatically at the time of Approval with INACTIVE state till specified start-time. Either provide the reservation_name or a name_prefix.", "type": "string" @@ -58227,6 +58590,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -58263,6 +58627,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -58287,6 +58652,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58388,6 +58754,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -58424,6 +58791,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -58448,6 +58816,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58522,6 +58891,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -58558,6 +58928,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -58582,6 +58953,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58810,10 +59182,6 @@ "description": "Maintenance Info for ReservationBlocks.", "id": "GroupMaintenanceInfo", "properties": { - "enableOpportunisticMaintenance": { - "description": "This setting enables or disables opportunistic maintenance. If enabled, maintenance is performed on unused reservations whenever possible.", - "type": "boolean" - }, "maintenanceOngoingCount": { "description": "Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have ongoing maintenance.", "format": "int32", @@ -59350,6 +59718,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -59386,6 +59755,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -59410,6 +59780,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -59624,6 +59995,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -59660,6 +60032,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -59684,6 +60057,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -59785,6 +60159,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -59821,6 +60196,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -59845,6 +60221,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -59919,6 +60296,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -59955,6 +60333,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -59979,6 +60358,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -60078,6 +60458,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -60114,6 +60495,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -60138,6 +60520,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -60212,6 +60595,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -60248,6 +60632,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -60272,6 +60657,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -60779,6 +61165,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -60815,6 +61202,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -60839,6 +61227,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -61052,15 +61441,15 @@ }, "routeAction": { "$ref": "HttpRouteAction", - "description": "In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction." + "description": "In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction." }, "service": { - "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set.", + "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.", "type": "string" }, "urlRedirect": { "$ref": "HttpRedirectAction", - "description": "When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." } }, "type": "object" @@ -61239,6 +61628,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -61275,6 +61665,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -61299,6 +61690,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -61642,6 +62034,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -61678,6 +62071,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -61702,6 +62096,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -62060,7 +62455,7 @@ ], "enumDescriptions": [ "The instance is halted and we are performing tear down tasks like network deprogramming, releasing quota, IP, tearing down disks etc.", - "The instance is shutting down gracefully.", + "The instance is gracefully shutting down.", "Resources are being allocated for the instance.", "The instance is in repair.", "The instance is running.", @@ -62154,6 +62549,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62190,6 +62586,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62214,6 +62611,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -62429,6 +62827,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62465,6 +62864,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62489,6 +62889,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -62581,6 +62982,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62617,6 +63019,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62641,6 +63044,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -63039,6 +63443,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -63075,6 +63480,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -63099,6 +63505,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -63249,7 +63656,7 @@ "id": "InstanceGroupManagerInstanceLifecyclePolicy", "properties": { "defaultActionOnFailure": { - "description": "The action that a MIG performs on a failed or an unhealthy VM. A VM is marked as unhealthy when the application running on that VM fails a health check. Valid values are - REPAIR (default): MIG automatically repairs a failed or an unhealthy VM by recreating it. For more information, see About repairing VMs in a MIG. - DO_NOTHING: MIG does not repair a failed or an unhealthy VM. ", + "description": "The action that a MIG performs on a failed VM. If the value of the onFailedHealthCheck field is `DEFAULT_ACTION`, then the same action also applies to the VMs on which your application fails a health check. Valid values are - REPAIR (default): MIG automatically repairs a failed VM by recreating it. For more information, see about repairing VMs in a MIG. - DO_NOTHING: MIG does not repair a failed VM.", "enum": [ "DELETE", "DO_NOTHING", @@ -63257,8 +63664,8 @@ ], "enumDescriptions": [ "MIG deletes a failed or an unhealthy VM. Deleting the VM decreases the target size of the MIG.", - "MIG does not repair a failed or an unhealthy VM.", - "(Default) MIG automatically repairs a failed or an unhealthy VM by recreating it. For more information, see About repairing VMs in a MIG." + "MIG does not repair a failed VM.", + "(default): MIG automatically repairs a failed VM by recreating it. For more information, see about repairing VMs in a MIG." ], "type": "string" }, @@ -63280,16 +63687,16 @@ "description": "The configuration for metadata based readiness signal sent by the instance during initialization when stopping / suspending an instance. The Instance Group Manager will wait for a signal that indicates successful initialization before stopping / suspending an instance. If a successful readiness signal is not sent before timeout, the corresponding instance will not be stopped / suspended. Instead, an error will be visible in the lastAttempt.errors field of the managed instance in the listmanagedinstances method. If metadataBasedReadinessSignal.timeoutSec is unset, the Instance Group Manager will directly proceed to suspend / stop instances, skipping initialization on them." }, "onFailedHealthCheck": { - "description": "The action that a MIG performs on an unhealthy VM. A VM is marked as unhealthy when the application running on that VM fails a health check. Valid values are: - DEFAULT_ACTION (default): The MIG performs the same action as specified in the instanceLifecyclePolicy.defaultActionOnFailure field. If the defaultActionOnFailure field is set to REPAIR, then the MIG repairs unhealthy VMs. If the defaultActionOnFailure field is set to DO_NOTHING, then the MIG doesn't repair unhealthy VMs. - REPAIR: The MIG repairs unhealthy VMs by recreating it. - DO_NOTHING: The MIG doesn't repair unhealthy VMs. For more information, see About repairing VMs in a MIG. ", + "description": "The action that a MIG performs on an unhealthy VM. A VM is marked as unhealthy when the application running on that VM fails a health check. Valid values are: - DEFAULT_ACTION (default): MIG uses the same action configured for instanceLifecyclePolicy.defaultActionOnFailure field. - REPAIR: MIG automatically repairs an unhealthy VM by recreating it. - DO_NOTHING: MIG doesn't repair an unhealthy VM. For more information, see about repairing VMs in a MIG. ", "enum": [ "DEFAULT_ACTION", "DO_NOTHING", "REPAIR" ], "enumDescriptions": [ - "(Default) The MIG performs the same action as specified in the instanceLifecyclePolicy.defaultActionOnFailure field. If the defaultActionOnFailure field is set to REPAIR, then the MIG repairs unhealthy VMs. If the defaultActionOnFailure field is set to DO_NOTHING, then the MIG doesn't repair unhealthy VMs.", - "The MIG doesn't repair unhealthy VMs.", - "The MIG repairs unhealthy VMs by recreating it." + "(Default) MIG uses the same action configured for instanceLifecyclePolicy.defaultActionOnFailure field.", + "MIG doesn't repair an unhealthy VM.", + "MIG automatically repairs an unhealthy VM by recreating it." ], "type": "string" } @@ -63363,6 +63770,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -63399,6 +63807,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -63423,6 +63832,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -63762,6 +64172,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -63798,6 +64209,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -63822,6 +64234,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -64383,6 +64796,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -64419,6 +64833,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -64443,6 +64858,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -64572,6 +64988,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -64608,6 +65025,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -64632,6 +65050,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -64837,6 +65256,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -64873,6 +65293,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -64897,6 +65318,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -65002,6 +65424,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65038,6 +65461,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65062,6 +65486,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -65172,6 +65597,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65208,6 +65634,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65232,6 +65659,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -65324,6 +65752,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65360,6 +65789,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65384,6 +65814,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -65905,6 +66336,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65941,6 +66373,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65965,6 +66398,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66057,6 +66491,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66093,6 +66528,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66117,6 +66553,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66191,6 +66628,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66227,6 +66665,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66251,6 +66690,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66319,7 +66759,7 @@ ], "enumDescriptions": [ "The instance is halted and we are performing tear down tasks like network deprogramming, releasing quota, IP, tearing down disks etc.", - "The instance is shutting down gracefully.", + "The instance is gracefully shutting down.", "Resources are being allocated for the instance.", "The instance is in repair.", "The instance is running.", @@ -66400,6 +66840,13 @@ "description": "[Output Only] The name of the firewall policy.", "type": "string" }, + "packetMirroringRules": { + "description": "[Output Only] The packet mirroring rules that apply to the instance.", + "items": { + "$ref": "FirewallPolicyRule" + }, + "type": "array" + }, "priority": { "description": "[Output only] Priority of firewall policy association. Not applicable for type=HIERARCHY.", "format": "int32", @@ -66575,6 +67022,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66611,6 +67059,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66635,6 +67084,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66977,6 +67427,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -67013,6 +67464,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -67037,6 +67489,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -67228,6 +67681,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -67264,6 +67718,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -67288,6 +67743,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -67373,6 +67829,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -67409,6 +67866,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -67433,6 +67891,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -67507,9 +67966,11 @@ "description": "[Output only] List of features available for this Interconnect connection, which can take one of the following values: - IF_MACSEC If present then the Interconnect connection is provisioned on MACsec capable hardware ports. If not present then the Interconnect connection is provisioned on non-MACsec capable ports and MACsec isn't supported and enabling MACsec fails.", "items": { "enum": [ + "IF_CROSS_SITE_NETWORK", "IF_MACSEC" ], "enumDescriptions": [ + "Cross Site Networking", "Media Access Control security (MACsec)" ], "type": "string" @@ -67667,9 +68128,11 @@ "description": "Optional. List of features requested for this Interconnect connection, which can take one of the following values: - IF_MACSEC If specified then the connection is created on MACsec capable hardware ports. If not specified, the default value is false, which allocates non-MACsec capable ports first if available. This parameter can be provided only with Interconnect INSERT. It isn't valid for Interconnect PATCH.", "items": { "enum": [ + "IF_CROSS_SITE_NETWORK", "IF_MACSEC" ], "enumDescriptions": [ + "Cross Site Networking", "Media Access Control security (MACsec)" ], "type": "string" @@ -67704,6 +68167,13 @@ "The interconnect has not completed turnup. No attachments may be provisioned on this interconnect." ], "type": "string" + }, + "wireGroups": { + "description": "[Output Only] A list of the URLs of all CrossSiteNetwork WireGroups configured to use this Interconnect. The Interconnect cannot be deleted if this list is non-empty.", + "items": { + "type": "string" + }, + "type": "array" } }, "type": "object" @@ -68138,6 +68608,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -68174,6 +68645,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -68198,6 +68670,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -68606,6 +69079,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -68642,6 +69116,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -68666,6 +69141,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -68758,6 +69234,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -68794,6 +69271,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -68818,6 +69296,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -68923,6 +69402,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -68959,6 +69439,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -68983,6 +69464,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -69541,6 +70023,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -69577,6 +70060,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -69601,6 +70085,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -69693,6 +70178,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -69729,6 +70215,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -69753,6 +70240,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -69803,12 +70291,14 @@ "type": "string" }, "availableFeatures": { - "description": "[Output only] List of features available at this InterconnectLocation, which can take one of the following values: - MACSEC ", + "description": "[Output only] List of features available at this InterconnectLocation, which can take one of the following values: - IF_MACSEC ", "items": { "enum": [ + "IF_CROSS_SITE_NETWORK", "IF_MACSEC" ], "enumDescriptions": [ + "Cross Site Networking", "Media Access Control security (MACsec)" ], "type": "string" @@ -69866,6 +70356,13 @@ "description": "[Output Only] Creation timestamp in RFC3339 text format.", "type": "string" }, + "crossSiteInterconnectInfos": { + "description": "[Output Only] A list of InterconnectLocation.CrossSiteInterconnectInfo objects, that describe parameters pertaining to the relation between this InterconnectLocation and various Interconnect metros.", + "items": { + "$ref": "InterconnectLocationCrossSiteInterconnectInfo" + }, + "type": "array" + }, "description": { "description": "[Output Only] An optional description of the resource.", "type": "string" @@ -69930,6 +70427,22 @@ }, "type": "object" }, + "InterconnectLocationCrossSiteInterconnectInfo": { + "description": "Information about any potential WireGroups between an Interconnect at a specific InterconnectLocation, and an Interconnect in another metro.", + "id": "InterconnectLocationCrossSiteInterconnectInfo", + "properties": { + "city": { + "description": "Metropolitan area designator", + "type": "string" + }, + "maxSingleFlowGbps": { + "description": "The maximum gbps for a single flow to this metro. This limits the total bandwidth which may be configured per wire.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, "InterconnectLocationList": { "description": "Response to the list request, and contains a list of interconnect locations.", "id": "InterconnectLocationList", @@ -69985,6 +70498,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -70021,6 +70535,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -70045,6 +70560,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -70493,6 +71009,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -70529,6 +71046,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -70553,6 +71071,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -70743,6 +71262,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -70779,6 +71299,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -70803,6 +71324,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -70895,6 +71417,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -70931,6 +71454,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -70955,6 +71479,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -71126,7 +71651,8 @@ "type": "array" }, "resourceRequirements": { - "$ref": "LicenseResourceRequirements" + "$ref": "LicenseResourceRequirements", + "description": "[Input Only] Deprecated." }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", @@ -71306,12 +71832,12 @@ "id": "LicenseResourceRequirements", "properties": { "minGuestCpuCount": { - "description": "Minimum number of guest cpus required to use the Instance. Enforced at Instance creation and Instance start.", + "description": "[Input Only] Deprecated. This field no longer reflects the minimum number of guest cpus required to use the Instance.", "format": "int32", "type": "integer" }, "minMemoryMb": { - "description": "Minimum memory required to use the Instance. Enforced at Instance creation and Instance start.", + "description": "[Input Only] Deprecated. This field no longer reflects the minimum memory required to use the Instance.", "format": "int32", "type": "integer" } @@ -71367,6 +71893,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -71403,6 +71930,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -71427,6 +71955,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -71529,6 +72058,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -71565,6 +72095,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -71589,6 +72120,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -71903,6 +72435,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -71939,6 +72472,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -71963,6 +72497,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -72168,6 +72703,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -72204,6 +72740,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -72228,6 +72765,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -72320,6 +72858,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -72356,6 +72895,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -72380,6 +72920,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -72454,6 +72995,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -72490,6 +73032,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -72514,6 +73057,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -72638,7 +73182,7 @@ ], "enumDescriptions": [ "The instance is halted and we are performing tear down tasks like network deprogramming, releasing quota, IP, tearing down disks etc.", - "The instance is shutting down gracefully.", + "The instance is gracefully shutting down.", "Resources are being allocated for the instance.", "The instance is in repair.", "The instance is running.", @@ -72770,10 +73314,12 @@ "provisioningModel": { "description": "The provisioning model to be used for this instance.", "enum": [ + "RESERVATION_BOUND", "SPOT", "STANDARD" ], "enumDescriptions": [ + "Bound to the lifecycle of the reservation in which it is provisioned.", "Heavily discounted, no guaranteed runtime.", "Standard provisioning with user controlled runtime, no discounts." ], @@ -72887,10 +73433,12 @@ "provisioningModel": { "description": "The provisioning model to be used for this instance.", "enum": [ + "RESERVATION_BOUND", "SPOT", "STANDARD" ], "enumDescriptions": [ + "Bound to the lifecycle of the reservation in which it is provisioned.", "Heavily discounted, no guaranteed runtime.", "Standard provisioning with user controlled runtime, no discounts." ], @@ -73062,21 +73610,11 @@ "description": "[Output only] Type of the resource. Always compute#multiMig for multi-MIGs.", "type": "string" }, - "locationPolicy": { - "$ref": "MultiMigLocationPolicy" - }, "name": { "description": "The name of the multi-MIG. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "type": "string" }, - "parts": { - "additionalProperties": { - "$ref": "MultiMigPart" - }, - "description": "Map of user-provided names associated with their parts. Keys in the map are arbitrary names chosen by the user for parts. Keys need to be alphanumeric and not longer than 64 characters.", - "type": "object" - }, "region": { "description": "[Output only] The URL of the region where the resource resides. You must specify this field as part of the HTTP request URL. You cannot set the region as a field in the request body.", "type": "string" @@ -73085,10 +73623,6 @@ "$ref": "MultiMigResourcePolicies", "description": "Resource policies for this multi-MIG." }, - "schedulingPolicy": { - "$ref": "MultiMigSchedulingPolicy", - "description": "Policy for handling provisioning and other scheduling-related events." - }, "selfLink": { "description": "[Output only] Server-defined URL for the resource.", "type": "string" @@ -73103,35 +73637,6 @@ }, "type": "object" }, - "MultiMigLocationPolicy": { - "description": "Policy regarding where to create managed instance groups. Initially only zonal managed instance groups in the same zone are supported.", - "id": "MultiMigLocationPolicy", - "properties": { - "provisioningZones": { - "description": "List of zones where managed instance groups will be provisioned. Should be valid RFC1035 name.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "MultiMigPart": { - "description": "Part represents a single managed instance group, either as a reference to an existing one or as a structure containing properties necessary to create one. A multi-MIG can contain zero or more parts.", - "id": "MultiMigPart", - "properties": { - "instanceGroupManager": { - "description": "The URL of a managed instance group that you want to attach to the multi-MIG.", - "type": "string" - }, - "instanceGroupManagerProperties": { - "$ref": "InstanceGroupManager", - "description": "A managed instance group to be created by the multi-MIG." - } - }, - "type": "object" - }, "MultiMigResourcePolicies": { "description": "Resource policies message for a multi-MIG. Specifies the workload policy configuration of the multi-MIG.", "id": "MultiMigResourcePolicies", @@ -73143,25 +73648,6 @@ }, "type": "object" }, - "MultiMigSchedulingPolicy": { - "description": "Policy for handling provisioning and other scheduling-related events.", - "id": "MultiMigSchedulingPolicy", - "properties": { - "provisioning": { - "description": "How provisioning of parts (instance group managers) should be scheduled (coordinated or not).", - "enum": [ - "ANY", - "COOORDINATED" - ], - "enumDescriptions": [ - "Allows idependent lifecycles of parts.", - "Requires all parts at the same time." - ], - "type": "string" - } - }, - "type": "object" - }, "MultiMigStatus": { "id": "MultiMigStatus", "properties": { @@ -73238,6 +73724,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -73274,6 +73761,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -73298,6 +73786,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -73549,7 +74038,7 @@ "type": "string" }, "networkProfile": { - "description": "A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: - https://www.googleapis.com/compute/alpha/projects/{project_id}/global/networkProfiles/{network_profile_name} - projects/{project_id}/global/networkProfiles/{network_profile_name} ", + "description": "A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: - https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} - projects/{project_id}/global/networkProfiles/{network_profile_name} ", "type": "string" }, "peerings": { @@ -73737,6 +74226,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -73773,6 +74263,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -73797,6 +74288,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -73941,6 +74433,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -73977,6 +74470,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74001,6 +74495,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74075,6 +74570,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74111,6 +74607,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74135,6 +74632,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74288,6 +74786,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74324,6 +74823,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74348,6 +74848,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74422,6 +74923,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74458,6 +74960,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74482,6 +74985,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74757,6 +75261,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74793,6 +75298,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74817,6 +75323,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74989,6 +75496,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -75025,6 +75533,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -75049,6 +75558,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -75260,6 +75770,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -75296,6 +75807,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -75320,6 +75832,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -75394,6 +75907,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -75430,6 +75944,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -75454,6 +75969,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -75613,7 +76129,7 @@ "type": "string" }, "parentNicName": { - "description": "Name of the parent network interface of a VLAN based nic. If this field is specified, vlan must be set.", + "description": "Name of the parent network interface of a dynamic network interface.", "type": "string" }, "queueCount": { @@ -75647,7 +76163,7 @@ "type": "string" }, "vlan": { - "description": "VLAN tag of a VLAN based network interface, must be in range from 2 to 4094 inclusively. This field is mandatory if the parent network interface name is set.", + "description": "VLAN tag of a dynamic network interface, must be in range from 2 to 4094 inclusively.", "format": "int32", "type": "integer" } @@ -75741,6 +76257,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -75777,6 +76294,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -75801,6 +76319,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -75968,6 +76487,10 @@ "description": "[Output Only] Type of the resource. Always compute#networkProfile for network profiles.", "type": "string" }, + "location": { + "$ref": "NetworkProfileLocation", + "description": "[Output Only] Location to which the network is restricted." + }, "name": { "description": "[Output Only] Name of the resource.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", @@ -75988,6 +76511,26 @@ }, "type": "object" }, + "NetworkProfileLocation": { + "id": "NetworkProfileLocation", + "properties": { + "name": { + "type": "string" + }, + "scope": { + "enum": [ + "REGION", + "ZONE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, "NetworkProfileNetworkFeatures": { "id": "NetworkProfileNetworkFeatures", "properties": { @@ -76359,6 +76902,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76395,6 +76939,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76419,6 +76964,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -76488,6 +77034,22 @@ ], "type": "string" }, + "effectiveBgpAlwaysCompareMed": { + "description": "[Output Only] Effective value of the bgp_always_compare_med field.", + "type": "boolean" + }, + "effectiveBgpInterRegionCost": { + "description": "[Output Only] Effective value of the bgp_inter_region_cost field.", + "enum": [ + "ADD_COST_TO_MED", + "DEFAULT" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, "routingMode": { "description": "The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.", "enum": [ @@ -76577,6 +77139,13 @@ "description": "[Output Only] The name of the firewall policy.", "type": "string" }, + "packetMirroringRules": { + "description": "[Output Only] The packet mirroring rules that apply to the network.", + "items": { + "$ref": "FirewallPolicyRule" + }, + "type": "array" + }, "priority": { "description": "[Output only] Priority of firewall policy association. Not applicable for type=HIERARCHY.", "format": "int32", @@ -76826,6 +77395,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76862,6 +77432,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76886,6 +77457,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77010,6 +77582,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77046,6 +77619,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77070,6 +77644,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77302,6 +77877,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77338,6 +77914,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77362,6 +77939,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77453,6 +78031,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77489,6 +78068,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77513,6 +78093,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77741,6 +78322,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77777,6 +78359,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77801,6 +78384,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77893,6 +78477,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77929,6 +78514,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77953,6 +78539,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78042,6 +78629,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78078,6 +78666,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78102,6 +78691,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78179,6 +78769,11 @@ "format": "int32", "type": "integer" }, + "maxVms": { + "description": "[Output Only] Maximum number of VMs that can be created for this node type.", + "format": "int32", + "type": "integer" + }, "memoryMb": { "description": "[Output Only] The amount of physical memory available to the node type, defined in MB.", "format": "int32", @@ -78266,6 +78861,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78302,6 +78898,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78326,6 +78923,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78418,6 +79016,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78454,6 +79053,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78478,6 +79078,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78552,6 +79153,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78588,6 +79190,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78612,6 +79215,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78754,6 +79358,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78790,6 +79395,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78814,6 +79420,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78933,6 +79540,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78969,6 +79577,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78993,6 +79602,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79067,6 +79677,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79103,6 +79714,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79127,6 +79739,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79354,6 +79967,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79390,6 +80004,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79414,6 +80029,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79519,6 +80135,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79555,6 +80172,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79579,6 +80197,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79671,6 +80290,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79707,6 +80327,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79731,6 +80352,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79805,6 +80427,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79841,6 +80464,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79865,6 +80489,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -80197,6 +80822,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -80233,6 +80859,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -80257,6 +80884,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -80397,6 +81025,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -80433,6 +81062,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -80457,6 +81087,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -80600,6 +81231,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -80636,6 +81268,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -80660,6 +81293,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -80726,15 +81360,15 @@ }, "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. If defaultRouteAction is specified, don't set defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is specified, don't set defaultService. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." + "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." }, "defaultService": { - "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. Don't set both. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", + "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", "type": "string" }, "defaultUrlRedirect": { "$ref": "HttpRedirectAction", - "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, then set either defaultService or defaultRouteAction. Don't set both. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", @@ -80782,15 +81416,15 @@ }, "routeAction": { "$ref": "HttpRouteAction", - "description": "In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path rule's routeAction." + "description": "In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path rule's routeAction." }, "service": { - "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set.", + "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.", "type": "string" }, "urlRedirect": { "$ref": "HttpRedirectAction", - "description": "When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." } }, "type": "object" @@ -80815,7 +81449,7 @@ "type": "string" }, "name": { - "description": "The name of a per-instance configuration and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance configuration with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance configconfiguration for a VM instance that either doesn't exist or is not part of the group will result in an error.", + "description": "The name of a per-instance configuration and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance configuration with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance configuration for a VM instance that either doesn't exist or is not part of the group will result in an error.", "type": "string" }, "preservedState": { @@ -81209,7 +81843,7 @@ "type": "string" }, "enabledFeatures": { - "description": "Restricted features enabled for use on this project.", + "description": "An optional list of restricted features enabled for use on this project.", "items": { "type": "string" }, @@ -81256,7 +81890,7 @@ }, "usageExportLocation": { "$ref": "UsageExportLocation", - "description": "The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." + "description": "An optional naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." }, "vmDnsSetting": { "description": "[Output Only] Default internal DNS setting used by VMs running in this project.", @@ -81592,6 +82226,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -81628,6 +82263,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -81652,6 +82288,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -81900,6 +82537,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -81936,6 +82574,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -81960,6 +82599,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -82051,6 +82691,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82087,6 +82728,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82111,6 +82753,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -82247,6 +82890,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82283,6 +82927,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82307,6 +82952,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -82483,6 +83129,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82519,6 +83166,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82543,6 +83191,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -82713,6 +83362,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82749,6 +83399,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82773,6 +83424,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -82847,6 +83499,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82883,6 +83536,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82907,6 +83561,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83477,6 +84132,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -83513,6 +84169,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -83537,6 +84194,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83681,6 +84339,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -83717,6 +84376,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -83741,6 +84401,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83845,6 +84506,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -83881,6 +84543,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -83905,6 +84568,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -84044,6 +84708,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -84080,6 +84745,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -84104,6 +84770,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -84210,6 +84877,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -84246,6 +84914,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -84270,6 +84939,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -84385,6 +85055,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -84421,6 +85092,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -84445,6 +85117,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -84664,6 +85337,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -84700,6 +85374,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -84724,6 +85399,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -84960,6 +85636,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -84996,6 +85673,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -85020,6 +85698,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -85153,6 +85832,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -85189,6 +85869,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -85213,6 +85894,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -85307,6 +85989,13 @@ "description": "[Output Only] The name of the firewall policy.", "type": "string" }, + "packetMirroringRules": { + "description": "[Output only] The packet mirroring rules that apply to the network.", + "items": { + "$ref": "FirewallPolicyRule" + }, + "type": "array" + }, "priority": { "description": "[Output only] Priority of firewall policy association. Not applicable for type=HIERARCHY.", "format": "int32", @@ -85508,20 +86197,6 @@ "format": "uint64", "type": "string" }, - "instanceTerminationAction": { - "description": "Instance termination action is invoked when the reservation is deleted. This only applies to reservations with a Deployment type.", - "enum": [ - "DELETE", - "INSTANCE_TERMINATION_ACTION_UNSPECIFIED", - "STOP" - ], - "enumDescriptions": [ - "Delete the VM.", - "Default value. This value is unused.", - "Stop the VM without storing in-memory content. default action." - ], - "type": "string" - }, "kind": { "default": "compute#reservation", "description": "[Output Only] Type of the resource. Always compute#reservations for reservations.", @@ -85702,6 +86377,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -85738,6 +86414,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -85762,6 +86439,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -85953,6 +86631,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -85989,6 +86668,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -86013,6 +86693,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -86104,6 +86785,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -86140,6 +86822,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -86164,6 +86847,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -86201,6 +86885,50 @@ }, "type": "object" }, + "ReservationsBlocksPerformMaintenanceRequest": { + "id": "ReservationsBlocksPerformMaintenanceRequest", + "properties": { + "maintenanceScope": { + "description": "Specifies if all, running or unused hosts are in scope for this request.", + "enum": [ + "ALL", + "MAINTENANCE_SCOPE_UNSPECIFIED", + "RUNNING_VMS", + "UNUSED_CAPACITY" + ], + "enumDescriptions": [ + "Trigger maintenance for all hosts belonging to this reservation irrespective of whether VMs are running on them or not.", + "Internal only", + "Trigger maintenance only on the hosts belonging to this reservation which have VMs running on them.", + "Trigger maintenance only on the hosts belonging to this reservation which do not have any VMs running on them. This is not allowed for Standard ExR" + ], + "type": "string" + } + }, + "type": "object" + }, + "ReservationsPerformMaintenanceRequest": { + "id": "ReservationsPerformMaintenanceRequest", + "properties": { + "maintenanceScope": { + "description": "Specifies if all, running or unused hosts are in scope for this request.", + "enum": [ + "ALL", + "MAINTENANCE_SCOPE_UNSPECIFIED", + "RUNNING_VMS", + "UNUSED_CAPACITY" + ], + "enumDescriptions": [ + "Trigger maintenance for all hosts belonging to this reservation irrespective of whether VMs are running on them or not.", + "Internal only", + "Trigger maintenance only on the hosts belonging to this reservation which have VMs running on them.", + "Trigger maintenance only on the hosts belonging to this reservation which do not have any VMs running on them. This is not allowed for Standard ExR" + ], + "type": "string" + } + }, + "type": "object" + }, "ReservationsResizeRequest": { "id": "ReservationsResizeRequest", "properties": { @@ -86249,6 +86977,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -86285,6 +87014,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -86309,6 +87039,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -86427,6 +87158,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -86463,6 +87195,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -86487,6 +87220,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -86680,6 +87414,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -86716,6 +87451,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -86740,6 +87476,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -86977,6 +87714,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -87013,6 +87751,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -87037,6 +87776,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -87323,12 +88063,12 @@ "description": "[Output Only] Contains last termination details why the instance was terminated." }, "physicalHost": { - "description": "[Output Only] An opaque ID of the host on which the VM is running.", + "description": "[Output Only] The precise location of your instance within the zone's data center, including the block, sub-block, and host. The field is formatted as follows: blockId/subBlockId/hostId.", "type": "string" }, "physicalHostTopology": { "$ref": "ResourceStatusPhysicalHostTopology", - "description": "[Output Only] The physical host topology of the host on which the VM is running." + "description": "[Output Only] A series of fields containing the global name of the Compute Engine cluster, as well as the ID of the block, sub-block, and host on which the running instance is located." }, "scheduling": { "$ref": "ResourceStatusScheduling" @@ -87342,7 +88082,7 @@ }, "shutdownDetails": { "$ref": "ResourceStatusShutdownDetails", - "description": "[Output Only] Details about stopping state of instance" + "description": "[Output Only] Details about the instance stopping state." }, "upcomingMaintenance": { "$ref": "UpcomingMaintenance" @@ -87461,15 +88201,19 @@ "id": "ResourceStatusPhysicalHostTopology", "properties": { "block": { + "description": "[Output Only] The ID of the block in which the running instance is located. Instances within the same block experience low network latency.", "type": "string" }, "cluster": { + "description": "[Output Only] The global name of the Compute Engine cluster where the running instance is located.", "type": "string" }, "host": { + "description": "[Output Only] The ID of the host on which the running instance is located. Instances on the same host experience the lowest possible network latency.", "type": "string" }, "subblock": { + "description": "[Output Only] The ID of the sub-block in which the running instance is located. Instances in the same sub-block experience lower network latency than instances in the same block.", "type": "string" } }, @@ -87530,12 +88274,12 @@ "type": "object" }, "ResourceStatusShutdownDetails": { - "description": "Specifies if the instance is in `SHUTTING_DOWN` state or there is a instance stopping scheduled.", + "description": "Specifies if the instance is in `PENDING_STOP` state or there is a programmed stop scheduled.", "id": "ResourceStatusShutdownDetails", "properties": { "maxDuration": { "$ref": "Duration", - "description": "Duration for graceful shutdown. Only applicable when `stop_state=SHUTTING_DOWN`." + "description": "The duration for graceful shutdown. Only applicable when `stop_state=PENDING_STOP`." }, "requestTimestamp": { "description": "Past timestamp indicating the beginning of current `stopState` in RFC3339 text format.", @@ -87545,12 +88289,10 @@ "description": "Current stopping state of the instance.", "enum": [ "PENDING_STOP", - "SHUTTING_DOWN", "STOPPING" ], "enumDescriptions": [ "The instance is gracefully shutting down.", - "Deprecating, please use PENDING_STOP. The instance is gracefully shutting down.", "The instance is stopping." ], "type": "string" @@ -87811,6 +88553,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -87847,6 +88590,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -87871,6 +88615,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -87995,6 +88740,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -88031,6 +88777,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -88055,6 +88802,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -88326,6 +89074,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -88362,6 +89111,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -88386,6 +89136,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -88840,6 +89591,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -88876,6 +89628,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -88900,6 +89653,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -89618,6 +90372,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -89654,6 +90409,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -89678,6 +90434,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -89779,6 +90536,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -89815,6 +90573,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -89839,6 +90598,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -89940,6 +90700,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -89976,6 +90737,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -90000,6 +90762,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -90084,6 +90847,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -90120,6 +90884,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -90144,6 +90909,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -90536,10 +91302,12 @@ "provisioningModel": { "description": "Specifies the provisioning model of the instance.", "enum": [ + "RESERVATION_BOUND", "SPOT", "STANDARD" ], "enumDescriptions": [ + "Bound to the lifecycle of the reservation in which it is provisioned.", "Heavily discounted, no guaranteed runtime.", "Standard provisioning with user controlled runtime, no discounts." ], @@ -90577,7 +91345,7 @@ "type": "object" }, "SchedulingGracefulShutdown": { - "description": "Configuration for gracefully shutting down the instance.", + "description": "The configuration for gracefully shutting down the instance.", "id": "SchedulingGracefulShutdown", "properties": { "enabled": { @@ -90586,7 +91354,7 @@ }, "maxDuration": { "$ref": "Duration", - "description": "Specifies time needed to gracefully shut down the instance. After that time, the instance goes to STOPPING even if graceful shutdown is not completed." + "description": "The time allotted for the instance to gracefully shut down. If the graceful shutdown isn't complete after this time, then the instance transitions to the STOPPING state." } }, "type": "object" @@ -90726,6 +91494,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -90762,6 +91531,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -90786,6 +91556,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -90869,6 +91640,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -90905,6 +91677,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -90929,6 +91702,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -91283,6 +92057,10 @@ ], "type": "string" }, + "requestBodyInspectionSize": { + "description": "The maximum request size chosen by the customer with Waf enabled. Currently only \"8KB\" and \"128KB\" are supported. Values are case insensitive.", + "type": "string" + }, "userIpRequestHeaders": { "description": "An optional list of case-insensitive request header names to use for resolving the callers client IP address.", "items": { @@ -91438,6 +92216,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -91474,6 +92253,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -91498,6 +92278,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -92018,7 +92799,7 @@ "type": "string" }, "enforceOnKey": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKey\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. ", + "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKey\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. ", "enum": [ "ALL", "ALL_IPS", @@ -92029,6 +92810,7 @@ "REGION_CODE", "SNI", "TLS_JA3_FINGERPRINT", + "TLS_JA4_FINGERPRINT", "USER_IP", "XFF_IP" ], @@ -92043,6 +92825,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -92056,6 +92839,7 @@ "", "", "", + "", "" ], "type": "string" @@ -92098,7 +92882,7 @@ "type": "string" }, "enforceOnKeyType": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKeyConfigs\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. ", + "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKeyConfigs\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. ", "enum": [ "ALL", "ALL_IPS", @@ -92109,6 +92893,7 @@ "REGION_CODE", "SNI", "TLS_JA3_FINGERPRINT", + "TLS_JA4_FINGERPRINT", "USER_IP", "XFF_IP" ], @@ -92123,6 +92908,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -92136,6 +92922,7 @@ "", "", "", + "", "" ], "type": "string" @@ -92565,6 +93352,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -92601,6 +93389,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -92625,6 +93414,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -92780,6 +93570,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -92816,6 +93607,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -92840,6 +93632,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -92947,6 +93740,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -92983,6 +93777,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -93007,6 +93802,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -93649,6 +94445,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -93685,6 +94482,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -93709,6 +94507,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -93801,6 +94600,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -93837,6 +94637,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -93861,6 +94662,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -94024,6 +94826,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -94060,6 +94863,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -94084,6 +94888,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -94396,6 +95201,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -94432,6 +95238,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -94456,6 +95263,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -94548,6 +95356,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -94584,6 +95393,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -94608,6 +95418,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -94756,6 +95567,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -94792,6 +95604,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -94816,6 +95629,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -94918,6 +95732,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -94954,6 +95769,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -94978,6 +95794,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -95069,6 +95886,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -95105,6 +95923,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -95129,6 +95948,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -95215,6 +96035,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -95251,6 +96072,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -95275,6 +96097,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -95432,6 +96255,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -95468,6 +96292,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -95492,6 +96317,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -95856,6 +96682,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -95892,6 +96719,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -95916,6 +96744,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -96094,6 +96923,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -96130,6 +96960,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -96154,6 +96985,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -96255,6 +97087,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -96291,6 +97124,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -96315,6 +97149,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -96585,6 +97420,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -96621,6 +97457,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -96645,6 +97482,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -96737,6 +97575,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -96773,6 +97612,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -96797,6 +97637,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -96871,6 +97712,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -96907,6 +97749,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -96931,6 +97774,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -97005,6 +97849,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -97041,6 +97886,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -97065,6 +97911,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -97276,7 +98123,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", + "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", "enum": [ "AGGREGATE", "CLOUD_EXTENSION", @@ -97439,6 +98286,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -97475,6 +98323,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -97499,6 +98348,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -97591,6 +98441,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -97627,6 +98478,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -97651,6 +98503,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -97815,6 +98668,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -97851,6 +98705,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -97875,6 +98730,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -97946,6 +98802,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -97982,6 +98839,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -98006,6 +98864,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -98254,6 +99113,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -98290,6 +99150,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -98314,6 +99175,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -98388,6 +99250,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -98424,6 +99287,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -98448,6 +99312,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -98614,6 +99479,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -98650,6 +99516,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -98674,6 +99541,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -98766,6 +99634,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -98802,6 +99671,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -98826,6 +99696,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -98900,6 +99771,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -98936,6 +99808,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -98960,6 +99833,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -99041,7 +99915,7 @@ "type": "object" }, "TargetHttpsProxy": { - "description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of GCP HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.", + "description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/alpha/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.", "id": "TargetHttpsProxy", "properties": { "authentication": { @@ -99152,12 +100026,14 @@ "enum": [ "DISABLED", "PERMISSIVE", - "STRICT" + "STRICT", + "UNRESTRICTED" ], "enumDescriptions": [ "TLS 1.3 Early Data is not advertised, and any (invalid) attempts to send Early Data will be rejected by closing the connection.", "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE). This mode does not enforce any other limitations for requests with Early Data. The application owner should validate that Early Data is acceptable for a given request path.", - "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) without query parameters. Requests that send Early Data with non-idempotent HTTP methods or with query parameters will be rejected with a HTTP 425." + "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) without query parameters. Requests that send Early Data with non-idempotent HTTP methods or with query parameters will be rejected with a HTTP 425.", + "This enables TLS 1.3 Early Data for requests with any HTTP method including non-idempotent methods list POST. This mode does not enforce any other limitations. This may be valuable for gRPC use cases. However, we do not recommend this method unless you have evaluated your security stance and mitigated the risk of replay attacks using other mechanisms." ], "type": "string" }, @@ -99230,6 +100106,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -99266,6 +100143,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -99290,6 +100168,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -99382,6 +100261,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -99418,6 +100298,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -99442,6 +100323,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -99605,6 +100487,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -99641,6 +100524,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -99665,6 +100549,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -99757,6 +100642,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -99793,6 +100679,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -99817,6 +100704,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -99891,6 +100779,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -99927,6 +100816,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -99951,6 +100841,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -100145,6 +101036,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -100181,6 +101073,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -100205,6 +101098,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -100314,6 +101208,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -100350,6 +101245,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -100374,6 +101270,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -100500,6 +101397,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -100536,6 +101434,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -100560,6 +101459,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -100777,6 +101677,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -100813,6 +101714,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -100837,6 +101739,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -100911,6 +101814,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -100947,6 +101851,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -100971,6 +101876,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -101156,6 +102062,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -101192,6 +102099,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -101216,6 +102124,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -101308,6 +102217,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -101344,6 +102254,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -101368,6 +102279,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -101561,6 +102473,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -101597,6 +102510,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -101621,6 +102535,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -101713,6 +102628,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -101749,6 +102665,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -101773,6 +102690,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -101847,6 +102765,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -101883,6 +102802,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -101907,6 +102827,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -102231,15 +103152,15 @@ }, "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." + "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." }, "defaultService": { - "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any defaultRouteAction.weightedBackendServices. Conversely, if defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", + "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", "type": "string" }, "defaultUrlRedirect": { "$ref": "HttpRedirectAction", - "description": "When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", @@ -102356,6 +103277,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -102392,6 +103314,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -102416,6 +103339,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -102614,6 +103538,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -102650,6 +103575,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -102674,6 +103600,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -102748,6 +103675,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -102784,6 +103712,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -102808,6 +103737,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -102933,7 +103863,7 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", + "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", "enum": [ "AGGREGATE", "CLOUD_EXTENSION", @@ -103085,6 +104015,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -103121,6 +104052,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -103145,6 +104077,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -103351,6 +104284,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -103387,6 +104321,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -103411,6 +104346,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -103607,6 +104543,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -103643,6 +104580,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -103667,6 +104605,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -103759,6 +104698,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -103795,6 +104735,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -103819,6 +104760,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -104015,6 +104957,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -104051,6 +104994,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -104075,6 +105019,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -104328,6 +105273,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -104364,6 +105310,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -104388,6 +105335,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -104480,6 +105428,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -104516,6 +105465,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -104540,6 +105490,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -104614,6 +105565,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -104650,6 +105602,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -104674,6 +105627,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -104869,6 +105823,10 @@ "$ref": "WireGroupServiceLevel", "description": "Service level details determined for the wire group configuration." }, + "topology": { + "$ref": "WireGroupTopology", + "description": "Topology details for the wire group configuration." + }, "wireGroupProperties": { "$ref": "WireGroupProperties", "description": "Properties of the wire group." @@ -104992,6 +105950,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -105028,6 +105987,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -105052,6 +106012,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -105115,15 +106076,17 @@ "id": "WireGroupServiceLevel", "properties": { "availabilityClass": { - "description": "[Output Only] The availability SLA that the wire group qualifies for. One of the following: `NO_AVAILABILITY_SLA`, `AVAILABILITY_99`, or `AVAILABILITY_999`.", + "description": "[Output Only] The availability SLA that the wire group qualifies for. One of the following: `NO_AVAILABILITY_SLA`, `AVAILABILITY_99`, `AVAILABILITY_999`, or `AVAILABILITY_9995`.", "enum": [ "AVAILABILITY_99", "AVAILABILITY_999", + "AVAILABILITY_9995", "NO_AVAILABILITY_SLA" ], "enumDescriptions": [ "99% availability", "99.9% availability", + "99.95% availability", "No SLA" ], "type": "string" @@ -105131,6 +106094,35 @@ }, "type": "object" }, + "WireGroupTopology": { + "description": "Topology details for the wire group.", + "id": "WireGroupTopology", + "properties": { + "endpoints": { + "description": "Topology details for all endpoints in the wire group.", + "items": { + "$ref": "WireGroupTopologyEndpoint" + }, + "type": "array" + } + }, + "type": "object" + }, + "WireGroupTopologyEndpoint": { + "description": "Topology details for a single wire group endpoint.", + "id": "WireGroupTopologyEndpoint", + "properties": { + "city": { + "description": "The InterconnectLocation.city (metropolitan area designator) that all interconnects are located in.", + "type": "string" + }, + "label": { + "description": "Endpoint label from the wire group.", + "type": "string" + } + }, + "type": "object" + }, "WireGroupWireInputs": { "description": "Optional settings for individual wires. Allows wire-level control that can be useful for migration purposes. If you use this field, you opt-out of the SLA for the wire group.", "id": "WireGroupWireInputs", @@ -105253,6 +106245,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -105289,6 +106282,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -105313,6 +106307,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -105492,6 +106487,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -105528,6 +106524,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -105552,6 +106549,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", diff --git a/compute/v0.alpha/compute-gen.go b/compute/v0.alpha/compute-gen.go index a84e9e87c67..8645377b7a2 100644 --- a/compute/v0.alpha/compute-gen.go +++ b/compute/v0.alpha/compute-gen.go @@ -1794,6 +1794,8 @@ type AcceleratorTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -1948,6 +1950,8 @@ type AcceleratorTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -2088,6 +2092,8 @@ type AcceleratorTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -2509,6 +2515,8 @@ type AddressAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -2663,6 +2671,8 @@ type AddressListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -2802,6 +2812,8 @@ type AddressesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -3928,6 +3940,8 @@ type AutoscalerAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -4082,6 +4096,8 @@ type AutoscalerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -4322,6 +4338,8 @@ type AutoscalersScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -5000,7 +5018,8 @@ type BackendBucketCdnPolicy struct { // identifiable) content. CACHE_ALL_STATIC Automatically cache static content, // including common image formats, media (video and audio), and web assets // (JavaScript and CSS). Requests and responses that are marked as uncacheable, - // as well as dynamic content (including HTML), will not be cached. + // as well as dynamic content (including HTML), will not be cached. If no value + // is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. // // Possible values: // "CACHE_ALL_STATIC" - Automatically cache static content, including common @@ -5280,6 +5299,8 @@ type BackendBucketListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -5433,6 +5454,8 @@ type BackendBucketListUsableWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -5914,6 +5937,7 @@ type BackendService struct { // "ALL" - ALL includes TCP, UDP, ICMP, ESP, AH and SCTP. Note that this // should never be used together with target_xx_proxies. // "GRPC" - gRPC (available for Traffic Director). + // "H2C" - HTTP2 over cleartext // "HTTP" // "HTTP2" - HTTP/2 with SSL. // "HTTPS" @@ -6143,6 +6167,8 @@ type BackendServiceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -6231,7 +6257,8 @@ type BackendServiceCdnPolicy struct { // identifiable) content. CACHE_ALL_STATIC Automatically cache static content, // including common image formats, media (video and audio), and web assets // (JavaScript and CSS). Requests and responses that are marked as uncacheable, - // as well as dynamic content (including HTML), will not be cached. + // as well as dynamic content (including HTML), will not be cached. If no value + // is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. // // Possible values: // "CACHE_ALL_STATIC" - Automatically cache static content, including common @@ -6851,6 +6878,8 @@ type BackendServiceListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -7007,6 +7036,8 @@ type BackendServiceListUsableWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -7461,6 +7492,30 @@ func (s BackendServiceUsedBy) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type BackendServicesGetEffectiveSecurityPoliciesResponse struct { + // SecurityPolicies: Effective security policies for the backend service. + SecurityPolicies []*SecurityPolicy `json:"securityPolicies,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "SecurityPolicies") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "SecurityPolicies") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s BackendServicesGetEffectiveSecurityPoliciesResponse) MarshalJSON() ([]byte, error) { + type NoMethod BackendServicesGetEffectiveSecurityPoliciesResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type BackendServicesScopedList struct { // BackendServices: A list of BackendServices contained in this scope. BackendServices []*BackendService `json:"backendServices,omitempty"` @@ -7533,6 +7588,8 @@ type BackendServicesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -8171,19 +8228,21 @@ func (s BundledLocalSsds) MarshalJSON() ([]byte, error) { } type CacheInvalidationRule struct { + // CacheTags: Not implemented. + CacheTags []string `json:"cacheTags,omitempty"` // Host: If set, this invalidation rule will only apply to requests with a Host // header matching host. Host string `json:"host,omitempty"` Path string `json:"path,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. See + // ForceSendFields is a list of field names (e.g. "CacheTags") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Host") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See + // NullFields is a list of field names (e.g. "CacheTags") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -8536,6 +8595,7 @@ type Commitment struct { // "GRAPHICS_OPTIMIZED" // "MEMORY_OPTIMIZED" // "MEMORY_OPTIMIZED_M3" + // "MEMORY_OPTIMIZED_M4" // "MEMORY_OPTIMIZED_X4" // "MEMORY_OPTIMIZED_X4_16TB" // "MEMORY_OPTIMIZED_X4_24TB" @@ -8653,6 +8713,8 @@ type CommitmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -8807,6 +8869,8 @@ type CommitmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -9007,6 +9071,8 @@ type CommitmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -9386,6 +9452,8 @@ type CrossSiteNetworkListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -10100,6 +10168,8 @@ type DiskAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -10377,6 +10447,8 @@ type DiskListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -10479,10 +10551,10 @@ type DiskPairReplicationState struct { // replication after starting the replication. - // ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY: The primary disk is healthily // replicating to the secondary device i.e. last_replication_time is within - // RPO. - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND: The replication is - // lagging above the SLO limit due to some internal issue. - - // ASYNC_REPLICATION_STATE_REPLICATING_UNHEALTHY: The replication is lagging, - // and the RPO is not being met due to some internal issue. . - + // RPO. - ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN: The + // replication is lagging above the SLO limit due to some internal issue. - + // ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING: The replication + // is lagging, and the RPO is not being met due to some internal issue. - // ASYNC_REPLICATION_STATE_REPLICATION_STUCK: The replication is completely // stuck due to some internal error. - ASYNC_REPLICATION_STATE_STOPPING: The // replication is under the process of being stopped. This is a transient @@ -10492,14 +10564,15 @@ type DiskPairReplicationState struct { // Possible values: // "ASYNC_REPLICATION_STATE_INITIALIZING" - The device is doing the initial // replication after starting the replication. - // "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND" - The replication is lagging - // behind (last_replication_time > RPO), because the disk's change rate is - // above the supported limit. + // "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_HIGH_CHURN" - The replication + // is lagging behind (last_replication_time > RPO), because the disk's change + // rate is above the supported limit. + // "ASYNC_REPLICATION_STATE_REPLICATING_BEHIND_SYSTEM_LAGGING" - The + // replication is lagging, and the RPO is not being met due to some internal + // issue. // "ASYNC_REPLICATION_STATE_REPLICATING_HEALTHY" - The primary disk is // healthily replicating to the secondary device i.e. last_replication_time is // within RPO. - // "ASYNC_REPLICATION_STATE_REPLICATING_UNHEALTHY" - The replication is - // lagging, and the RPO is not being met due to some internal issue. // "ASYNC_REPLICATION_STATE_REPLICATION_STUCK" - The replication is // completely stuck due to some internal error. // "ASYNC_REPLICATION_STATE_STOPPED" - The replication between the disk-pairs @@ -10873,6 +10946,8 @@ type DiskTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -11027,6 +11102,8 @@ type DiskTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -11166,6 +11243,8 @@ type DiskTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -11369,6 +11448,8 @@ type DisksScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -11789,6 +11870,8 @@ type ExchangedPeeringRoutesListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -12125,6 +12208,8 @@ type ExternalVpnGatewayListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -12510,6 +12595,8 @@ type FirewallListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -12869,6 +12956,8 @@ type FirewallPolicyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -13664,6 +13753,8 @@ type ForwardingRuleAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -13817,6 +13908,8 @@ type ForwardingRuleListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -14009,6 +14102,8 @@ type ForwardingRulesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -14077,6 +14172,9 @@ func (s ForwardingRulesScopedListWarningData) MarshalJSON() ([]byte, error) { } type FutureReservation struct { + // AggregateReservation: Aggregate reservation details for the future + // reservation. + AggregateReservation *AllocationAggregateReservation `json:"aggregateReservation,omitempty"` // AutoCreatedReservationsDeleteTime: Future timestamp when the FR auto-created // reservations will be deleted by Compute Engine. Format of this field must be // a valid href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339 value. @@ -14114,21 +14212,9 @@ type FutureReservation struct { // Description: An optional description of this resource. Provide this property // when you create the future reservation. Description string `json:"description,omitempty"` - // EnableOpportunisticMaintenance: Indicates if this group of VMs have - // opportunistic maintenance enabled. This will be set on the FR by customers, - // and will be used for reservation and reservation block maintenance . - EnableOpportunisticMaintenance bool `json:"enableOpportunisticMaintenance,omitempty"` // Id: [Output Only] A unique identifier for this future reservation. The // server defines this identifier. Id uint64 `json:"id,omitempty,string"` - // InstanceTerminationAction: Action to take during reservation termination. - // - // Possible values: - // "DELETE" - Delete the VM. - // "INSTANCE_TERMINATION_ACTION_UNSPECIFIED" - Default value. This value is - // unused. - // "STOP" - Stop the VM without storing in-memory content. default action. - InstanceTerminationAction string `json:"instanceTerminationAction,omitempty"` // Kind: [Output Only] Type of the resource. Always compute#futureReservation // for future reservations. Kind string `json:"kind,omitempty"` @@ -14152,6 +14238,17 @@ type FutureReservation struct { // "PLANNING_STATUS_UNSPECIFIED" // "SUBMITTED" - Future Reservation has been submitted for evaluation by GCP. PlanningStatus string `json:"planningStatus,omitempty"` + // ReservationMode: The reservation mode which determines + // reservation-termination behavior and expected pricing. + // + // Possible values: + // "CALENDAR" - The delivered reservations will delivered at specified start + // time and terminated at specified end time along with terminating the VMs + // running on it. + // "DEFAULT" - The delivered reservations do not terminate VMs at the end of + // reservations. This is default mode. + // "RESERVATION_MODE_UNSPECIFIED" + ReservationMode string `json:"reservationMode,omitempty"` // ReservationName: Name of reservations where the capacity is provisioned at // the time of delivery of future reservations. If the reservation with the // given name does not exist already, it is created automatically at the time @@ -14192,18 +14289,16 @@ type FutureReservation struct { // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "AutoCreatedReservationsDeleteTime") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See + // ForceSendFields is a list of field names (e.g. "AggregateReservation") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. - // "AutoCreatedReservationsDeleteTime") to include in API requests with the - // JSON null value. By default, fields with empty values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-NullFields for - // more details. + // NullFields is a list of field names (e.g. "AggregateReservation") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -14626,6 +14721,8 @@ type FutureReservationsAggregatedListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -14784,6 +14881,8 @@ type FutureReservationsListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -14923,6 +15022,8 @@ type FutureReservationsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -15323,10 +15424,6 @@ func (s GlobalSetPolicyRequest) MarshalJSON() ([]byte, error) { // GroupMaintenanceInfo: Maintenance Info for ReservationBlocks. type GroupMaintenanceInfo struct { - // EnableOpportunisticMaintenance: This setting enables or disables - // opportunistic maintenance. If enabled, maintenance is performed on unused - // reservations whenever possible. - EnableOpportunisticMaintenance bool `json:"enableOpportunisticMaintenance,omitempty"` // MaintenanceOngoingCount: Progress for ongoing maintenance for this group of // VMs/hosts. Describes number of hosts in the block that have ongoing // maintenance. @@ -15346,15 +15443,14 @@ type GroupMaintenanceInfo struct { SchedulingType string `json:"schedulingType,omitempty"` // UpcomingGroupMaintenance: Maintenance information on this group of VMs. UpcomingGroupMaintenance *UpcomingMaintenance `json:"upcomingGroupMaintenance,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "EnableOpportunisticMaintenance") to unconditionally include in API - // requests. By default, fields with empty or default values are omitted from - // API requests. See + // ForceSendFields is a list of field names (e.g. "MaintenanceOngoingCount") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableOpportunisticMaintenance") - // to include in API requests with the JSON null value. By default, fields with + // NullFields is a list of field names (e.g. "MaintenanceOngoingCount") to + // include in API requests with the JSON null value. By default, fields with // empty values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` @@ -15983,6 +16079,8 @@ type HealthCheckListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -16306,6 +16404,8 @@ type HealthCheckServiceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -16485,6 +16585,8 @@ type HealthCheckServicesListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -16624,6 +16726,8 @@ type HealthCheckServicesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -16779,6 +16883,8 @@ type HealthChecksAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -16918,6 +17024,8 @@ type HealthChecksScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -17633,6 +17741,8 @@ type HttpHealthCheckListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -18014,26 +18124,21 @@ type HttpRouteRule struct { Priority int64 `json:"priority,omitempty"` // RouteAction: In response to a matching matchRule, the load balancer performs // advanced routing actions, such as URL rewrites and header transformations, - // before forwarding the request to the selected backend. If routeAction - // specifies any weightedBackendServices, service must not be set. Conversely - // if service is set, routeAction cannot contain any weightedBackendServices. - // Only one of urlRedirect, service or routeAction.weightedBackendService must - // be set. URL maps for classic Application Load Balancers only support the - // urlRewrite action within a route rule's routeAction. + // before forwarding the request to the selected backend. Only one of + // urlRedirect, service or routeAction.weightedBackendService can be set. URL + // maps for classic Application Load Balancers only support the urlRewrite + // action within a route rule's routeAction. RouteAction *HttpRouteAction `json:"routeAction,omitempty"` // Service: The full or partial URL of the backend service resource to which // traffic is directed if this rule is matched. If routeAction is also // specified, advanced routing actions, such as URL rewrites, take effect - // before sending the request to the backend. However, if service is specified, - // routeAction cannot contain any weightedBackendServices. Conversely, if - // routeAction specifies any weightedBackendServices, service must not be - // specified. Only one of urlRedirect, service or - // routeAction.weightedBackendService must be set. + // before sending the request to the backend. Only one of urlRedirect, service + // or routeAction.weightedBackendService can be set. Service string `json:"service,omitempty"` // UrlRedirect: When this rule is matched, the request is redirected to a URL - // specified by urlRedirect. If urlRedirect is specified, service or - // routeAction must not be set. Not supported when the URL map is bound to a - // target gRPC proxy. + // specified by urlRedirect. Only one of urlRedirect, service or + // routeAction.weightedBackendService can be set. Not supported when the URL + // map is bound to a target gRPC proxy. UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomErrorResponsePolicy") // to unconditionally include in API requests. By default, fields with empty or @@ -18290,6 +18395,8 @@ type HttpsHealthCheckListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -18718,6 +18825,8 @@ type ImageListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -19027,7 +19136,7 @@ type Instance struct { // "DEPROVISIONING" - The instance is halted and we are performing tear down // tasks like network deprogramming, releasing quota, IP, tearing down disks // etc. - // "PENDING_STOP" - The instance is shutting down gracefully. + // "PENDING_STOP" - The instance is gracefully shutting down. // "PROVISIONING" - Resources are being allocated for the instance. // "REPAIRING" - The instance is in repair. // "RUNNING" - The instance is running. @@ -19167,6 +19276,8 @@ type InstanceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -19456,6 +19567,8 @@ type InstanceGroupAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -19610,6 +19723,8 @@ type InstanceGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -20025,6 +20140,8 @@ type InstanceGroupManagerAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -20281,19 +20398,19 @@ func (s InstanceGroupManagerInstanceFlexibilityPolicyProvisioningModelMix) Marsh } type InstanceGroupManagerInstanceLifecyclePolicy struct { - // DefaultActionOnFailure: The action that a MIG performs on a failed or an - // unhealthy VM. A VM is marked as unhealthy when the application running on - // that VM fails a health check. Valid values are - REPAIR (default): MIG - // automatically repairs a failed or an unhealthy VM by recreating it. For more - // information, see About repairing VMs in a MIG. - DO_NOTHING: MIG does not - // repair a failed or an unhealthy VM. + // DefaultActionOnFailure: The action that a MIG performs on a failed VM. If + // the value of the onFailedHealthCheck field is `DEFAULT_ACTION`, then the + // same action also applies to the VMs on which your application fails a health + // check. Valid values are - REPAIR (default): MIG automatically repairs a + // failed VM by recreating it. For more information, see about repairing VMs in + // a MIG. - DO_NOTHING: MIG does not repair a failed VM. // // Possible values: // "DELETE" - MIG deletes a failed or an unhealthy VM. Deleting the VM // decreases the target size of the MIG. - // "DO_NOTHING" - MIG does not repair a failed or an unhealthy VM. - // "REPAIR" - (Default) MIG automatically repairs a failed or an unhealthy VM - // by recreating it. For more information, see About repairing VMs in a MIG. + // "DO_NOTHING" - MIG does not repair a failed VM. + // "REPAIR" - (default): MIG automatically repairs a failed VM by recreating + // it. For more information, see about repairing VMs in a MIG. DefaultActionOnFailure string `json:"defaultActionOnFailure,omitempty"` // ForceUpdateOnRepair: A bit indicating whether to forcefully apply the // group's latest configuration when repairing a VM. Valid options are: - NO @@ -20319,23 +20436,17 @@ type InstanceGroupManagerInstanceLifecyclePolicy struct { MetadataBasedReadinessSignal *InstanceGroupManagerInstanceLifecyclePolicyMetadataBasedReadinessSignal `json:"metadataBasedReadinessSignal,omitempty"` // OnFailedHealthCheck: The action that a MIG performs on an unhealthy VM. A VM // is marked as unhealthy when the application running on that VM fails a - // health check. Valid values are: - DEFAULT_ACTION (default): The MIG performs - // the same action as specified in the - // instanceLifecyclePolicy.defaultActionOnFailure field. If the - // defaultActionOnFailure field is set to REPAIR, then the MIG repairs - // unhealthy VMs. If the defaultActionOnFailure field is set to DO_NOTHING, - // then the MIG doesn't repair unhealthy VMs. - REPAIR: The MIG repairs - // unhealthy VMs by recreating it. - DO_NOTHING: The MIG doesn't repair - // unhealthy VMs. For more information, see About repairing VMs in a MIG. - // - // Possible values: - // "DEFAULT_ACTION" - (Default) The MIG performs the same action as specified - // in the instanceLifecyclePolicy.defaultActionOnFailure field. If the - // defaultActionOnFailure field is set to REPAIR, then the MIG repairs - // unhealthy VMs. If the defaultActionOnFailure field is set to DO_NOTHING, - // then the MIG doesn't repair unhealthy VMs. - // "DO_NOTHING" - The MIG doesn't repair unhealthy VMs. - // "REPAIR" - The MIG repairs unhealthy VMs by recreating it. + // health check. Valid values are: - DEFAULT_ACTION (default): MIG uses the + // same action configured for instanceLifecyclePolicy.defaultActionOnFailure + // field. - REPAIR: MIG automatically repairs an unhealthy VM by recreating it. + // - DO_NOTHING: MIG doesn't repair an unhealthy VM. For more information, see + // about repairing VMs in a MIG. + // + // Possible values: + // "DEFAULT_ACTION" - (Default) MIG uses the same action configured for + // instanceLifecyclePolicy.defaultActionOnFailure field. + // "DO_NOTHING" - MIG doesn't repair an unhealthy VM. + // "REPAIR" - MIG automatically repairs an unhealthy VM by recreating it. OnFailedHealthCheck string `json:"onFailedHealthCheck,omitempty"` // ForceSendFields is a list of field names (e.g. "DefaultActionOnFailure") to // unconditionally include in API requests. By default, fields with empty or @@ -20465,6 +20576,8 @@ type InstanceGroupManagerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -20958,6 +21071,8 @@ type InstanceGroupManagerResizeRequestsListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -21861,6 +21976,8 @@ type InstanceGroupManagersListPerInstanceConfigsRespWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -22107,6 +22224,8 @@ type InstanceGroupManagersScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -22455,6 +22574,8 @@ type InstanceGroupsListInstancesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -22645,6 +22766,8 @@ type InstanceGroupsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -22828,6 +22951,8 @@ type InstanceListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -22982,6 +23107,8 @@ type InstanceListReferrersWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -23647,6 +23774,8 @@ type InstanceTemplateAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -23801,6 +23930,8 @@ type InstanceTemplateListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -23941,6 +24072,8 @@ type InstanceTemplatesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -24020,7 +24153,7 @@ type InstanceWithNamedPorts struct { // "DEPROVISIONING" - The instance is halted and we are performing tear down // tasks like network deprogramming, releasing quota, IP, tearing down disks // etc. - // "PENDING_STOP" - The instance is shutting down gracefully. + // "PENDING_STOP" - The instance is gracefully shutting down. // "PROVISIONING" - Resources are being allocated for the instance. // "REPAIRING" - The instance is in repair. // "RUNNING" - The instance is running. @@ -24129,6 +24262,9 @@ type InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { DisplayName string `json:"displayName,omitempty"` // Name: [Output Only] The name of the firewall policy. Name string `json:"name,omitempty"` + // PacketMirroringRules: [Output Only] The packet mirroring rules that apply to + // the instance. + PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` // Priority: [Output only] Priority of firewall policy association. Not // applicable for type=HIERARCHY. Priority int64 `json:"priority,omitempty"` @@ -24371,6 +24507,8 @@ type InstancesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -24847,6 +24985,8 @@ type InstantSnapshotAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -25115,6 +25255,8 @@ type InstantSnapshotListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -25276,6 +25418,8 @@ type InstantSnapshotsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -25393,6 +25537,7 @@ type Interconnect struct { // supported and enabling MACsec fails. // // Possible values: + // "IF_CROSS_SITE_NETWORK" - Cross Site Networking // "IF_MACSEC" - Media Access Control security (MACsec) AvailableFeatures []string `json:"availableFeatures,omitempty"` // CircuitInfos: [Output Only] A list of CircuitInfo objects, that describe the @@ -25524,6 +25669,7 @@ type Interconnect struct { // PATCH. // // Possible values: + // "IF_CROSS_SITE_NETWORK" - Cross Site Networking // "IF_MACSEC" - Media Access Control security (MACsec) RequestedFeatures []string `json:"requestedFeatures,omitempty"` // RequestedLinkCount: Target number of physical links in the link bundle, as @@ -25550,6 +25696,10 @@ type Interconnect struct { // "UNPROVISIONED" - The interconnect has not completed turnup. No // attachments may be provisioned on this interconnect. State string `json:"state,omitempty"` + // WireGroups: [Output Only] A list of the URLs of all CrossSiteNetwork + // WireGroups configured to use this Interconnect. The Interconnect cannot be + // deleted if this list is non-empty. + WireGroups []string `json:"wireGroups,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -26062,6 +26212,8 @@ type InterconnectAttachmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26625,6 +26777,8 @@ type InterconnectAttachmentGroupsListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26781,6 +26935,8 @@ type InterconnectAttachmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26979,6 +27135,8 @@ type InterconnectAttachmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -27718,6 +27876,8 @@ type InterconnectGroupsListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -27873,6 +28033,8 @@ type InterconnectListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -27954,9 +28116,11 @@ type InterconnectLocation struct { // "zone1" or "zone2". AvailabilityZone string `json:"availabilityZone,omitempty"` // AvailableFeatures: [Output only] List of features available at this - // InterconnectLocation, which can take one of the following values: - MACSEC + // InterconnectLocation, which can take one of the following values: - + // IF_MACSEC // // Possible values: + // "IF_CROSS_SITE_NETWORK" - Cross Site Networking // "IF_MACSEC" - Media Access Control security (MACsec) AvailableFeatures []string `json:"availableFeatures,omitempty"` // AvailableLinkTypes: [Output only] List of link types available at this @@ -27990,6 +28154,11 @@ type InterconnectLocation struct { Continent string `json:"continent,omitempty"` // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. CreationTimestamp string `json:"creationTimestamp,omitempty"` + // CrossSiteInterconnectInfos: [Output Only] A list of + // InterconnectLocation.CrossSiteInterconnectInfo objects, that describe + // parameters pertaining to the relation between this InterconnectLocation and + // various Interconnect metros. + CrossSiteInterconnectInfos []*InterconnectLocationCrossSiteInterconnectInfo `json:"crossSiteInterconnectInfos,omitempty"` // Description: [Output Only] An optional description of the resource. Description string `json:"description,omitempty"` // FacilityProvider: [Output Only] The name of the provider for this facility @@ -28052,6 +28221,33 @@ func (s InterconnectLocation) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// InterconnectLocationCrossSiteInterconnectInfo: Information about any +// potential WireGroups between an Interconnect at a specific +// InterconnectLocation, and an Interconnect in another metro. +type InterconnectLocationCrossSiteInterconnectInfo struct { + // City: Metropolitan area designator + City string `json:"city,omitempty"` + // MaxSingleFlowGbps: The maximum gbps for a single flow to this metro. This + // limits the total bandwidth which may be configured per wire. + MaxSingleFlowGbps int64 `json:"maxSingleFlowGbps,omitempty"` + // ForceSendFields is a list of field names (e.g. "City") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "City") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InterconnectLocationCrossSiteInterconnectInfo) MarshalJSON() ([]byte, error) { + type NoMethod InterconnectLocationCrossSiteInterconnectInfo + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // InterconnectLocationList: Response to the list request, and contains a list // of interconnect locations. type InterconnectLocationList struct { @@ -28141,6 +28337,8 @@ type InterconnectLocationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -28736,6 +28934,8 @@ type InterconnectRemoteLocationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29027,6 +29227,8 @@ type IpAddressesListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29181,6 +29383,8 @@ type IpOwnerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29375,8 +29579,9 @@ type License struct { // licenseCodes of licenses that satisfy the coattachment requirement of this // license. At least one license from the set must be attached to the same disk // or image as this license. - RequiredCoattachedLicenses []string `json:"requiredCoattachedLicenses,omitempty"` - ResourceRequirements *LicenseResourceRequirements `json:"resourceRequirements,omitempty"` + RequiredCoattachedLicenses []string `json:"requiredCoattachedLicenses,omitempty"` + // ResourceRequirements: [Input Only] Deprecated. + ResourceRequirements *LicenseResourceRequirements `json:"resourceRequirements,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the @@ -29557,11 +29762,11 @@ func (s LicenseResourceCommitment) MarshalJSON() ([]byte, error) { } type LicenseResourceRequirements struct { - // MinGuestCpuCount: Minimum number of guest cpus required to use the Instance. - // Enforced at Instance creation and Instance start. + // MinGuestCpuCount: [Input Only] Deprecated. This field no longer reflects the + // minimum number of guest cpus required to use the Instance. MinGuestCpuCount int64 `json:"minGuestCpuCount,omitempty"` - // MinMemoryMb: Minimum memory required to use the Instance. Enforced at - // Instance creation and Instance start. + // MinMemoryMb: [Input Only] Deprecated. This field no longer reflects the + // minimum memory required to use the Instance. MinMemoryMb int64 `json:"minMemoryMb,omitempty"` // ForceSendFields is a list of field names (e.g. "MinGuestCpuCount") to // unconditionally include in API requests. By default, fields with empty or @@ -29664,6 +29869,8 @@ type LicensesListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29823,6 +30030,8 @@ type ListInstantSnapshotGroupsWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30235,6 +30444,8 @@ type MachineImageListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30491,6 +30702,8 @@ type MachineTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30645,6 +30858,8 @@ type MachineTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30784,6 +30999,8 @@ type MachineTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30928,7 +31145,7 @@ type ManagedInstance struct { // "DEPROVISIONING" - The instance is halted and we are performing tear down // tasks like network deprogramming, releasing quota, IP, tearing down disks // etc. - // "PENDING_STOP" - The instance is shutting down gracefully. + // "PENDING_STOP" - The instance is gracefully shutting down. // "PROVISIONING" - Resources are being allocated for the instance. // "REPAIRING" - The instance is in repair. // "RUNNING" - The instance is running. @@ -31098,6 +31315,8 @@ type ManagedInstanceInstanceFlexibilityOverride struct { // ProvisioningModel: The provisioning model to be used for this instance. // // Possible values: + // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which + // it is provisioned. // "SPOT" - Heavily discounted, no guaranteed runtime. // "STANDARD" - Standard provisioning with user controlled runtime, no // discounts. @@ -31276,6 +31495,8 @@ type ManagedInstancePropertiesFromFlexibilityPolicy struct { // ProvisioningModel: The provisioning model to be used for this instance. // // Possible values: + // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which + // it is provisioned. // "SPOT" - Heavily discounted, no guaranteed runtime. // "STANDARD" - Standard provisioning with user controlled runtime, no // discounts. @@ -31533,8 +31754,7 @@ type MultiMig struct { Id uint64 `json:"id,omitempty,string"` // Kind: [Output only] Type of the resource. Always compute#multiMig for // multi-MIGs. - Kind string `json:"kind,omitempty"` - LocationPolicy *MultiMigLocationPolicy `json:"locationPolicy,omitempty"` + Kind string `json:"kind,omitempty"` // Name: The name of the multi-MIG. The name must be 1-63 characters long, and // comply with RFC1035. Specifically, the name must be 1-63 characters long and // match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the @@ -31542,19 +31762,12 @@ type MultiMig struct { // must be a dash, lowercase letter, or digit, except the last character, which // cannot be a dash. Name string `json:"name,omitempty"` - // Parts: Map of user-provided names associated with their parts. Keys in the - // map are arbitrary names chosen by the user for parts. Keys need to be - // alphanumeric and not longer than 64 characters. - Parts map[string]MultiMigPart `json:"parts,omitempty"` // Region: [Output only] The URL of the region where the resource resides. You // must specify this field as part of the HTTP request URL. You cannot set the // region as a field in the request body. Region string `json:"region,omitempty"` // ResourcePolicies: Resource policies for this multi-MIG. ResourcePolicies *MultiMigResourcePolicies `json:"resourcePolicies,omitempty"` - // SchedulingPolicy: Policy for handling provisioning and other - // scheduling-related events. - SchedulingPolicy *MultiMigSchedulingPolicy `json:"schedulingPolicy,omitempty"` // SelfLink: [Output only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` // SelfLinkWithId: [Output only] Server-defined URL for this resource with the @@ -31582,59 +31795,6 @@ func (s MultiMig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MultiMigLocationPolicy: Policy regarding where to create managed instance -// groups. Initially only zonal managed instance groups in the same zone are -// supported. -type MultiMigLocationPolicy struct { - // ProvisioningZones: List of zones where managed instance groups will be - // provisioned. Should be valid RFC1035 name. - ProvisioningZones []string `json:"provisioningZones,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProvisioningZones") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProvisioningZones") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigLocationPolicy) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigLocationPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// MultiMigPart: Part represents a single managed instance group, either as a -// reference to an existing one or as a structure containing properties -// necessary to create one. A multi-MIG can contain zero or more parts. -type MultiMigPart struct { - // InstanceGroupManager: The URL of a managed instance group that you want to - // attach to the multi-MIG. - InstanceGroupManager string `json:"instanceGroupManager,omitempty"` - // InstanceGroupManagerProperties: A managed instance group to be created by - // the multi-MIG. - InstanceGroupManagerProperties *InstanceGroupManager `json:"instanceGroupManagerProperties,omitempty"` - // ForceSendFields is a list of field names (e.g. "InstanceGroupManager") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "InstanceGroupManager") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigPart) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigPart - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // MultiMigResourcePolicies: Resource policies message for a multi-MIG. // Specifies the workload policy configuration of the multi-MIG. type MultiMigResourcePolicies struct { @@ -31664,34 +31824,6 @@ func (s MultiMigResourcePolicies) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// MultiMigSchedulingPolicy: Policy for handling provisioning and other -// scheduling-related events. -type MultiMigSchedulingPolicy struct { - // Provisioning: How provisioning of parts (instance group managers) should be - // scheduled (coordinated or not). - // - // Possible values: - // "ANY" - Allows idependent lifecycles of parts. - // "COOORDINATED" - Requires all parts at the same time. - Provisioning string `json:"provisioning,omitempty"` - // ForceSendFields is a list of field names (e.g. "Provisioning") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Provisioning") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s MultiMigSchedulingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod MultiMigSchedulingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - type MultiMigStatus struct { MemberInstanceGroupManagers []string `json:"memberInstanceGroupManagers,omitempty"` // ForceSendFields is a list of field names (e.g. @@ -31799,6 +31931,8 @@ type MultiMigsListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -32115,7 +32249,7 @@ type Network struct { // NetworkProfile: A full or partial URL of the network profile to apply to // this network. This field can be set only at resource creation time. For // example, the following are valid URLs: - - // https://www.googleapis.com/compute/alpha/projects/{project_id}/global/networkProfiles/{network_profile_name} + // https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} // - projects/{project_id}/global/networkProfiles/{network_profile_name} NetworkProfile string `json:"networkProfile,omitempty"` // Peerings: [Output Only] A list of network peerings for the resource. @@ -32324,6 +32458,8 @@ type NetworkAttachmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -32528,6 +32664,8 @@ type NetworkAttachmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -32667,6 +32805,8 @@ type NetworkAttachmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -32888,6 +33028,8 @@ type NetworkEdgeSecurityServiceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -33028,6 +33170,8 @@ type NetworkEdgeSecurityServicesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -33368,6 +33512,8 @@ type NetworkEndpointGroupAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -33674,6 +33820,8 @@ type NetworkEndpointGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34013,6 +34161,8 @@ type NetworkEndpointGroupsListNetworkEndpointsWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34154,6 +34304,8 @@ type NetworkEndpointGroupsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34326,8 +34478,8 @@ type NetworkInterface struct { // "UNSPECIFIED_NIC_TYPE" - No type specified. // "VIRTIO_NET" - VIRTIO NicType string `json:"nicType,omitempty"` - // ParentNicName: Name of the parent network interface of a VLAN based nic. If - // this field is specified, vlan must be set. + // ParentNicName: Name of the parent network interface of a dynamic network + // interface. ParentNicName string `json:"parentNicName,omitempty"` // QueueCount: The networking queue count that's specified by users for the // network interface. Both Rx and Tx queues will be set to this number. It'll @@ -34357,9 +34509,8 @@ type NetworkInterface struct { // https://www.googleapis.com/compute/v1/projects/project/regions/region // /subnetworks/subnetwork - regions/region/subnetworks/subnetwork Subnetwork string `json:"subnetwork,omitempty"` - // Vlan: VLAN tag of a VLAN based network interface, must be in range from 2 to - // 4094 inclusively. This field is mandatory if the parent network interface - // name is set. + // Vlan: VLAN tag of a dynamic network interface, must be in range from 2 to + // 4094 inclusively. Vlan int64 `json:"vlan,omitempty"` // ForceSendFields is a list of field names (e.g. "AccessConfigs") to // unconditionally include in API requests. By default, fields with empty or @@ -34505,6 +34656,8 @@ type NetworkListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34704,6 +34857,8 @@ type NetworkProfile struct { // Kind: [Output Only] Type of the resource. Always compute#networkProfile for // network profiles. Kind string `json:"kind,omitempty"` + // Location: [Output Only] Location to which the network is restricted. + Location *NetworkProfileLocation `json:"location,omitempty"` // Name: [Output Only] Name of the resource. Name string `json:"name,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. @@ -34734,6 +34889,30 @@ func (s NetworkProfile) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type NetworkProfileLocation struct { + Name string `json:"name,omitempty"` + // Possible values: + // "REGION" + // "ZONE" + Scope string `json:"scope,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s NetworkProfileLocation) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfileLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type NetworkProfileNetworkFeatures struct { // AddressPurposes: Specifies what address purposes are supported. If empty, // all address purposes are supported. @@ -35009,6 +35188,8 @@ type NetworkProfilesListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -35101,6 +35282,16 @@ type NetworkRoutingConfig struct { // "ADD_COST_TO_MED" // "DEFAULT" BgpInterRegionCost string `json:"bgpInterRegionCost,omitempty"` + // EffectiveBgpAlwaysCompareMed: [Output Only] Effective value of the + // bgp_always_compare_med field. + EffectiveBgpAlwaysCompareMed bool `json:"effectiveBgpAlwaysCompareMed,omitempty"` + // EffectiveBgpInterRegionCost: [Output Only] Effective value of the + // bgp_inter_region_cost field. + // + // Possible values: + // "ADD_COST_TO_MED" + // "DEFAULT" + EffectiveBgpInterRegionCost string `json:"effectiveBgpInterRegionCost,omitempty"` // RoutingMode: The network-wide routing mode to use. If set to REGIONAL, this // network's Cloud Routers will only advertise routes with subnets of this // network in the same region as the router. If set to GLOBAL, this network's @@ -35213,6 +35404,9 @@ type NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy struct { DisplayName string `json:"displayName,omitempty"` // Name: [Output Only] The name of the firewall policy. Name string `json:"name,omitempty"` + // PacketMirroringRules: [Output Only] The packet mirroring rules that apply to + // the network. + PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` // Priority: [Output only] Priority of firewall policy association. Not // applicable for type=HIERARCHY. Priority int64 `json:"priority,omitempty"` @@ -35515,6 +35709,8 @@ type NodeGroupAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -35703,6 +35899,8 @@ type NodeGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -35990,6 +36188,8 @@ type NodeGroupsListNodesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36153,6 +36353,8 @@ type NodeGroupsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36439,6 +36641,8 @@ type NodeTemplateAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36593,6 +36797,8 @@ type NodeTemplateListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36755,6 +36961,8 @@ type NodeTemplatesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36849,6 +37057,9 @@ type NodeType struct { // LocalSsdGb: [Output Only] Local SSD available to the node type, defined in // GB. LocalSsdGb int64 `json:"localSsdGb,omitempty"` + // MaxVms: [Output Only] Maximum number of VMs that can be created for this + // node type. + MaxVms int64 `json:"maxVms,omitempty"` // MemoryMb: [Output Only] The amount of physical memory available to the node // type, defined in MB. MemoryMb int64 `json:"memoryMb,omitempty"` @@ -36971,6 +37182,8 @@ type NodeTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37125,6 +37338,8 @@ type NodeTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37264,6 +37479,8 @@ type NodeTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37476,6 +37693,8 @@ type NotificationEndpointAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37672,6 +37891,8 @@ type NotificationEndpointListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37811,6 +38032,8 @@ type NotificationEndpointsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -38124,6 +38347,8 @@ type OperationWarnings struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -38280,6 +38505,8 @@ type OperationAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -38435,6 +38662,8 @@ type OperationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -38574,6 +38803,8 @@ type OperationsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -38994,6 +39225,8 @@ type PacketMirroringAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -39212,6 +39445,8 @@ type PacketMirroringListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -39456,6 +39691,8 @@ type PacketMirroringsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -39590,14 +39827,10 @@ type PathMatcher struct { // DefaultRouteAction: defaultRouteAction takes effect when none of the // pathRules or routeRules match. The load balancer performs advanced routing // actions, such as URL rewrites and header transformations, before forwarding - // the request to the selected backend. If defaultRouteAction specifies any - // weightedBackendServices, defaultService must not be set. Conversely if - // defaultService is set, defaultRouteAction cannot contain any - // weightedBackendServices. If defaultRouteAction is specified, don't set - // defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is - // specified, don't set defaultService. URL maps for classic Application Load - // Balancers only support the urlRewrite action within a path matcher's - // defaultRouteAction. + // the request to the selected backend. Only one of defaultUrlRedirect, + // defaultService or defaultRouteAction.weightedBackendService can be set. URL + // maps for classic Application Load Balancers only support the urlRewrite + // action within a path matcher's defaultRouteAction. DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` // DefaultService: The full or partial URL to the BackendService resource. This // URL is used if none of the pathRules or routeRules defined by this @@ -39608,20 +39841,17 @@ type PathMatcher struct { // compute/v1/projects/project/global/backendServices/backendService - // global/backendServices/backendService If defaultRouteAction is also // specified, advanced routing actions, such as URL rewrites, take effect - // before sending the request to the backend. However, if defaultService is - // specified, defaultRouteAction cannot contain any weightedBackendServices. - // Conversely, if defaultRouteAction specifies any weightedBackendServices, - // defaultService must not be specified. If defaultService is specified, then - // set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. - // Don't set both. Authorization requires one or more of the following Google - // IAM permissions on the specified resource default_service: - - // compute.backendBuckets.use - compute.backendServices.use + // before sending the request to the backend. Only one of defaultUrlRedirect, + // defaultService or defaultRouteAction.weightedBackendService can be set. + // Authorization requires one or more of the following Google IAM permissions + // on the specified resource default_service: - compute.backendBuckets.use - + // compute.backendServices.use DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified pathRules or routeRules // match, the request is redirected to a URL specified by defaultUrlRedirect. - // If defaultUrlRedirect is specified, then set either defaultService or - // defaultRouteAction. Don't set both. Not supported when the URL map is bound - // to a target gRPC proxy. + // Only one of defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. Not supported when the + // URL map is bound to a target gRPC proxy. DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` // Description: An optional description of this resource. Provide this property // when you create the resource. @@ -39700,26 +39930,21 @@ type PathRule struct { Paths []string `json:"paths,omitempty"` // RouteAction: In response to a matching path, the load balancer performs // advanced routing actions, such as URL rewrites and header transformations, - // before forwarding the request to the selected backend. If routeAction - // specifies any weightedBackendServices, service must not be set. Conversely - // if service is set, routeAction cannot contain any weightedBackendServices. - // Only one of routeAction or urlRedirect must be set. URL maps for classic - // Application Load Balancers only support the urlRewrite action within a path - // rule's routeAction. + // before forwarding the request to the selected backend. Only one of + // urlRedirect, service or routeAction.weightedBackendService can be set. URL + // maps for classic Application Load Balancers only support the urlRewrite + // action within a path rule's routeAction. RouteAction *HttpRouteAction `json:"routeAction,omitempty"` // Service: The full or partial URL of the backend service resource to which // traffic is directed if this rule is matched. If routeAction is also // specified, advanced routing actions, such as URL rewrites, take effect - // before sending the request to the backend. However, if service is specified, - // routeAction cannot contain any weightedBackendServices. Conversely, if - // routeAction specifies any weightedBackendServices, service must not be - // specified. Only one of urlRedirect, service or - // routeAction.weightedBackendService must be set. + // before sending the request to the backend. Only one of urlRedirect, service + // or routeAction.weightedBackendService can be set. Service string `json:"service,omitempty"` // UrlRedirect: When a path pattern is matched, the request is redirected to a - // URL specified by urlRedirect. If urlRedirect is specified, service or - // routeAction must not be set. Not supported when the URL map is bound to a - // target gRPC proxy. + // URL specified by urlRedirect. Only one of urlRedirect, service or + // routeAction.weightedBackendService can be set. Not supported when the URL + // map is bound to a target gRPC proxy. UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomErrorResponsePolicy") // to unconditionally include in API requests. By default, fields with empty or @@ -39772,8 +39997,8 @@ type PerInstanceConfig struct { // instance. Serves as a merge key during UpdatePerInstanceConfigs operations, // that is, if a per-instance configuration with the same name exists then it // will be updated, otherwise a new one will be created for the VM instance - // with the same name. An attempt to create a per-instance configconfiguration - // for a VM instance that either doesn't exist or is not part of the group will + // with the same name. An attempt to create a per-instance configuration for a + // VM instance that either doesn't exist or is not part of the group will // result in an error. Name string `json:"name,omitempty"` // PreservedState: The intended preserved state for the given instance. Does @@ -40204,7 +40429,8 @@ type Project struct { DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"` // Description: An optional textual description of the resource. Description string `json:"description,omitempty"` - // EnabledFeatures: Restricted features enabled for use on this project. + // EnabledFeatures: An optional list of restricted features enabled for use on + // this project. EnabledFeatures []string `json:"enabledFeatures,omitempty"` // Id: [Output Only] The unique identifier for the resource. This identifier is // defined by the server. This is *not* the project ID, and is just a unique ID @@ -40230,8 +40456,8 @@ type Project struct { Quotas []*Quota `json:"quotas,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // UsageExportLocation: The naming prefix for daily usage reports and the - // Google Cloud Storage bucket where they are stored. + // UsageExportLocation: An optional naming prefix for daily usage reports and + // the Google Cloud Storage bucket where they are stored. UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` // VmDnsSetting: [Output Only] Default internal DNS setting used by VMs running // in this project. @@ -40682,6 +40908,8 @@ type PublicAdvertisedPrefixListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -40991,6 +41219,8 @@ type PublicDelegatedPrefixAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -41145,6 +41375,8 @@ type PublicDelegatedPrefixListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -41344,6 +41576,8 @@ type PublicDelegatedPrefixesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -41570,6 +41804,8 @@ type QueuedResourceListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -41844,6 +42080,8 @@ type QueuedResourcesAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -41983,6 +42221,8 @@ type QueuedResourcesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -42513,6 +42753,8 @@ type RegionQuotaStatusWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -42696,6 +42938,8 @@ type RegionAutoscalerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -42871,6 +43115,8 @@ type RegionDiskTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43117,6 +43363,8 @@ type RegionInstanceGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43297,6 +43545,8 @@ type RegionInstanceGroupManagerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43480,6 +43730,8 @@ type RegionInstanceGroupManagerResizeRequestsListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43826,6 +44078,8 @@ type RegionInstanceGroupManagersListInstanceConfigsRespWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -44232,6 +44486,8 @@ type RegionInstanceGroupsListInstancesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -44445,6 +44701,8 @@ type RegionListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -44588,6 +44846,9 @@ type RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewall DisplayName string `json:"displayName,omitempty"` // Name: [Output Only] The name of the firewall policy. Name string `json:"name,omitempty"` + // PacketMirroringRules: [Output only] The packet mirroring rules that apply to + // the network. + PacketMirroringRules []*FirewallPolicyRule `json:"packetMirroringRules,omitempty"` // Priority: [Output only] Priority of firewall policy association. Not // applicable for type=HIERARCHY. Priority int64 `json:"priority,omitempty"` @@ -44873,16 +45134,6 @@ type Reservation struct { // Id: [Output Only] The unique identifier for the resource. This identifier is // defined by the server. Id uint64 `json:"id,omitempty,string"` - // InstanceTerminationAction: Instance termination action is invoked when the - // reservation is deleted. This only applies to reservations with a Deployment - // type. - // - // Possible values: - // "DELETE" - Delete the VM. - // "INSTANCE_TERMINATION_ACTION_UNSPECIFIED" - Default value. This value is - // unused. - // "STOP" - Stop the VM without storing in-memory content. default action. - InstanceTerminationAction string `json:"instanceTerminationAction,omitempty"` // Kind: [Output Only] Type of the resource. Always compute#reservations for // reservations. Kind string `json:"kind,omitempty"` @@ -45100,6 +45351,8 @@ type ReservationAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -45366,6 +45619,8 @@ type ReservationBlocksListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -45520,6 +45775,8 @@ type ReservationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -45587,6 +45844,70 @@ func (s ReservationListWarningData) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type ReservationsBlocksPerformMaintenanceRequest struct { + // MaintenanceScope: Specifies if all, running or unused hosts are in scope for + // this request. + // + // Possible values: + // "ALL" - Trigger maintenance for all hosts belonging to this reservation + // irrespective of whether VMs are running on them or not. + // "MAINTENANCE_SCOPE_UNSPECIFIED" - Internal only + // "RUNNING_VMS" - Trigger maintenance only on the hosts belonging to this + // reservation which have VMs running on them. + // "UNUSED_CAPACITY" - Trigger maintenance only on the hosts belonging to + // this reservation which do not have any VMs running on them. This is not + // allowed for Standard ExR + MaintenanceScope string `json:"maintenanceScope,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaintenanceScope") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaintenanceScope") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReservationsBlocksPerformMaintenanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod ReservationsBlocksPerformMaintenanceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type ReservationsPerformMaintenanceRequest struct { + // MaintenanceScope: Specifies if all, running or unused hosts are in scope for + // this request. + // + // Possible values: + // "ALL" - Trigger maintenance for all hosts belonging to this reservation + // irrespective of whether VMs are running on them or not. + // "MAINTENANCE_SCOPE_UNSPECIFIED" - Internal only + // "RUNNING_VMS" - Trigger maintenance only on the hosts belonging to this + // reservation which have VMs running on them. + // "UNUSED_CAPACITY" - Trigger maintenance only on the hosts belonging to + // this reservation which do not have any VMs running on them. This is not + // allowed for Standard ExR + MaintenanceScope string `json:"maintenanceScope,omitempty"` + // ForceSendFields is a list of field names (e.g. "MaintenanceScope") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "MaintenanceScope") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s ReservationsPerformMaintenanceRequest) MarshalJSON() ([]byte, error) { + type NoMethod ReservationsPerformMaintenanceRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type ReservationsResizeRequest struct { // SpecificSkuCount: Number of allocated resources can be resized with minimum // = 1 and maximum = 1000. @@ -45681,6 +46002,8 @@ type ReservationsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -45881,6 +46204,8 @@ type ResourcePoliciesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -46112,6 +46437,8 @@ type ResourcePolicyAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -46444,6 +46771,8 @@ type ResourcePolicyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -46858,18 +47187,20 @@ type ResourceStatus struct { // LastInstanceTerminationDetails: [Output Only] Contains last termination // details why the instance was terminated. LastInstanceTerminationDetails *ResourceStatusLastInstanceTerminationDetails `json:"lastInstanceTerminationDetails,omitempty"` - // PhysicalHost: [Output Only] An opaque ID of the host on which the VM is - // running. + // PhysicalHost: [Output Only] The precise location of your instance within the + // zone's data center, including the block, sub-block, and host. The field is + // formatted as follows: blockId/subBlockId/hostId. PhysicalHost string `json:"physicalHost,omitempty"` - // PhysicalHostTopology: [Output Only] The physical host topology of the host - // on which the VM is running. + // PhysicalHostTopology: [Output Only] A series of fields containing the global + // name of the Compute Engine cluster, as well as the ID of the block, + // sub-block, and host on which the running instance is located. PhysicalHostTopology *ResourceStatusPhysicalHostTopology `json:"physicalHostTopology,omitempty"` Scheduling *ResourceStatusScheduling `json:"scheduling,omitempty"` // ServiceIntegrationStatuses: [Output Only] Represents the status of the // service integration specs defined by the user in // instance.serviceIntegrationSpecs. ServiceIntegrationStatuses map[string]ResourceStatusServiceIntegrationStatus `json:"serviceIntegrationStatuses,omitempty"` - // ShutdownDetails: [Output Only] Details about stopping state of instance + // ShutdownDetails: [Output Only] Details about the instance stopping state. ShutdownDetails *ResourceStatusShutdownDetails `json:"shutdownDetails,omitempty"` UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` // ForceSendFields is a list of field names (e.g. "AcceleratorStatus") to @@ -47008,9 +47339,19 @@ func (s ResourceStatusLastInstanceTerminationDetails) MarshalJSON() ([]byte, err // ResourceStatusPhysicalHostTopology: Represents the physical host topology of // the host on which the VM is running. type ResourceStatusPhysicalHostTopology struct { - Block string `json:"block,omitempty"` - Cluster string `json:"cluster,omitempty"` - Host string `json:"host,omitempty"` + // Block: [Output Only] The ID of the block in which the running instance is + // located. Instances within the same block experience low network latency. + Block string `json:"block,omitempty"` + // Cluster: [Output Only] The global name of the Compute Engine cluster where + // the running instance is located. + Cluster string `json:"cluster,omitempty"` + // Host: [Output Only] The ID of the host on which the running instance is + // located. Instances on the same host experience the lowest possible network + // latency. + Host string `json:"host,omitempty"` + // Subblock: [Output Only] The ID of the sub-block in which the running + // instance is located. Instances in the same sub-block experience lower + // network latency than instances in the same block. Subblock string `json:"subblock,omitempty"` // ForceSendFields is a list of field names (e.g. "Block") to unconditionally // include in API requests. By default, fields with empty or default values are @@ -47121,10 +47462,10 @@ func (s ResourceStatusServiceIntegrationStatusBackupDRStatus) MarshalJSON() ([]b } // ResourceStatusShutdownDetails: Specifies if the instance is in -// `SHUTTING_DOWN` state or there is a instance stopping scheduled. +// `PENDING_STOP` state or there is a programmed stop scheduled. type ResourceStatusShutdownDetails struct { - // MaxDuration: Duration for graceful shutdown. Only applicable when - // `stop_state=SHUTTING_DOWN`. + // MaxDuration: The duration for graceful shutdown. Only applicable when + // `stop_state=PENDING_STOP`. MaxDuration *Duration `json:"maxDuration,omitempty"` // RequestTimestamp: Past timestamp indicating the beginning of current // `stopState` in RFC3339 text format. @@ -47133,8 +47474,6 @@ type ResourceStatusShutdownDetails struct { // // Possible values: // "PENDING_STOP" - The instance is gracefully shutting down. - // "SHUTTING_DOWN" - Deprecating, please use PENDING_STOP. The instance is - // gracefully shutting down. // "STOPPING" - The instance is stopping. StopState string `json:"stopState,omitempty"` // TargetState: Target instance state. @@ -47411,6 +47750,8 @@ type RouteWarnings struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -47599,6 +47940,8 @@ type RouteListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -47921,6 +48264,8 @@ type RouterAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -48473,6 +48818,8 @@ type RouterListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49265,6 +49612,8 @@ type RoutersListBgpRoutesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49422,6 +49771,8 @@ type RoutersListNamedSetsWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49580,6 +49931,8 @@ type RoutersListRoutePoliciesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49743,6 +50096,8 @@ type RoutersScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -50156,6 +50511,8 @@ type Scheduling struct { // ProvisioningModel: Specifies the provisioning model of the instance. // // Possible values: + // "RESERVATION_BOUND" - Bound to the lifecycle of the reservation in which + // it is provisioned. // "SPOT" - Heavily discounted, no guaranteed runtime. // "STANDARD" - Standard provisioning with user controlled runtime, no // discounts. @@ -50203,14 +50560,14 @@ func (s Scheduling) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// SchedulingGracefulShutdown: Configuration for gracefully shutting down the -// instance. +// SchedulingGracefulShutdown: The configuration for gracefully shutting down +// the instance. type SchedulingGracefulShutdown struct { // Enabled: Opts-in for graceful shutdown. Enabled bool `json:"enabled,omitempty"` - // MaxDuration: Specifies time needed to gracefully shut down the instance. - // After that time, the instance goes to STOPPING even if graceful shutdown is - // not completed. + // MaxDuration: The time allotted for the instance to gracefully shut down. If + // the graceful shutdown isn't complete after this time, then the instance + // transitions to the STOPPING state. MaxDuration *Duration `json:"maxDuration,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 @@ -50429,6 +50786,8 @@ type SecurityPoliciesAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -50591,6 +50950,8 @@ type SecurityPoliciesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -51028,6 +51389,10 @@ type SecurityPolicyAdvancedOptionsConfig struct { // "NORMAL" // "VERBOSE" LogLevel string `json:"logLevel,omitempty"` + // RequestBodyInspectionSize: The maximum request size chosen by the customer + // with Waf enabled. Currently only "8KB" and "128KB" are supported. Values are + // case insensitive. + RequestBodyInspectionSize string `json:"requestBodyInspectionSize,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"` @@ -51245,6 +51610,8 @@ type SecurityPolicyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -51929,7 +52296,9 @@ type SecurityPolicyRuleRateLimitOptions struct { // defaults to ALL. - USER_IP: The IP address of the originating client, which // is resolved based on "userIpRequestHeaders" configured with the security // policy. If there is no "userIpRequestHeaders" configuration or an IP address - // cannot be resolved from it, the key type defaults to IP. + // cannot be resolved from it, the key type defaults to IP. - + // TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client connects using + // HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. // // Possible values: // "ALL" @@ -51941,6 +52310,7 @@ type SecurityPolicyRuleRateLimitOptions struct { // "REGION_CODE" // "SNI" // "TLS_JA3_FINGERPRINT" + // "TLS_JA4_FINGERPRINT" // "USER_IP" // "XFF_IP" EnforceOnKey string `json:"enforceOnKey,omitempty"` @@ -52022,7 +52392,9 @@ type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { // USER_IP: The IP address of the originating client, which is resolved based // on "userIpRequestHeaders" configured with the security policy. If there is // no "userIpRequestHeaders" configuration or an IP address cannot be resolved - // from it, the key type defaults to IP. + // from it, the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL + // fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not + // available, the key type defaults to ALL. // // Possible values: // "ALL" @@ -52034,6 +52406,7 @@ type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { // "REGION_CODE" // "SNI" // "TLS_JA3_FINGERPRINT" + // "TLS_JA4_FINGERPRINT" // "USER_IP" // "XFF_IP" EnforceOnKeyType string `json:"enforceOnKeyType,omitempty"` @@ -52587,6 +52960,8 @@ type ServiceAttachmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -52809,6 +53184,8 @@ type ServiceAttachmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -52989,6 +53366,8 @@ type ServiceAttachmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -53796,6 +54175,8 @@ type SnapshotAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -53949,6 +54330,8 @@ type SnapshotListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -54245,6 +54628,8 @@ type SnapshotsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -54637,6 +55022,8 @@ type SslCertificateAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -54790,6 +55177,8 @@ type SslCertificateListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -55007,6 +55396,8 @@ type SslCertificatesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -55164,6 +55555,8 @@ type SslPoliciesAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -55317,6 +55710,8 @@ type SslPoliciesListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -55479,6 +55874,8 @@ type SslPoliciesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -55690,6 +56087,8 @@ type SslPolicyWarnings struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -56129,6 +56528,8 @@ type StoragePoolAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -56339,6 +56740,8 @@ type StoragePoolListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -56496,6 +56899,8 @@ type StoragePoolListDisksWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -56784,6 +57189,8 @@ type StoragePoolTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -56938,6 +57345,8 @@ type StoragePoolTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -57078,6 +57487,8 @@ type StoragePoolTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -57217,6 +57628,8 @@ type StoragePoolsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -57472,14 +57885,16 @@ type Subnetwork struct { // VMs in this subnet to Google services. PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` // Purpose: The purpose of the resource. This field can be either PRIVATE, - // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or - // PRIVATE is the default purpose for user-created subnets or subnets that are - // automatically created in auto mode networks. Subnets with purpose set to - // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks - // that are reserved for Envoy-based load balancers. A subnet with purpose set - // to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service - // Connect. If unspecified, the subnet purpose defaults to PRIVATE. The - // enableFlowLogs field isn't supported if the subnet purpose field is set to + // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or + // PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created + // subnets or subnets that are automatically created in auto mode networks. + // Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY + // are user-created subnetworks that are reserved for Envoy-based load + // balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to + // publish services using Private Service Connect. A subnet with purpose set to + // PEER_MIGRATION is used for subnet migration from one peered VPC to another. + // If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs + // field isn't supported if the subnet purpose field is set to // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. // // Possible values: @@ -57681,6 +58096,8 @@ type SubnetworkAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -57835,6 +58252,8 @@ type SubnetworkListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -58108,6 +58527,8 @@ type SubnetworksScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -58246,6 +58667,8 @@ type SubnetworksScopedWarningWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -58638,6 +59061,8 @@ type TargetGrpcProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -58777,6 +59202,8 @@ type TargetHttpProxiesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -59033,6 +59460,8 @@ type TargetHttpProxyAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -59187,6 +59616,8 @@ type TargetHttpProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -59326,6 +59757,8 @@ type TargetHttpsProxiesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -59472,14 +59905,14 @@ func (s TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, erro // Engine has two Target HTTPS Proxy resources: * Global // (/compute/docs/reference/rest/alpha/targetHttpsProxies) * Regional // (/compute/docs/reference/rest/alpha/regionTargetHttpsProxies) A target HTTPS -// proxy is a component of GCP HTTPS load balancers. * targetHttpProxies are -// used by global external Application Load Balancers, classic Application Load -// Balancers, cross-region internal Application Load Balancers, and Traffic -// Director. * regionTargetHttpProxies are used by regional internal -// Application Load Balancers and regional external Application Load Balancers. -// Forwarding rules reference a target HTTPS proxy, and the target proxy then -// references a URL map. For more information, read Using Target Proxies and -// Forwarding rule concepts. +// proxy is a component of Google Cloud HTTPS load balancers. * +// targetHttpProxies are used by global external Application Load Balancers, +// classic Application Load Balancers, cross-region internal Application Load +// Balancers, and Traffic Director. * regionTargetHttpProxies are used by +// regional internal Application Load Balancers and regional external +// Application Load Balancers. Forwarding rules reference a target HTTPS proxy, +// and the target proxy then references a URL map. For more information, read +// Using Target Proxies and Forwarding rule concepts. type TargetHttpsProxy struct { // Authentication: [Deprecated] Use serverTlsPolicy instead. Authentication string `json:"authentication,omitempty"` @@ -59639,6 +60072,12 @@ type TargetHttpsProxy struct { // included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) // without query parameters. Requests that send Early Data with non-idempotent // HTTP methods or with query parameters will be rejected with a HTTP 425. + // "UNRESTRICTED" - This enables TLS 1.3 Early Data for requests with any + // HTTP method including non-idempotent methods list POST. This mode does not + // enforce any other limitations. This may be valuable for gRPC use cases. + // However, we do not recommend this method unless you have evaluated your + // security stance and mitigated the risk of replay attacks using other + // mechanisms. TlsEarlyData string `json:"tlsEarlyData,omitempty"` // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource that // defines the mapping from URL to the BackendService. For example, the @@ -59756,6 +60195,8 @@ type TargetHttpsProxyAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -59910,6 +60351,8 @@ type TargetHttpsProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -60141,6 +60584,8 @@ type TargetInstanceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -60294,6 +60739,8 @@ type TargetInstanceListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -60433,6 +60880,8 @@ type TargetInstancesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -60728,6 +61177,8 @@ type TargetPoolAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -60908,6 +61359,8 @@ type TargetPoolListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -61141,6 +61594,8 @@ type TargetPoolsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -61481,6 +61936,8 @@ type TargetSslProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -61620,6 +62077,8 @@ type TargetTcpProxiesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -61892,6 +62351,8 @@ type TargetTcpProxyAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -62045,6 +62506,8 @@ type TargetTcpProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -62283,6 +62746,8 @@ type TargetVpnGatewayAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -62437,6 +62902,8 @@ type TargetVpnGatewayListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -62577,6 +63044,8 @@ type TargetVpnGatewaysScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -63040,31 +63509,27 @@ type UrlMap struct { // DefaultRouteAction: defaultRouteAction takes effect when none of the // hostRules match. The load balancer performs advanced routing actions, such // as URL rewrites and header transformations, before forwarding the request to - // the selected backend. If defaultRouteAction specifies any - // weightedBackendServices, defaultService must not be set. Conversely if - // defaultService is set, defaultRouteAction cannot contain any - // weightedBackendServices. Only one of defaultRouteAction or - // defaultUrlRedirect must be set. URL maps for classic Application Load - // Balancers only support the urlRewrite action within defaultRouteAction. - // defaultRouteAction has no effect when the URL map is bound to a target gRPC - // proxy that has the validateForProxyless field set to true. + // the selected backend. Only one of defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. URL maps for classic + // Application Load Balancers only support the urlRewrite action within + // defaultRouteAction. defaultRouteAction has no effect when the URL map is + // bound to a target gRPC proxy that has the validateForProxyless field set to + // true. DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` // DefaultService: The full or partial URL of the defaultService resource to // which traffic is directed if none of the hostRules match. If // defaultRouteAction is also specified, advanced routing actions, such as URL - // rewrites, take effect before sending the request to the backend. However, if - // defaultService is specified, defaultRouteAction cannot contain any - // defaultRouteAction.weightedBackendServices. Conversely, if - // defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, - // defaultService must not be specified. If defaultService is specified, then - // set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService - // Don't set both. defaultService has no effect when the URL map is bound to a - // target gRPC proxy that has the validateForProxyless field set to true. + // rewrites, take effect before sending the request to the backend. Only one of + // defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. defaultService has no + // effect when the URL map is bound to a target gRPC proxy that has the + // validateForProxyless field set to true. DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified hostRules match, the request - // is redirected to a URL specified by defaultUrlRedirect. If - // defaultUrlRedirect is specified, defaultService or defaultRouteAction must - // not be set. Not supported when the URL map is bound to a target gRPC proxy. + // is redirected to a URL specified by defaultUrlRedirect. Only one of + // defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. Not supported when the + // URL map is bound to a target gRPC proxy. DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` // Description: An optional description of this resource. Provide this property // when you create the resource. @@ -63220,6 +63685,8 @@ type UrlMapListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -63507,6 +63974,8 @@ type UrlMapsAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -63646,6 +64115,8 @@ type UrlMapsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -63848,14 +64319,16 @@ type UsableSubnetwork struct { // Network: Network URL. Network string `json:"network,omitempty"` // Purpose: The purpose of the resource. This field can be either PRIVATE, - // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or - // PRIVATE is the default purpose for user-created subnets or subnets that are - // automatically created in auto mode networks. Subnets with purpose set to - // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks - // that are reserved for Envoy-based load balancers. A subnet with purpose set - // to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service - // Connect. If unspecified, the subnet purpose defaults to PRIVATE. The - // enableFlowLogs field isn't supported if the subnet purpose field is set to + // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or + // PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created + // subnets or subnets that are automatically created in auto mode networks. + // Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY + // are user-created subnetworks that are reserved for Envoy-based load + // balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to + // publish services using Private Service Connect. A subnet with purpose set to + // PEER_MIGRATION is used for subnet migration from one peered VPC to another. + // If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs + // field isn't supported if the subnet purpose field is set to // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. // // Possible values: @@ -64047,6 +64520,8 @@ type UsableSubnetworksAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -64347,6 +64822,8 @@ type VmEndpointNatMappingsListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -64589,6 +65066,8 @@ type VpnGatewayAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -64743,6 +65222,8 @@ type VpnGatewayListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -65076,6 +65557,8 @@ type VpnGatewaysScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -65388,6 +65871,8 @@ type VpnTunnelAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -65542,6 +66027,8 @@ type VpnTunnelListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -65681,6 +66168,8 @@ type VpnTunnelsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -65966,6 +66455,8 @@ type WireGroup struct { // ServiceLevel: Service level details determined for the wire group // configuration. ServiceLevel *WireGroupServiceLevel `json:"serviceLevel,omitempty"` + // Topology: Topology details for the wire group configuration. + Topology *WireGroupTopology `json:"topology,omitempty"` // WireGroupProperties: Properties of the wire group. WireGroupProperties *WireGroupProperties `json:"wireGroupProperties,omitempty"` // WireInputs: A map that contains optional settings for individual wires. @@ -66155,6 +66646,8 @@ type WireGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -66278,11 +66771,12 @@ func (s WireGroupProperties) MarshalJSON() ([]byte, error) { type WireGroupServiceLevel struct { // AvailabilityClass: [Output Only] The availability SLA that the wire group // qualifies for. One of the following: `NO_AVAILABILITY_SLA`, - // `AVAILABILITY_99`, or `AVAILABILITY_999`. + // `AVAILABILITY_99`, `AVAILABILITY_999`, or `AVAILABILITY_9995`. // // Possible values: // "AVAILABILITY_99" - 99% availability // "AVAILABILITY_999" - 99.9% availability + // "AVAILABILITY_9995" - 99.95% availability // "NO_AVAILABILITY_SLA" - No SLA AvailabilityClass string `json:"availabilityClass,omitempty"` // ForceSendFields is a list of field names (e.g. "AvailabilityClass") to @@ -66303,6 +66797,54 @@ func (s WireGroupServiceLevel) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// WireGroupTopology: Topology details for the wire group. +type WireGroupTopology struct { + // Endpoints: Topology details for all endpoints in the wire group. + Endpoints []*WireGroupTopologyEndpoint `json:"endpoints,omitempty"` + // ForceSendFields is a list of field names (e.g. "Endpoints") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Endpoints") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s WireGroupTopology) MarshalJSON() ([]byte, error) { + type NoMethod WireGroupTopology + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// WireGroupTopologyEndpoint: Topology details for a single wire group +// endpoint. +type WireGroupTopologyEndpoint struct { + // City: The InterconnectLocation.city (metropolitan area designator) that all + // interconnects are located in. + City string `json:"city,omitempty"` + // Label: Endpoint label from the wire group. + Label string `json:"label,omitempty"` + // ForceSendFields is a list of field names (e.g. "City") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "City") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s WireGroupTopologyEndpoint) MarshalJSON() ([]byte, error) { + type NoMethod WireGroupTopologyEndpoint + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // WireGroupWireInputs: Optional settings for individual wires. Allows // wire-level control that can be useful for migration purposes. If you use // this field, you opt-out of the SLA for the wire group. @@ -66490,6 +67032,8 @@ type XpnHostListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -66728,6 +67272,8 @@ type ZoneListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is diff --git a/compute/v0.alpha/compute2-gen.go b/compute/v0.alpha/compute2-gen.go index e9fa8d4d753..ce8b8c240fd 100644 --- a/compute/v0.alpha/compute2-gen.go +++ b/compute/v0.alpha/compute2-gen.go @@ -5280,6 +5280,119 @@ func (c *BackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendServi return ret, nil } +type BackendServicesGetEffectiveSecurityPoliciesCall struct { + s *Service + project string + backendService string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetEffectiveSecurityPolicies: Returns effective security policies applied to +// this backend service. +// +// - backendService: Name of the Backend Service for this request. +// - project: Project ID for this request. +func (r *BackendServicesService) GetEffectiveSecurityPolicies(project string, backendService string) *BackendServicesGetEffectiveSecurityPoliciesCall { + c := &BackendServicesGetEffectiveSecurityPoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.backendService = backendService + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Fields(s ...googleapi.Field) *BackendServicesGetEffectiveSecurityPoliciesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) IfNoneMatch(entityTag string) *BackendServicesGetEffectiveSecurityPoliciesCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Context(ctx context.Context) *BackendServicesGetEffectiveSecurityPoliciesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/backendServices/{backendService}/getEffectiveSecurityPolicies") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "backendService": c.backendService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.backendServices.getEffectiveSecurityPolicies" call. +// Any non-2xx status code is an error. Response headers are in either +// *BackendServicesGetEffectiveSecurityPoliciesResponse.ServerResponse.Header +// or (if a response was returned at all) in error.(*googleapi.Error).Header. +// Use googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *BackendServicesGetEffectiveSecurityPoliciesCall) Do(opts ...googleapi.CallOption) (*BackendServicesGetEffectiveSecurityPoliciesResponse, 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 := &BackendServicesGetEffectiveSecurityPoliciesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type BackendServicesGetHealthCall struct { s *Service project string @@ -7008,8 +7121,7 @@ func (c *CrossSiteNetworksInsertCall) RequestId(requestId string) *CrossSiteNetw } // ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't create it. If applicable, any -// configuration notices are returned in the `configurationNotices` field. +// Validate the new configuration, but don't create it. func (c *CrossSiteNetworksInsertCall) ValidateOnly(validateOnly bool) *CrossSiteNetworksInsertCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c @@ -7344,9 +7456,15 @@ func (c *CrossSiteNetworksPatchCall) RequestId(requestId string) *CrossSiteNetwo return c } +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *CrossSiteNetworksPatchCall) UpdateMask(updateMask string) *CrossSiteNetworksPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't update it. If applicable, any -// configuration notices are returned in the `configurationNotices` field. +// Validate the new configuration, but don't update it. func (c *CrossSiteNetworksPatchCall) ValidateOnly(validateOnly bool) *CrossSiteNetworksPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c @@ -34543,7 +34661,8 @@ type InstancesAddNetworkInterfaceCall struct { header_ http.Header } -// AddNetworkInterface: Adds a network interface to an instance. +// AddNetworkInterface: Adds one dynamic network interface to an active +// instance. // // - instance: The instance name for this request stored as resource_id. Name // should conform to RFC1035 or be an unsigned long integer. @@ -35296,8 +35415,8 @@ func (r *InstancesService) Delete(project string, zone string, instance string) return c } -// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": If -// true, skips Graceful Shutdown. +// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": If set +// to true, Graceful Shutdown is skipped. func (c *InstancesDeleteCall) NoGracefulShutdown(noGracefulShutdown bool) *InstancesDeleteCall { c.urlParams_.Set("noGracefulShutdown", fmt.Sprint(noGracefulShutdown)) return c @@ -35531,16 +35650,15 @@ type InstancesDeleteNetworkInterfaceCall struct { header_ http.Header } -// DeleteNetworkInterface: Deletes one network interface from an active +// DeleteNetworkInterface: Deletes one dynamic network interface from an active // instance. InstancesDeleteNetworkInterfaceRequest indicates: - instance from -// which to delete, using project+zone+resource_id fields; - network interface -// to be deleted, using network_interface_name field; Only VLAN interface -// deletion is supported for now. +// which to delete, using project+zone+resource_id fields; - dynamic network +// interface to be deleted, using network_interface_name field; // // - instance: The instance name for this request stored as resource_id. Name // should conform to RFC1035 or be an unsigned long integer. -// - networkInterfaceName: The name of the network interface to be deleted from -// the instance. Only VLAN network interface deletion is supported. +// - networkInterfaceName: The name of the dynamic network interface to be +// deleted from the instance. // - project: Project ID for this request. // - zone: The name of the zone for this request. func (r *InstancesService) DeleteNetworkInterface(project string, zone string, instance string, networkInterfaceName string) *InstancesDeleteNetworkInterfaceCall { @@ -36552,7 +36670,9 @@ func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialP // adjusted start position is returned as the `start` property value. You can // also provide a negative start position, which translates to the most recent // number of bytes written to the serial port. For example, -3 is interpreted -// as the most recent 3 bytes written to the serial console. +// as the most recent 3 bytes written to the serial console. Note that the +// negative start is bounded by the retained buffer size, and the returned +// serial console output will not exceed the max buffer size. func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall { c.urlParams_.Set("start", fmt.Sprint(start)) return c @@ -40565,8 +40685,8 @@ func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStop return c } -// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": If -// true, skips Graceful Shutdown. +// NoGracefulShutdown sets the optional parameter "noGracefulShutdown": If set +// to true, Graceful Shutdown is skipped. func (c *InstancesStopCall) NoGracefulShutdown(noGracefulShutdown bool) *InstancesStopCall { c.urlParams_.Set("noGracefulShutdown", fmt.Sprint(noGracefulShutdown)) return c @@ -50880,6 +51000,135 @@ func (c *LicensesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test return ret, nil } +type LicensesUpdateCall struct { + s *Service + project string + license string + license2 *License + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates a License resource in the specified project. *Caution* This +// resource is intended for use only by third-party partners who are creating +// Cloud Marketplace images. +// +// - license: The license name for this request. +// - project: Project ID for this request. +func (r *LicensesService) Update(project string, license string, license2 *License) *LicensesUpdateCall { + c := &LicensesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.license = license + c.license2 = license2 + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *LicensesUpdateCall) RequestId(requestId string) *LicensesUpdateCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *LicensesUpdateCall) UpdateMask(updateMask string) *LicensesUpdateCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *LicensesUpdateCall) Fields(s ...googleapi.Field) *LicensesUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *LicensesUpdateCall) Context(ctx context.Context) *LicensesUpdateCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *LicensesUpdateCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *LicensesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.license2) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{license}") + 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{ + "project": c.project, + "license": c.license, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.licenses.update" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *LicensesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type MachineImagesDeleteCall struct { s *Service project string diff --git a/compute/v0.alpha/compute3-gen.go b/compute/v0.alpha/compute3-gen.go index b922d17f8a2..50cee9f9f5d 100644 --- a/compute/v0.alpha/compute3-gen.go +++ b/compute/v0.alpha/compute3-gen.go @@ -22376,6 +22376,131 @@ func (c *RegionSecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) return ret, nil } +type RegionSecurityPoliciesSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLabels: Sets the labels on a security policy. To learn more about labels, +// read the Labeling Resources documentation. +// +// - project: Project ID for this request. +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionSecurityPoliciesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionSecurityPoliciesSetLabelsCall { + c := &RegionSecurityPoliciesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionSecurityPoliciesSetLabelsCall) RequestId(requestId string) *RegionSecurityPoliciesSetLabelsCall { + 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 +// details. +func (c *RegionSecurityPoliciesSetLabelsCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesSetLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionSecurityPoliciesSetLabelsCall) Context(ctx context.Context) *RegionSecurityPoliciesSetLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionSecurityPoliciesSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.setLabels" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionSecurityPoliciesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type RegionSnapshotSettingsGetCall struct { s *Service project string @@ -29880,6 +30005,138 @@ func (c *ReservationBlocksListCall) Pages(ctx context.Context, f func(*Reservati } } +type ReservationBlocksPerformMaintenanceCall struct { + s *Service + project string + zone string + reservation string + reservationBlock string + reservationsblocksperformmaintenancerequest *ReservationsBlocksPerformMaintenanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// PerformMaintenance: Allows customers to perform maintenance on a reservation +// block +// +// - project: Project ID for this request. +// - reservation: The name of the reservation. Name should conform to RFC1035 +// or be a resource ID. +// - reservationBlock: The name of the reservation block. Name should conform +// to RFC1035 or be a resource ID. +// - zone: Name of the zone for this request. Zone name should conform to +// RFC1035. +func (r *ReservationBlocksService) PerformMaintenance(project string, zone string, reservation string, reservationBlock string, reservationsblocksperformmaintenancerequest *ReservationsBlocksPerformMaintenanceRequest) *ReservationBlocksPerformMaintenanceCall { + c := &ReservationBlocksPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + c.reservationBlock = reservationBlock + c.reservationsblocksperformmaintenancerequest = reservationsblocksperformmaintenancerequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *ReservationBlocksPerformMaintenanceCall) RequestId(requestId string) *ReservationBlocksPerformMaintenanceCall { + 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 +// details. +func (c *ReservationBlocksPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationBlocksPerformMaintenanceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ReservationBlocksPerformMaintenanceCall) Context(ctx context.Context) *ReservationBlocksPerformMaintenanceCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ReservationBlocksPerformMaintenanceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationBlocksPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.reservationsblocksperformmaintenancerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/reservationBlocks/{reservationBlock}/performMaintenance") + 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{ + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, + "reservationBlock": c.reservationBlock, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservationBlocks.performMaintenance" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ReservationBlocksPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ReservationsAggregatedListCall struct { s *Service project string @@ -30799,6 +31056,132 @@ func (c *ReservationsListCall) Pages(ctx context.Context, f func(*ReservationLis } } +type ReservationsPerformMaintenanceCall struct { + s *Service + project string + zone string + reservation string + reservationsperformmaintenancerequest *ReservationsPerformMaintenanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// PerformMaintenance: Perform maintenance on an extended reservation +// +// - project: Project ID for this request. +// - reservation: The name of the reservation. Name should conform to RFC1035 +// or be a resource ID. +// - zone: Name of the zone for this request. Zone name should conform to +// RFC1035. +func (r *ReservationsService) PerformMaintenance(project string, zone string, reservation string, reservationsperformmaintenancerequest *ReservationsPerformMaintenanceRequest) *ReservationsPerformMaintenanceCall { + c := &ReservationsPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.reservation = reservation + c.reservationsperformmaintenancerequest = reservationsperformmaintenancerequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *ReservationsPerformMaintenanceCall) RequestId(requestId string) *ReservationsPerformMaintenanceCall { + 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 +// details. +func (c *ReservationsPerformMaintenanceCall) Fields(s ...googleapi.Field) *ReservationsPerformMaintenanceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *ReservationsPerformMaintenanceCall) Context(ctx context.Context) *ReservationsPerformMaintenanceCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *ReservationsPerformMaintenanceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *ReservationsPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.reservationsperformmaintenancerequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/reservations/{reservation}/performMaintenance") + 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{ + "project": c.project, + "zone": c.zone, + "reservation": c.reservation, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.reservations.performMaintenance" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ReservationsPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type ReservationsResizeCall struct { s *Service project string @@ -60738,8 +61121,7 @@ func (c *WireGroupsInsertCall) RequestId(requestId string) *WireGroupsInsertCall } // ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't create it. If applicable, any -// configuration notices are returned in the `configurationNotices` field. +// Validate the new configuration, but don't create it. func (c *WireGroupsInsertCall) ValidateOnly(validateOnly bool) *WireGroupsInsertCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c @@ -61089,8 +61471,7 @@ func (c *WireGroupsPatchCall) UpdateMask(updateMask string) *WireGroupsPatchCall } // ValidateOnly sets the optional parameter "validateOnly": [Input Only] -// Validate the new configuration, but don't update it. If applicable, any -// configuration notices are returned in the `configurationNotices` field. +// Validate the new configuration, but don't update it. func (c *WireGroupsPatchCall) ValidateOnly(validateOnly bool) *WireGroupsPatchCall { c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) return c diff --git a/compute/v1/compute-api.json b/compute/v1/compute-api.json index 8fe8c383d7b..68e261dfc8a 100644 --- a/compute/v1/compute-api.json +++ b/compute/v1/compute-api.json @@ -8683,6 +8683,54 @@ "https://www.googleapis.com/auth/compute" ] }, + "resumeInstances": { + "description": "Flags the specified instances in the managed instance group to be resumed. This method increases the targetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of the RESUMING action with the listmanagedinstances method. In this request, you can only specify instances that are suspended. For example, if an instance was previously suspended using the suspendInstances method, it can be resumed using the resumeInstances method. If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are resumed. You can specify a maximum of 1000 instances with this method per request.", + "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", + "httpMethod": "POST", + "id": "compute.instanceGroupManagers.resumeInstances", + "parameterOrder": [ + "project", + "zone", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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" + }, + "zone": { + "description": "The name of the zone where the managed instance group is located.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", + "request": { + "$ref": "InstanceGroupManagersResumeInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setInstanceTemplate": { "description": "Specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group's updatePolicy.type to PROACTIVE.", "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", @@ -8779,6 +8827,150 @@ "https://www.googleapis.com/auth/compute" ] }, + "startInstances": { + "description": "Flags the specified instances in the managed instance group to be started. This method increases the targetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STARTING action with the listmanagedinstances method. In this request, you can only specify instances that are stopped. For example, if an instance was previously stopped using the stopInstances method, it can be started using the startInstances method. If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are started. You can specify a maximum of 1000 instances with this method per request.", + "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances", + "httpMethod": "POST", + "id": "compute.instanceGroupManagers.startInstances", + "parameterOrder": [ + "project", + "zone", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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" + }, + "zone": { + "description": "The name of the zone where the managed instance group is located.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances", + "request": { + "$ref": "InstanceGroupManagersStartInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "stopInstances": { + "description": "Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STOPPING action with the listmanagedinstances method. If the standbyPolicy.initialDelaySec field is set, the group delays stopping the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more than initialDelaySec seconds have passed since instance.creationTimestamp when this method is called, there will be zero delay. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is stopped. Stopped instances can be started using the startInstances method. You can specify a maximum of 1000 instances with this method per request.", + "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances", + "httpMethod": "POST", + "id": "compute.instanceGroupManagers.stopInstances", + "parameterOrder": [ + "project", + "zone", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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" + }, + "zone": { + "description": "The name of the zone where the managed instance group is located.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances", + "request": { + "$ref": "InstanceGroupManagersStopInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "suspendInstances": { + "description": "Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of the SUSPENDING action with the listmanagedinstances method. If the standbyPolicy.initialDelaySec field is set, the group delays suspension of the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more than initialDelaySec seconds have passed since instance.creationTimestamp when this method is called, there will be zero delay. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended. Suspended instances can be resumed using the resumeInstances method. You can specify a maximum of 1000 instances with this method per request.", + "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", + "httpMethod": "POST", + "id": "compute.instanceGroupManagers.suspendInstances", + "parameterOrder": [ + "project", + "zone", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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" + }, + "zone": { + "description": "The name of the zone where the managed instance group is located.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", + "request": { + "$ref": "InstanceGroupManagersSuspendInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "updatePerInstanceConfigs": { "description": "Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", "flatPath": "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", @@ -10446,7 +10638,7 @@ "type": "string" }, "start": { - "description": "Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console.", + "description": "Specifies the starting byte position of the output to return. To start with the first byte of output to the specified port, omit this field or set it to `0`. If the output for that byte position is available, this field matches the `start` parameter sent with the request. If the amount of serial console output exceeds the size of the buffer (1 MB), the oldest output is discarded and is no longer available. If the requested start position refers to discarded output, the start position is adjusted to the oldest output still available, and the adjusted start position is returned as the `start` property value. You can also provide a negative start position, which translates to the most recent number of bytes written to the serial port. For example, -3 is interpreted as the most recent 3 bytes written to the serial console. Note that the negative start is bounded by the retained buffer size, and the returned serial console output will not exceed the max buffer size.", "format": "int64", "location": "query", "type": "string" @@ -16276,6 +16468,100 @@ } } }, + "networkProfiles": { + "methods": { + "get": { + "description": "Returns the specified network profile.", + "flatPath": "projects/{project}/global/networkProfiles/{networkProfile}", + "httpMethod": "GET", + "id": "compute.networkProfiles.get", + "parameterOrder": [ + "project", + "networkProfile" + ], + "parameters": { + "networkProfile": { + "description": "Name of the network profile to return.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/global/networkProfiles/{networkProfile}", + "response": { + "$ref": "NetworkProfile" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "list": { + "description": "Retrieves a list of network profiles available to the specified project.", + "flatPath": "projects/{project}/global/networkProfiles", + "httpMethod": "GET", + "id": "compute.networkProfiles.list", + "parameterOrder": [ + "project" + ], + "parameters": { + "filter": { + "description": "A filter expression that filters resources listed in the response. Most Compute resources support two types of filter expressions: expressions that support regular expressions and expressions that follow API improvement proposal AIP-160. These two types of filter expressions cannot be mixed in one request. If you want to use AIP-160, your expression must specify the field name, an operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The operator must be either `=`, `!=`, `\u003e`, `\u003c`, `\u003c=`, `\u003e=` or `:`. For example, if you are filtering Compute Engine instances, you can exclude instances named `example-instance` by specifying `name != example-instance`. The `:*` comparison can be used to test whether a key has been defined. For example, to find all objects with `owner` label use: ``` labels.owner:* ``` You can also filter nested fields. For example, you could specify `scheduling.automaticRestart = false` to include instances only if they are not scheduled for automatic restarts. You can use filtering on nested fields to filter based on resource labels. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (scheduling.automaticRestart = true) (cpuPlatform = \"Intel Skylake\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = \"Intel Skylake\") OR (cpuPlatform = \"Intel Broadwell\") AND (scheduling.automaticRestart = true) ``` If you want to use a regular expression, use the `eq` (equal) or `ne` (not equal) operator against a single un-parenthesized expression with or without quotes or against multiple parenthesized expressions. Examples: `fieldname eq unquoted literal` `fieldname eq 'single quoted literal'` `fieldname eq \"double quoted literal\"` `(fieldname1 eq literal) (fieldname2 ne \"literal\")` The literal value is interpreted as a regular expression using Google RE2 library syntax. The literal value must match the entire field. For example, to filter for instances that do not end with name \"instance\", you would use `name ne .*instance`. You cannot combine constraints on multiple fields using regular expressions.", + "location": "query", + "type": "string" + }, + "maxResults": { + "default": "500", + "description": "The maximum number of results per page that should be returned. If the number of available results is larger than `maxResults`, Compute Engine returns a `nextPageToken` that can be used to get the next page of results in subsequent list requests. Acceptable values are `0` to `500`, inclusive. (Default: `500`)", + "format": "uint32", + "location": "query", + "minimum": "0", + "type": "integer" + }, + "orderBy": { + "description": "Sorts list results by a certain order. By default, results are returned in alphanumerical order based on the resource name. You can also sort results in descending order based on the creation timestamp using `orderBy=\"creationTimestamp desc\"`. This sorts results based on the `creationTimestamp` field in reverse chronological order (newest result first). Use this to sort resources like operations so that the newest operation is returned first. Currently, only sorting by `name` or `creationTimestamp desc` is supported.", + "location": "query", + "type": "string" + }, + "pageToken": { + "description": "Specifies a page token to use. Set `pageToken` to the `nextPageToken` returned by a previous list request to get the next page of results.", + "location": "query", + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "returnPartialSuccess": { + "description": "Opt-in for partial success behavior which provides partial results in case of failure. The default value is false. For example, when partial success behavior is enabled, aggregatedList for a single zone scope either returns all resources in the zone or no resources, with an error code.", + "location": "query", + "type": "boolean" + } + }, + "path": "projects/{project}/global/networkProfiles", + "response": { + "$ref": "NetworkProfilesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "networks": { "methods": { "addPeering": { @@ -23178,11 +23464,11 @@ "https://www.googleapis.com/auth/compute" ] }, - "setInstanceTemplate": { - "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", + "resumeInstances": { + "description": "Flags the specified instances in the managed instance group to be resumed. This method increases the targetSize and decreases the targetSuspendedSize of the managed instance group by the number of instances that you resume. The resumeInstances operation is marked DONE if the resumeInstances request is successful. The underlying actions take additional time. You must separately verify the status of the RESUMING action with the listmanagedinstances method. In this request, you can only specify instances that are suspended. For example, if an instance was previously suspended using the suspendInstances method, it can be resumed using the resumeInstances method. If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are resumed. You can specify a maximum of 1000 instances with this method per request.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", + "id": "compute.regionInstanceGroupManagers.resumeInstances", "parameterOrder": [ "project", "region", @@ -23190,7 +23476,7 @@ ], "parameters": { "instanceGroupManager": { - "description": "The name of the managed instance group.", + "description": "Name of the managed instance group.", "location": "path", "required": true, "type": "string" @@ -23214,9 +23500,9 @@ "type": "string" } }, - "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", + "path": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances", "request": { - "$ref": "RegionInstanceGroupManagersSetTemplateRequest" + "$ref": "RegionInstanceGroupManagersResumeInstancesRequest" }, "response": { "$ref": "Operation" @@ -23226,11 +23512,11 @@ "https://www.googleapis.com/auth/compute" ] }, - "setTargetPools": { - "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", - "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", + "setInstanceTemplate": { + "description": "Sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", "httpMethod": "POST", - "id": "compute.regionInstanceGroupManagers.setTargetPools", + "id": "compute.regionInstanceGroupManagers.setInstanceTemplate", "parameterOrder": [ "project", "region", @@ -23238,7 +23524,55 @@ ], "parameters": { "instanceGroupManager": { - "description": "Name of the managed instance group.", + "description": "The name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate", + "request": { + "$ref": "RegionInstanceGroupManagersSetTemplateRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "setTargetPools": { + "description": "Modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagers.setTargetPools", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "Name of the managed instance group.", "location": "path", "required": true, "type": "string" @@ -23274,6 +23608,150 @@ "https://www.googleapis.com/auth/compute" ] }, + "startInstances": { + "description": "Flags the specified instances in the managed instance group to be started. This method increases the targetSize and decreases the targetStoppedSize of the managed instance group by the number of instances that you start. The startInstances operation is marked DONE if the startInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STARTING action with the listmanagedinstances method. In this request, you can only specify instances that are stopped. For example, if an instance was previously stopped using the stopInstances method, it can be started using the startInstances method. If a health check is attached to the managed instance group, the specified instances will be verified as healthy after they are started. You can specify a maximum of 1000 instances with this method per request.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagers.startInstances", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "Name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances", + "request": { + "$ref": "RegionInstanceGroupManagersStartInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "stopInstances": { + "description": "Flags the specified instances in the managed instance group to be immediately stopped. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetStoppedSize of the managed instance group by the number of instances that you stop. The stopInstances operation is marked DONE if the stopInstances request is successful. The underlying actions take additional time. You must separately verify the status of the STOPPING action with the listmanagedinstances method. If the standbyPolicy.initialDelaySec field is set, the group delays stopping the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more than initialDelaySec seconds have passed since instance.creationTimestamp when this method is called, there will be zero delay. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is stopped. Stopped instances can be started using the startInstances method. You can specify a maximum of 1000 instances with this method per request.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagers.stopInstances", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "The name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances", + "request": { + "$ref": "RegionInstanceGroupManagersStopInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "suspendInstances": { + "description": "Flags the specified instances in the managed instance group to be immediately suspended. You can only specify instances that are running in this request. This method reduces the targetSize and increases the targetSuspendedSize of the managed instance group by the number of instances that you suspend. The suspendInstances operation is marked DONE if the suspendInstances request is successful. The underlying actions take additional time. You must separately verify the status of the SUSPENDING action with the listmanagedinstances method. If the standbyPolicy.initialDelaySec field is set, the group delays suspension of the instances until initialDelaySec have passed from instance.creationTimestamp (that is, when the instance was created). This delay gives your application time to set itself up and initialize on the instance. If more than initialDelaySec seconds have passed since instance.creationTimestamp when this method is called, there will be zero delay. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is suspended. Suspended instances can be resumed using the resumeInstances method. You can specify a maximum of 1000 instances with this method per request.", + "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", + "httpMethod": "POST", + "id": "compute.regionInstanceGroupManagers.suspendInstances", + "parameterOrder": [ + "project", + "region", + "instanceGroupManager" + ], + "parameters": { + "instanceGroupManager": { + "description": "Name of the managed instance group.", + "location": "path", + "required": true, + "type": "string" + }, + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "Name of the region scoping this request.", + "location": "path", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances", + "request": { + "$ref": "RegionInstanceGroupManagersSuspendInstancesRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "updatePerInstanceConfigs": { "description": "Inserts or updates per-instance configurations for the managed instance group. perInstanceConfig.name serves as a key used to distinguish whether to perform insert or patch.", "flatPath": "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs", @@ -26258,6 +26736,56 @@ "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] + }, + "setLabels": { + "description": "Sets the labels on a security policy. To learn more about labels, read the Labeling Resources documentation.", + "flatPath": "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels", + "httpMethod": "POST", + "id": "compute.regionSecurityPolicies.setLabels", + "parameterOrder": [ + "project", + "region", + "resource" + ], + "parameters": { + "project": { + "description": "Project ID for this request.", + "location": "path", + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z0-9](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "required": true, + "type": "string" + }, + "region": { + "description": "The region for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "required": true, + "type": "string" + }, + "requestId": { + "description": "An optional 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. 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" + }, + "resource": { + "description": "Name or id of the resource for this request.", + "location": "path", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?|[1-9][0-9]{0,19}", + "required": true, + "type": "string" + } + }, + "path": "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels", + "request": { + "$ref": "RegionSetLabelsRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] } } }, @@ -37421,7 +37949,7 @@ } } }, - "revision": "20241105", + "revision": "20241201", "rootUrl": "https://compute.googleapis.com/", "schemas": { "AWSV4Signature": { @@ -37572,6 +38100,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -37608,6 +38137,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -37632,6 +38162,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -37724,6 +38255,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -37760,6 +38292,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -37784,6 +38317,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -37858,6 +38392,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -37894,6 +38429,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -37918,6 +38454,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -38259,6 +38796,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -38295,6 +38833,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -38319,6 +38858,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -38411,6 +38951,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -38447,6 +38988,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -38471,6 +39013,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -38545,6 +39088,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -38581,6 +39125,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -38605,6 +39150,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -39339,6 +39885,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -39375,6 +39922,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -39399,6 +39947,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -39491,6 +40040,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -39527,6 +40077,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -39551,6 +40102,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -39683,6 +40235,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -39719,6 +40272,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -39743,6 +40297,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -40146,7 +40701,7 @@ "description": "The CacheKeyPolicy for this CdnPolicy." }, "cacheMode": { - "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached.", + "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. If no value is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC.", "enum": [ "CACHE_ALL_STATIC", "FORCE_CACHE_ALL", @@ -40315,6 +40870,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -40351,6 +40907,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -40375,6 +40932,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -40795,6 +41353,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -40831,6 +41390,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -40855,6 +41415,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -40908,7 +41469,7 @@ "description": "The CacheKeyPolicy for this CdnPolicy." }, "cacheMode": { - "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached.", + "description": "Specifies the cache setting for all responses from this backend. The possible values are: USE_ORIGIN_HEADERS Requires the origin to set valid caching headers to cache content. Responses without these headers will not be cached at Google's edge, and will require a full trip to the origin on every request, potentially impacting performance and increasing load on the origin server. FORCE_CACHE_ALL Cache all content, ignoring any \"private\", \"no-store\" or \"no-cache\" directives in Cache-Control response headers. Warning: this may result in Cloud CDN caching private, per-user (user identifiable) content. CACHE_ALL_STATIC Automatically cache static content, including common image formats, media (video and audio), and web assets (JavaScript and CSS). Requests and responses that are marked as uncacheable, as well as dynamic content (including HTML), will not be cached. If no value is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC.", "enum": [ "CACHE_ALL_STATIC", "FORCE_CACHE_ALL", @@ -41187,6 +41748,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -41223,6 +41785,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -41247,6 +41810,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -41339,6 +41903,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -41375,6 +41940,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -41399,6 +41965,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -41588,6 +42155,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -41624,6 +42192,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -41648,6 +42217,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -42313,6 +42883,9 @@ "GRAPHICS_OPTIMIZED", "MEMORY_OPTIMIZED", "MEMORY_OPTIMIZED_M3", + "MEMORY_OPTIMIZED_X4_16TB", + "MEMORY_OPTIMIZED_X4_24TB", + "MEMORY_OPTIMIZED_X4_32TB", "STORAGE_OPTIMIZED_Z3", "TYPE_UNSPECIFIED" ], @@ -42337,6 +42910,9 @@ "", "", "", + "", + "", + "", "" ], "type": "string" @@ -42406,6 +42982,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -42442,6 +43019,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -42466,6 +43044,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -42558,6 +43137,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -42594,6 +43174,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -42618,6 +43199,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -42703,6 +43285,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -42739,6 +43322,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -42763,6 +43347,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -43397,6 +43982,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -43433,6 +44019,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -43457,6 +44044,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -43621,6 +44209,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -43657,6 +44246,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -43681,6 +44271,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -43904,6 +44495,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -43940,6 +44532,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -43964,6 +44557,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -44056,6 +44650,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -44092,6 +44687,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -44116,6 +44712,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -44190,6 +44787,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -44226,6 +44824,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -44250,6 +44849,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -44361,6 +44961,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -44397,6 +44998,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -44421,6 +45023,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -44664,6 +45267,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -44700,6 +45304,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -44724,6 +45329,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -44934,6 +45540,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -44970,6 +45577,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -44994,6 +45602,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -45262,6 +45871,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -45298,6 +45908,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -45322,6 +45933,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -45557,6 +46169,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -45593,6 +46206,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -45617,6 +46231,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -46196,6 +46811,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -46232,6 +46848,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -46256,6 +46873,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -46348,6 +46966,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -46384,6 +47003,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -46408,6 +47028,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -46510,6 +47131,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -46546,6 +47168,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -46570,6 +47193,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -47170,6 +47794,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -47206,6 +47831,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -47230,6 +47856,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -47428,6 +48055,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -47464,6 +48092,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -47488,6 +48117,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -47587,6 +48217,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -47623,6 +48254,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -47647,6 +48279,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -47721,6 +48354,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -47757,6 +48391,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -47781,6 +48416,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -48265,6 +48901,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -48301,6 +48938,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -48325,6 +48963,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -48524,15 +49163,15 @@ }, "routeAction": { "$ref": "HttpRouteAction", - "description": "In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction." + "description": "In response to a matching matchRule, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a route rule's routeAction." }, "service": { - "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set.", + "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.", "type": "string" }, "urlRedirect": { "$ref": "HttpRedirectAction", - "description": "When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When this rule is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." } }, "type": "object" @@ -48707,6 +49346,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -48743,6 +49383,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -48767,6 +49408,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49091,6 +49733,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -49127,6 +49770,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -49151,6 +49795,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49541,6 +50186,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -49577,276 +50223,6 @@ false, false, false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed operation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as deprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as experimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden. Deprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the network.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite the mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "The user attempted to use a resource that requires a TOS they have not accepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted because they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InstanceConsumptionData": { - "id": "InstanceConsumptionData", - "properties": { - "consumptionInfo": { - "$ref": "InstanceConsumptionInfo", - "description": "Resources consumed by the instance." - }, - "instance": { - "description": "Server-defined URL for the instance.", - "type": "string" - } - }, - "type": "object" - }, - "InstanceConsumptionInfo": { - "id": "InstanceConsumptionInfo", - "properties": { - "guestCpus": { - "description": "The number of virtual CPUs that are available to the instance.", - "format": "int32", - "type": "integer" - }, - "localSsdGb": { - "description": "The amount of local SSD storage available to the instance, defined in GiB.", - "format": "int32", - "type": "integer" - }, - "memoryMb": { - "description": "The amount of physical memory available to the instance, defined in MiB.", - "format": "int32", - "type": "integer" - }, - "minNodeCpus": { - "description": "The minimal guaranteed number of virtual CPUs that are reserved.", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "InstanceGroup": { - "description": "Represents an Instance Group resource. Instance Groups can be used to configure a target for load balancing. Instance groups can either be managed or unmanaged. To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead. Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups. For more information, read Instance groups.", - "id": "InstanceGroup", - "properties": { - "creationTimestamp": { - "description": "[Output Only] The creation timestamp for this instance group in RFC3339 text format.", - "type": "string" - }, - "description": { - "description": "An optional description of this resource. Provide this property when you create the resource.", - "type": "string" - }, - "fingerprint": { - "description": "[Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.", - "format": "byte", - "type": "string" - }, - "id": { - "description": "[Output Only] A unique identifier for this instance group, generated by the server.", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "compute#instanceGroup", - "description": "[Output Only] The resource type, which is always compute#instanceGroup for instance groups.", - "type": "string" - }, - "name": { - "annotations": { - "required": [ - "compute.instanceGroups.insert" - ] - }, - "description": "The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "type": "string" - }, - "namedPorts": { - "description": " Assigns a name to a port number. For example: {name: \"http\", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: \"app1\", port: 8080}, {name: \"app1\", port: 8081}, {name: \"app2\", port: 8082}] Named ports apply to all instances in this instance group. ", - "items": { - "$ref": "NamedPort" - }, - "type": "array" - }, - "network": { - "description": "[Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).", - "type": "string" - }, - "region": { - "description": "[Output Only] The URL of the region where the instance group is located (for regional resources).", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] The URL for this instance group. The server generates this URL.", - "type": "string" - }, - "size": { - "description": "[Output Only] The total number of instances in the instance group.", - "format": "int32", - "type": "integer" - }, - "subnetwork": { - "description": "[Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).", - "type": "string" - }, - "zone": { - "description": "[Output Only] The URL of the zone where the instance group is located (for zonal resources).", - "type": "string" - } - }, - "type": "object" - }, - "InstanceGroupAggregatedList": { - "id": "InstanceGroupAggregatedList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "additionalProperties": { - "$ref": "InstanceGroupsScopedList", - "description": "The name of the scope that contains this set of instance groups." - }, - "description": "A list of InstanceGroupsScopedList resources.", - "type": "object" - }, - "kind": { - "default": "compute#instanceGroupAggregatedList", - "description": "[Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "unreachables": { - "description": "[Output Only] Unreachable resources.", - "items": { - "type": "string" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, false, false ], @@ -49872,6 +50248,281 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "InstanceConsumptionData": { + "id": "InstanceConsumptionData", + "properties": { + "consumptionInfo": { + "$ref": "InstanceConsumptionInfo", + "description": "Resources consumed by the instance." + }, + "instance": { + "description": "Server-defined URL for the instance.", + "type": "string" + } + }, + "type": "object" + }, + "InstanceConsumptionInfo": { + "id": "InstanceConsumptionInfo", + "properties": { + "guestCpus": { + "description": "The number of virtual CPUs that are available to the instance.", + "format": "int32", + "type": "integer" + }, + "localSsdGb": { + "description": "The amount of local SSD storage available to the instance, defined in GiB.", + "format": "int32", + "type": "integer" + }, + "memoryMb": { + "description": "The amount of physical memory available to the instance, defined in MiB.", + "format": "int32", + "type": "integer" + }, + "minNodeCpus": { + "description": "The minimal guaranteed number of virtual CPUs that are reserved.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "InstanceGroup": { + "description": "Represents an Instance Group resource. Instance Groups can be used to configure a target for load balancing. Instance groups can either be managed or unmanaged. To create managed instance groups, use the instanceGroupManager or regionInstanceGroupManager resource instead. Use zonal unmanaged instance groups if you need to apply load balancing to groups of heterogeneous instances or if you need to manage the instances yourself. You cannot create regional unmanaged instance groups. For more information, read Instance groups.", + "id": "InstanceGroup", + "properties": { + "creationTimestamp": { + "description": "[Output Only] The creation timestamp for this instance group in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "An optional description of this resource. Provide this property when you create the resource.", + "type": "string" + }, + "fingerprint": { + "description": "[Output Only] The fingerprint of the named ports. The system uses this fingerprint to detect conflicts when multiple users change the named ports concurrently.", + "format": "byte", + "type": "string" + }, + "id": { + "description": "[Output Only] A unique identifier for this instance group, generated by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#instanceGroup", + "description": "[Output Only] The resource type, which is always compute#instanceGroup for instance groups.", + "type": "string" + }, + "name": { + "annotations": { + "required": [ + "compute.instanceGroups.insert" + ] + }, + "description": "The name of the instance group. The name must be 1-63 characters long, and comply with RFC1035.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "namedPorts": { + "description": " Assigns a name to a port number. For example: {name: \"http\", port: 80} This allows the system to reference ports by the assigned name instead of a port number. Named ports can also contain multiple ports. For example: [{name: \"app1\", port: 8080}, {name: \"app1\", port: 8081}, {name: \"app2\", port: 8082}] Named ports apply to all instances in this instance group. ", + "items": { + "$ref": "NamedPort" + }, + "type": "array" + }, + "network": { + "description": "[Output Only] The URL of the network to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).", + "type": "string" + }, + "region": { + "description": "[Output Only] The URL of the region where the instance group is located (for regional resources).", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] The URL for this instance group. The server generates this URL.", + "type": "string" + }, + "size": { + "description": "[Output Only] The total number of instances in the instance group.", + "format": "int32", + "type": "integer" + }, + "subnetwork": { + "description": "[Output Only] The URL of the subnetwork to which all instances in the instance group belong. If your instance has multiple network interfaces, then the network and subnetwork fields only refer to the network and subnet used by your primary interface (nic0).", + "type": "string" + }, + "zone": { + "description": "[Output Only] The URL of the zone where the instance group is located (for zonal resources).", + "type": "string" + } + }, + "type": "object" + }, + "InstanceGroupAggregatedList": { + "id": "InstanceGroupAggregatedList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "additionalProperties": { + "$ref": "InstanceGroupsScopedList", + "description": "The name of the scope that contains this set of instance groups." + }, + "description": "A list of InstanceGroupsScopedList resources.", + "type": "object" + }, + "kind": { + "default": "compute#instanceGroupAggregatedList", + "description": "[Output Only] The resource type, which is always compute#instanceGroupAggregatedList for aggregated lists of instance groups.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources.", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -49964,6 +50615,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -50000,6 +50652,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -50024,6 +50677,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -50173,6 +50827,10 @@ "description": "[Output Only] The URL for this managed instance group. The server defines this URL.", "type": "string" }, + "standbyPolicy": { + "$ref": "InstanceGroupManagerStandbyPolicy", + "description": "Standby policy for stopped and suspended instances." + }, "statefulPolicy": { "$ref": "StatefulPolicy", "description": "Stateful configuration for this Instanced Group Manager" @@ -50199,6 +50857,16 @@ "format": "int32", "type": "integer" }, + "targetStoppedSize": { + "description": "The target number of stopped instances for this managed instance group. This number changes when you: - Stop instance using the stopInstances method or start instances using the startInstances method. - Manually change the targetStoppedSize using the update method. ", + "format": "int32", + "type": "integer" + }, + "targetSuspendedSize": { + "description": "The target number of suspended instances for this managed instance group. This number changes when you: - Suspend instance using the suspendInstances method or resume instances using the resumeInstances method. - Manually change the targetSuspendedSize using the update method. ", + "format": "int32", + "type": "integer" + }, "updatePolicy": { "$ref": "InstanceGroupManagerUpdatePolicy", "description": "The update policy for this managed instance group." @@ -50350,6 +51018,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -50386,6 +51055,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -50410,6 +51080,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -50588,6 +51259,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -50624,6 +51296,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -50648,6 +51321,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -50932,6 +51606,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -50968,6 +51643,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -50992,6 +51668,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -51029,6 +51706,29 @@ }, "type": "object" }, + "InstanceGroupManagerStandbyPolicy": { + "id": "InstanceGroupManagerStandbyPolicy", + "properties": { + "initialDelaySec": { + "description": "Specifies the number of seconds that the MIG should wait to suspend or stop a VM after that VM was created. The initial delay gives the initialization script the time to prepare your VM for a quick scale out. The value of initial delay must be between 0 and 3600 seconds. The default value is 0.", + "format": "int32", + "type": "integer" + }, + "mode": { + "description": "Defines how a MIG resumes or starts VMs from a standby pool when the group scales out. The default mode is `MANUAL`.", + "enum": [ + "MANUAL", + "SCALE_OUT_POOL" + ], + "enumDescriptions": [ + "MIG does not automatically resume or start VMs in the standby pool when the group scales out.", + "MIG automatically resumes or starts VMs in the standby pool when the group scales out, and replenishes the standby pool afterwards." + ], + "type": "string" + } + }, + "type": "object" + }, "InstanceGroupManagerStatus": { "id": "InstanceGroupManagerStatus", "properties": { @@ -51386,6 +52086,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -51422,6 +52123,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -51446,6 +52148,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -51510,6 +52213,19 @@ }, "type": "object" }, + "InstanceGroupManagersResumeInstancesRequest": { + "id": "InstanceGroupManagersResumeInstancesRequest", + "properties": { + "instances": { + "description": "The URLs of one or more instances to resume. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "InstanceGroupManagersScopedList": { "id": "InstanceGroupManagersScopedList", "properties": { @@ -51547,6 +52263,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -51583,6 +52300,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -51607,6 +52325,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -51672,6 +52391,53 @@ }, "type": "object" }, + "InstanceGroupManagersStartInstancesRequest": { + "id": "InstanceGroupManagersStartInstancesRequest", + "properties": { + "instances": { + "description": "The URLs of one or more instances to start. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstanceGroupManagersStopInstancesRequest": { + "id": "InstanceGroupManagersStopInstancesRequest", + "properties": { + "forceStop": { + "description": "If this flag is set to true, the Instance Group Manager will proceed to stop the instances, skipping initialization on them.", + "type": "boolean" + }, + "instances": { + "description": "The URLs of one or more instances to stop. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstanceGroupManagersSuspendInstancesRequest": { + "id": "InstanceGroupManagersSuspendInstancesRequest", + "properties": { + "forceSuspend": { + "description": "If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them.", + "type": "boolean" + }, + "instances": { + "description": "The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "InstanceGroupManagersUpdatePerInstanceConfigsReq": { "description": "InstanceGroupManagers.updatePerInstanceConfigs", "id": "InstanceGroupManagersUpdatePerInstanceConfigsReq", @@ -51753,6 +52519,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -51789,6 +52556,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -51813,6 +52581,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -51918,6 +52687,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -51954,6 +52724,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -51978,6 +52749,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -52088,6 +52860,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -52124,6 +52897,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -52148,6 +52922,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -52240,6 +53015,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -52276,6 +53052,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -52300,6 +53077,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -52766,6 +53544,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -52802,6 +53581,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -52826,6 +53606,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -52918,6 +53699,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -52954,6 +53736,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -52978,6 +53761,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -53052,6 +53836,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -53088,6 +53873,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -53112,6 +53898,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -53341,6 +54128,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -53377,6 +54165,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -53401,6 +54190,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -53727,6 +54517,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -53763,6 +54554,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -53787,6 +54579,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -53879,6 +54672,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -53915,6 +54709,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -53939,6 +54734,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -54024,6 +54820,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -54060,6 +54857,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -54084,6 +54882,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -54681,6 +55480,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -54717,198 +55517,6 @@ false, false, false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed operation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as deprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as experimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden. Deprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the network.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite the mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "The user attempted to use a resource that requires a TOS they have not accepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted because they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "InterconnectAttachmentConfigurationConstraints": { - "id": "InterconnectAttachmentConfigurationConstraints", - "properties": { - "bgpMd5": { - "description": "[Output Only] Whether the attachment's BGP session requires/allows/disallows BGP MD5 authentication. This can take one of the following values: MD5_OPTIONAL, MD5_REQUIRED, MD5_UNSUPPORTED. For example, a Cross-Cloud Interconnect connection to a remote cloud provider that requires BGP MD5 authentication has the interconnectRemoteLocation attachment_configuration_constraints.bgp_md5 field set to MD5_REQUIRED, and that property is propagated to the attachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is returned if MD5 is requested.", - "enum": [ - "MD5_OPTIONAL", - "MD5_REQUIRED", - "MD5_UNSUPPORTED" - ], - "enumDescriptions": [ - "MD5_OPTIONAL: BGP MD5 authentication is supported and can optionally be configured.", - "MD5_REQUIRED: BGP MD5 authentication must be configured.", - "MD5_UNSUPPORTED: BGP MD5 authentication must not be configured" - ], - "type": "string" - }, - "bgpPeerAsnRanges": { - "description": "[Output Only] List of ASN ranges that the remote location is known to support. Formatted as an array of inclusive ranges {min: min-value, max: max-value}. For example, [{min: 123, max: 123}, {min: 64512, max: 65534}] allows the peer ASN to be 123 or anything in the range 64512-65534. This field is only advisory. Although the API accepts other ranges, these are the ranges that we recommend.", - "items": { - "$ref": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange" - }, - "type": "array" - } - }, - "type": "object" - }, - "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange": { - "id": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange", - "properties": { - "max": { - "format": "uint32", - "type": "integer" - }, - "min": { - "format": "uint32", - "type": "integer" - } - }, - "type": "object" - }, - "InterconnectAttachmentList": { - "description": "Response to the list request, and contains a list of interconnect attachments.", - "id": "InterconnectAttachmentList", - "properties": { - "id": { - "description": "[Output Only] Unique identifier for the resource; defined by the server.", - "type": "string" - }, - "items": { - "description": "A list of InterconnectAttachment resources.", - "items": { - "$ref": "InterconnectAttachment" - }, - "type": "array" - }, - "kind": { - "default": "compute#interconnectAttachmentList", - "description": "[Output Only] Type of resource. Always compute#interconnectAttachmentList for lists of interconnect attachments.", - "type": "string" - }, - "nextPageToken": { - "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", - "type": "string" - }, - "selfLink": { - "description": "[Output Only] Server-defined URL for this resource.", - "type": "string" - }, - "warning": { - "description": "[Output Only] Informational warning message.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, false, false ], @@ -54934,6 +55542,203 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "InterconnectAttachmentConfigurationConstraints": { + "id": "InterconnectAttachmentConfigurationConstraints", + "properties": { + "bgpMd5": { + "description": "[Output Only] Whether the attachment's BGP session requires/allows/disallows BGP MD5 authentication. This can take one of the following values: MD5_OPTIONAL, MD5_REQUIRED, MD5_UNSUPPORTED. For example, a Cross-Cloud Interconnect connection to a remote cloud provider that requires BGP MD5 authentication has the interconnectRemoteLocation attachment_configuration_constraints.bgp_md5 field set to MD5_REQUIRED, and that property is propagated to the attachment. Similarly, if BGP MD5 is MD5_UNSUPPORTED, an error is returned if MD5 is requested.", + "enum": [ + "MD5_OPTIONAL", + "MD5_REQUIRED", + "MD5_UNSUPPORTED" + ], + "enumDescriptions": [ + "MD5_OPTIONAL: BGP MD5 authentication is supported and can optionally be configured.", + "MD5_REQUIRED: BGP MD5 authentication must be configured.", + "MD5_UNSUPPORTED: BGP MD5 authentication must not be configured" + ], + "type": "string" + }, + "bgpPeerAsnRanges": { + "description": "[Output Only] List of ASN ranges that the remote location is known to support. Formatted as an array of inclusive ranges {min: min-value, max: max-value}. For example, [{min: 123, max: 123}, {min: 64512, max: 65534}] allows the peer ASN to be 123 or anything in the range 64512-65534. This field is only advisory. Although the API accepts other ranges, these are the ranges that we recommend.", + "items": { + "$ref": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange" + }, + "type": "array" + } + }, + "type": "object" + }, + "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange": { + "id": "InterconnectAttachmentConfigurationConstraintsBgpPeerASNRange", + "properties": { + "max": { + "format": "uint32", + "type": "integer" + }, + "min": { + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, + "InterconnectAttachmentList": { + "description": "Response to the list request, and contains a list of interconnect attachments.", + "id": "InterconnectAttachmentList", + "properties": { + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of InterconnectAttachment resources.", + "items": { + "$ref": "InterconnectAttachment" + }, + "type": "array" + }, + "kind": { + "default": "compute#interconnectAttachmentList", + "description": "[Output Only] Type of resource. Always compute#interconnectAttachmentList for lists of interconnect attachments.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -55039,6 +55844,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -55075,6 +55881,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -55099,6 +55906,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -55392,6 +56200,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -55428,6 +56237,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -55452,6 +56262,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -55502,7 +56313,7 @@ "type": "string" }, "availableFeatures": { - "description": "[Output only] List of features available at this InterconnectLocation, which can take one of the following values: - MACSEC ", + "description": "[Output only] List of features available at this InterconnectLocation, which can take one of the following values: - IF_MACSEC ", "items": { "enum": [ "IF_MACSEC" @@ -55680,6 +56491,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -55716,6 +56528,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -55740,6 +56553,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -56184,6 +56998,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -56220,6 +57035,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -56244,6 +57060,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -56357,7 +57174,8 @@ "type": "string" }, "resourceRequirements": { - "$ref": "LicenseResourceRequirements" + "$ref": "LicenseResourceRequirements", + "description": "[Input Only] Deprecated." }, "selfLink": { "description": "[Output Only] Server-defined URL for the resource.", @@ -56476,12 +57294,12 @@ "id": "LicenseResourceRequirements", "properties": { "minGuestCpuCount": { - "description": "Minimum number of guest cpus required to use the Instance. Enforced at Instance creation and Instance start.", + "description": "[Input Only] Deprecated. This field no longer reflects the minimum number of guest cpus required to use the Instance.", "format": "int32", "type": "integer" }, "minMemoryMb": { - "description": "Minimum memory required to use the Instance. Enforced at Instance creation and Instance start.", + "description": "[Input Only] Deprecated. This field no longer reflects the minimum memory required to use the Instance.", "format": "int32", "type": "integer" } @@ -56537,6 +57355,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -56573,6 +57392,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -56597,6 +57417,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -56900,6 +57721,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -56936,6 +57758,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -56960,6 +57783,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -57176,6 +58000,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -57212,6 +58037,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -57236,6 +58062,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -57328,6 +58155,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -57364,139 +58192,6 @@ false, false, false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed operation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as deprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as experimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden. Deprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the network.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite the mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "The user attempted to use a resource that requires a TOS they have not accepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted because they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "MachineTypesScopedList": { - "id": "MachineTypesScopedList", - "properties": { - "machineTypes": { - "description": "[Output Only] A list of machine types contained in this scope.", - "items": { - "$ref": "MachineType" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that appears when the machine types list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, false, false ], @@ -57522,6 +58217,144 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "MachineTypesScopedList": { + "id": "MachineTypesScopedList", + "properties": { + "machineTypes": { + "description": "[Output Only] A list of machine types contained in this scope.", + "items": { + "$ref": "MachineType" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] An informational warning that appears when the machine types list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58023,6 +58856,10 @@ ], "type": "string" }, + "networkProfile": { + "description": "A full or partial URL of the network profile to apply to this network. This field can be set only at resource creation time. For example, the following are valid URLs: - https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} - projects/{project_id}/global/networkProfiles/{network_profile_name} ", + "type": "string" + }, "peerings": { "description": "[Output Only] A list of network peerings for the resource.", "items": { @@ -58204,6 +59041,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -58240,6 +59078,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -58264,6 +59103,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58408,6 +59248,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -58444,139 +59285,6 @@ false, false, false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed operation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as deprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as experimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden. Deprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the network.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite the mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "The user attempted to use a resource that requires a TOS they have not accepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted because they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkAttachmentsScopedList": { - "id": "NetworkAttachmentsScopedList", - "properties": { - "networkAttachments": { - "description": "A list of NetworkAttachments contained in this scope.", - "items": { - "$ref": "NetworkAttachment" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of network attachments when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, false, false ], @@ -58602,6 +59310,144 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "NetworkAttachmentsScopedList": { + "id": "NetworkAttachmentsScopedList", + "properties": { + "networkAttachments": { + "description": "A list of NetworkAttachments contained in this scope.", + "items": { + "$ref": "NetworkAttachment" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of network attachments when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58755,6 +59601,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -58791,6 +59638,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -58815,6 +59663,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -58889,6 +59738,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -58925,6 +59775,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -58949,6 +59800,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -59197,6 +60049,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -59233,6 +60086,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -59257,6 +60111,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -59401,6 +60256,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -59437,6 +60293,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -59461,6 +60318,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -59633,6 +60491,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -59669,139 +60528,6 @@ false, false, false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed operation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as deprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as experimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden. Deprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the network.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite the mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "The user attempted to use a resource that requires a TOS they have not accepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted because they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "NetworkEndpointGroupsScopedList": { - "id": "NetworkEndpointGroupsScopedList", - "properties": { - "networkEndpointGroups": { - "description": "[Output Only] The list of network endpoint groups that are contained in this scope.", - "items": { - "$ref": "NetworkEndpointGroup" - }, - "type": "array" - }, - "warning": { - "description": "[Output Only] An informational warning that replaces the list of network endpoint groups when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, false, false ], @@ -59827,6 +60553,144 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "NetworkEndpointGroupsScopedList": { + "id": "NetworkEndpointGroupsScopedList", + "properties": { + "networkEndpointGroups": { + "description": "[Output Only] The list of network endpoint groups that are contained in this scope.", + "items": { + "$ref": "NetworkEndpointGroup" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] An informational warning that replaces the list of network endpoint groups when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -59958,12 +60822,16 @@ "enum": [ "GVNIC", "IDPF", + "IRDMA", + "MRDMA", "UNSPECIFIED_NIC_TYPE", "VIRTIO_NET" ], "enumDescriptions": [ "GVNIC", "IDPF", + "IRDMA", + "MRDMA", "No type specified.", "VIRTIO" ], @@ -60050,6 +60918,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -60086,6 +60955,635 @@ false, false, false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "NetworkPeering": { + "description": "A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.", + "id": "NetworkPeering", + "properties": { + "autoCreateRoutes": { + "description": "This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", + "type": "boolean" + }, + "exchangeSubnetRoutes": { + "description": "Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", + "type": "boolean" + }, + "exportCustomRoutes": { + "description": "Whether to export the custom routes to peer network. The default value is false.", + "type": "boolean" + }, + "exportSubnetRoutesWithPublicIp": { + "description": "Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field.", + "type": "boolean" + }, + "importCustomRoutes": { + "description": "Whether to import the custom routes from peer network. The default value is false.", + "type": "boolean" + }, + "importSubnetRoutesWithPublicIp": { + "description": "Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field.", + "type": "boolean" + }, + "name": { + "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", + "type": "string" + }, + "network": { + "description": "The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.", + "type": "string" + }, + "peerMtu": { + "description": "Maximum Transmission Unit in bytes.", + "format": "int32", + "type": "integer" + }, + "stackType": { + "description": "Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY.", + "enum": [ + "IPV4_IPV6", + "IPV4_ONLY" + ], + "enumDescriptions": [ + "This Peering will allow IPv4 traffic and routes to be exchanged. Additionally if the matching peering is IPV4_IPV6, IPv6 traffic and routes will be exchanged as well.", + "This Peering will only allow IPv4 traffic and routes to be exchanged, even if the matching peering is IPV4_IPV6." + ], + "type": "string" + }, + "state": { + "description": "[Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network.", + "enum": [ + "ACTIVE", + "INACTIVE" + ], + "enumDescriptions": [ + "Matching configuration exists on the peer.", + "There is no matching configuration on the peer, including the case when peer does not exist." + ], + "type": "string" + }, + "stateDetails": { + "description": "[Output Only] Details about the current state of the peering.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkPerformanceConfig": { + "id": "NetworkPerformanceConfig", + "properties": { + "totalEgressBandwidthTier": { + "enum": [ + "DEFAULT", + "TIER_1" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "NetworkProfile": { + "description": "NetworkProfile represents a Google managed network profile resource.", + "id": "NetworkProfile", + "properties": { + "creationTimestamp": { + "description": "[Output Only] Creation timestamp in RFC3339 text format.", + "type": "string" + }, + "description": { + "description": "[Output Only] An optional description of this resource.", + "type": "string" + }, + "features": { + "$ref": "NetworkProfileNetworkFeatures", + "description": "[Output Only] Features supported by the network." + }, + "id": { + "description": "[Output Only] The unique identifier for the resource. This identifier is defined by the server.", + "format": "uint64", + "type": "string" + }, + "kind": { + "default": "compute#networkProfile", + "description": "[Output Only] Type of the resource. Always compute#networkProfile for network profiles.", + "type": "string" + }, + "location": { + "$ref": "NetworkProfileLocation", + "description": "[Output Only] Location to which the network is restricted." + }, + "name": { + "description": "[Output Only] Name of the resource.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for the resource.", + "type": "string" + }, + "selfLinkWithId": { + "description": "[Output Only] Server-defined URL for this resource with the resource id.", + "type": "string" + }, + "zone": { + "description": "[Output Only] Zone to which the network is restricted.", + "type": "string" + } + }, + "type": "object" + }, + "NetworkProfileLocation": { + "id": "NetworkProfileLocation", + "properties": { + "name": { + "type": "string" + }, + "scope": { + "enum": [ + "REGION", + "ZONE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "NetworkProfileNetworkFeatures": { + "id": "NetworkProfileNetworkFeatures", + "properties": { + "addressPurposes": { + "description": "Specifies what address purposes are supported. If empty, all address purposes are supported.", + "items": { + "enum": [ + "DNS_RESOLVER", + "GCE_ENDPOINT", + "IPSEC_INTERCONNECT", + "NAT_AUTO", + "PRIVATE_SERVICE_CONNECT", + "SERVERLESS", + "SHARED_LOADBALANCER_VIP", + "VPC_PEERING" + ], + "enumDescriptions": [ + "DNS resolver address in the subnetwork.", + "VM internal/alias IP, Internal LB service IP, etc.", + "A regional internal IP address range reserved for the VLAN attachment that is used in HA VPN over Cloud Interconnect. This regional internal IP address range must not overlap with any IP address range of subnet/route in the VPC network and its peering networks. After the VLAN attachment is created with the reserved IP address range, when creating a new VPN gateway, its interface IP address is allocated from the associated VLAN attachment’s IP address range.", + "External IP automatically reserved for Cloud NAT.", + "A private network IP address that can be used to configure Private Service Connect. This purpose can be specified only for GLOBAL addresses of Type INTERNAL", + "A regional internal IP address range reserved for Serverless.", + "A private network IP address that can be shared by multiple Internal Load Balancer forwarding rules.", + "IP range for peer networks." + ], + "type": "string" + }, + "type": "array" + }, + "allowAliasIpRanges": { + "description": "Specifies whether alias IP ranges (and secondary address ranges) are allowed.", + "enum": [ + "ALIAS_IP_RANGES_ALLOWED", + "ALIAS_IP_RANGES_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowAutoModeSubnet": { + "description": "Specifies whether auto mode subnet creation is allowed.", + "enum": [ + "AUTO_MODE_SUBNET_ALLOWED", + "AUTO_MODE_SUBNET_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowClassDFirewalls": { + "description": "Specifies whether firewalls for Class D address ranges are supported.", + "enum": [ + "CLASS_D_FIREWALLS_ALLOWED", + "CLASS_D_FIREWALLS_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowCloudNat": { + "description": "Specifies whether cloud NAT creation is allowed.", + "enum": [ + "CLOUD_NAT_ALLOWED", + "CLOUD_NAT_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowCloudRouter": { + "description": "Specifies whether cloud router creation is allowed.", + "enum": [ + "CLOUD_ROUTER_ALLOWED", + "CLOUD_ROUTER_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowExternalIpAccess": { + "description": "Specifies whether VMs are allowed to have external IP access on network interfaces connected to this VPC.", + "enum": [ + "EXTERNAL_IP_ACCESS_ALLOWED", + "EXTERNAL_IP_ACCESS_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowInterconnect": { + "description": "Specifies whether Cloud Interconnect creation is allowed.", + "enum": [ + "INTERCONNECT_ALLOWED", + "INTERCONNECT_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowLoadBalancing": { + "description": "Specifies whether cloud load balancing is allowed.", + "enum": [ + "LOAD_BALANCING_ALLOWED", + "LOAD_BALANCING_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowMultiNicInSameNetwork": { + "description": "Specifies whether multi-nic in the same network is allowed.", + "enum": [ + "MULTI_NIC_IN_SAME_NETWORK_ALLOWED", + "MULTI_NIC_IN_SAME_NETWORK_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowPacketMirroring": { + "description": "Specifies whether Packet Mirroring 1.0 is supported.", + "enum": [ + "PACKET_MIRRORING_ALLOWED", + "PACKET_MIRRORING_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowPrivateGoogleAccess": { + "description": "Specifies whether private Google access is allowed.", + "enum": [ + "PRIVATE_GOOGLE_ACCESS_ALLOWED", + "PRIVATE_GOOGLE_ACCESS_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowPsc": { + "description": "Specifies whether PSC creation is allowed.", + "enum": [ + "PSC_ALLOWED", + "PSC_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowSameNetworkUnicast": { + "description": "Specifies whether unicast within the same network is allowed.", + "enum": [ + "SAME_NETWORK_UNICAST_ALLOWED", + "SAME_NETWORK_UNICAST_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowStaticRoutes": { + "description": "Specifies whether static route creation is allowed.", + "enum": [ + "STATIC_ROUTES_ALLOWED", + "STATIC_ROUTES_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowSubInterfaces": { + "description": "Specifies whether sub interfaces are allowed.", + "enum": [ + "SUBINTERFACES_ALLOWED", + "SUBINTERFACES_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowVpcPeering": { + "description": "Specifies whether VPC peering is allowed.", + "enum": [ + "VPC_PEERING_ALLOWED", + "VPC_PEERING_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "allowVpn": { + "description": "Specifies whether VPN creation is allowed.", + "enum": [ + "VPN_ALLOWED", + "VPN_BLOCKED" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "interfaceTypes": { + "description": "If set, limits the interface types that the network supports. If empty, all interface types are supported.", + "items": { + "enum": [ + "GVNIC", + "IDPF", + "IRDMA", + "MRDMA", + "UNSPECIFIED_NIC_TYPE", + "VIRTIO_NET" + ], + "enumDescriptions": [ + "GVNIC", + "IDPF", + "IRDMA", + "MRDMA", + "No type specified.", + "VIRTIO" + ], + "type": "string" + }, + "type": "array" + }, + "subnetPurposes": { + "description": "Specifies which subnetwork purposes are supported.", + "items": { + "enum": [ + "SUBNET_PURPOSE_CUSTOM_HARDWARE", + "SUBNET_PURPOSE_PRIVATE" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + }, + "type": "array" + }, + "subnetStackTypes": { + "description": "Specifies which subnetwork stack types are supported.", + "items": { + "enum": [ + "SUBNET_STACK_TYPE_IPV4_IPV6", + "SUBNET_STACK_TYPE_IPV4_ONLY", + "SUBNET_STACK_TYPE_IPV6_ONLY" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, + "type": "array" + }, + "unicast": { + "description": "Specifies which type of unicast is supported.", + "enum": [ + "UNICAST_SDN", + "UNICAST_ULL" + ], + "enumDescriptions": [ + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "NetworkProfilesListResponse": { + "description": "Contains a list of network profiles.", + "id": "NetworkProfilesListResponse", + "properties": { + "etag": { + "type": "string" + }, + "id": { + "description": "[Output Only] Unique identifier for the resource; defined by the server.", + "type": "string" + }, + "items": { + "description": "A list of NetworkProfile resources.", + "items": { + "$ref": "NetworkProfile" + }, + "type": "array" + }, + "kind": { + "default": "compute#networkProfileList", + "description": "[Output Only] Type of resource. Always compute#networkProfileList for network profiles.", + "type": "string" + }, + "nextPageToken": { + "description": "[Output Only] This token allows you to get the next page of results for list requests. If the number of results is larger than maxResults, use the nextPageToken as a value for the query parameter pageToken in the next list request. Subsequent list requests will have their own nextPageToken to continue paging through the results.", + "type": "string" + }, + "selfLink": { + "description": "[Output Only] Server-defined URL for this resource.", + "type": "string" + }, + "unreachables": { + "description": "[Output Only] Unreachable resources. end_interface: MixerListResponseWithEtagBuilder", + "items": { + "type": "string" + }, + "type": "array" + }, + "warning": { + "description": "[Output Only] Informational warning message.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, false ], "enumDescriptions": [ @@ -60110,6 +61608,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -60147,99 +61646,38 @@ }, "type": "object" }, - "NetworkPeering": { - "description": "A network peering attached to a network resource. The message includes the peering name, peer network, peering state, and a flag indicating whether Google Compute Engine should automatically create routes for the peering.", - "id": "NetworkPeering", + "NetworkRoutingConfig": { + "description": "A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide.", + "id": "NetworkRoutingConfig", "properties": { - "autoCreateRoutes": { - "description": "This field will be deprecated soon. Use the exchange_subnet_routes field instead. Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", - "type": "boolean" - }, - "exchangeSubnetRoutes": { - "description": "Indicates whether full mesh connectivity is created and managed automatically between peered networks. Currently this field should always be true since Google Compute Engine will automatically create and manage subnetwork routes between two networks when peering state is ACTIVE.", - "type": "boolean" - }, - "exportCustomRoutes": { - "description": "Whether to export the custom routes to peer network. The default value is false.", + "bgpAlwaysCompareMed": { + "description": "Enable comparison of Multi-Exit Discriminators (MED) across routes with different neighbor ASNs when using the STANDARD BGP best path selection algorithm.", "type": "boolean" }, - "exportSubnetRoutesWithPublicIp": { - "description": "Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. IPv4 special-use ranges are always exported to peers and are not controlled by this field.", - "type": "boolean" - }, - "importCustomRoutes": { - "description": "Whether to import the custom routes from peer network. The default value is false.", - "type": "boolean" - }, - "importSubnetRoutesWithPublicIp": { - "description": "Whether subnet routes with public IP range are imported. The default value is false. IPv4 special-use ranges are always imported from peers and are not controlled by this field.", - "type": "boolean" - }, - "name": { - "description": "Name of this peering. Provided by the client when the peering is created. The name must comply with RFC1035. Specifically, the name must be 1-63 characters long and match regular expression `[a-z]([-a-z0-9]*[a-z0-9])?`. The first character must be a lowercase letter, and all the following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", - "type": "string" - }, - "network": { - "description": "The URL of the peer network. It can be either full URL or partial URL. The peer network may belong to a different project. If the partial URL does not contain project, it is assumed that the peer network is in the same project as the current network.", - "type": "string" - }, - "peerMtu": { - "description": "Maximum Transmission Unit in bytes.", - "format": "int32", - "type": "integer" - }, - "stackType": { - "description": "Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY.", + "bgpBestPathSelectionMode": { + "description": "The BGP best path selection algorithm to be employed within this network for dynamic routes learned by Cloud Routers. Can be LEGACY (default) or STANDARD.", "enum": [ - "IPV4_IPV6", - "IPV4_ONLY" - ], - "enumDescriptions": [ - "This Peering will allow IPv4 traffic and routes to be exchanged. Additionally if the matching peering is IPV4_IPV6, IPv6 traffic and routes will be exchanged as well.", - "This Peering will only allow IPv4 traffic and routes to be exchanged, even if the matching peering is IPV4_IPV6." - ], - "type": "string" - }, - "state": { - "description": "[Output Only] State for the peering, either `ACTIVE` or `INACTIVE`. The peering is `ACTIVE` when there's a matching configuration in the peer network.", - "enum": [ - "ACTIVE", - "INACTIVE" + "LEGACY", + "STANDARD" ], "enumDescriptions": [ - "Matching configuration exists on the peer.", - "There is no matching configuration on the peer, including the case when peer does not exist." + "", + "" ], "type": "string" }, - "stateDetails": { - "description": "[Output Only] Details about the current state of the peering.", - "type": "string" - } - }, - "type": "object" - }, - "NetworkPerformanceConfig": { - "id": "NetworkPerformanceConfig", - "properties": { - "totalEgressBandwidthTier": { + "bgpInterRegionCost": { + "description": "Allows to define a preferred approach for handling inter-region cost in the selection process when using the STANDARD BGP best path selection algorithm. Can be DEFAULT or ADD_COST_TO_MED.", "enum": [ - "DEFAULT", - "TIER_1" + "ADD_COST_TO_MED", + "DEFAULT" ], "enumDescriptions": [ "", "" ], "type": "string" - } - }, - "type": "object" - }, - "NetworkRoutingConfig": { - "description": "A routing configuration attached to a network resource. The message includes the list of routers associated with the network, and a flag indicating the type of routing behavior to enforce network-wide.", - "id": "NetworkRoutingConfig", - "properties": { + }, "routingMode": { "description": "The network-wide routing mode to use. If set to REGIONAL, this network's Cloud Routers will only advertise routes with subnets of this network in the same region as the router. If set to GLOBAL, this network's Cloud Routers will advertise routes with all subnets of this network, across regions.", "enum": [ @@ -60538,6 +61976,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -60574,6 +62013,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -60598,6 +62038,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -60722,6 +62163,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -60758,6 +62200,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -60782,6 +62225,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -61009,6 +62453,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -61045,6 +62490,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -61069,6 +62515,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -61160,6 +62607,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -61196,6 +62644,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -61220,6 +62669,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -61444,6 +62894,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -61480,6 +62931,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -61504,6 +62956,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -61596,6 +63049,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -61632,6 +63086,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -61656,6 +63111,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -61745,6 +63201,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -61781,6 +63238,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -61805,6 +63263,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -61965,6 +63424,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62001,6 +63461,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62025,6 +63486,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -62117,6 +63579,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62153,6 +63616,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62177,6 +63641,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -62251,6 +63716,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62287,6 +63753,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62311,6 +63778,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -62472,6 +63940,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62508,6 +63977,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62532,6 +64002,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -62755,6 +64226,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62791,6 +64263,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62815,6 +64288,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -62920,6 +64394,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -62956,6 +64431,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -62980,6 +64456,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -63072,6 +64549,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -63108,6 +64586,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -63132,6 +64611,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -63206,6 +64686,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -63242,6 +64723,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -63266,6 +64748,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -63566,6 +65049,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -63602,6 +65086,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -63626,6 +65111,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -63766,6 +65252,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -63802,6 +65289,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -63826,6 +65314,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -63969,6 +65458,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -64005,6 +65495,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -64029,6 +65520,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -64076,15 +65568,15 @@ }, "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. If defaultRouteAction is specified, don't set defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is specified, don't set defaultService. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." + "description": "defaultRouteAction takes effect when none of the pathRules or routeRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path matcher's defaultRouteAction." }, "defaultService": { - "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any weightedBackendServices. Conversely, if defaultRouteAction specifies any weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. Don't set both. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", + "description": "The full or partial URL to the BackendService resource. This URL is used if none of the pathRules or routeRules defined by this PathMatcher are matched. For example, the following are all valid URLs to a BackendService resource: - https://www.googleapis.com/compute/v1/projects/project /global/backendServices/backendService - compute/v1/projects/project/global/backendServices/backendService - global/backendServices/backendService If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Authorization requires one or more of the following Google IAM permissions on the specified resource default_service: - compute.backendBuckets.use - compute.backendServices.use ", "type": "string" }, "defaultUrlRedirect": { "$ref": "HttpRedirectAction", - "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, then set either defaultService or defaultRouteAction. Don't set both. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When none of the specified pathRules or routeRules match, the request is redirected to a URL specified by defaultUrlRedirect. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", @@ -64132,15 +65624,15 @@ }, "routeAction": { "$ref": "HttpRouteAction", - "description": "In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path rule's routeAction." + "description": "In response to a matching path, the load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within a path rule's routeAction." }, "service": { - "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set.", + "description": "The full or partial URL of the backend service resource to which traffic is directed if this rule is matched. If routeAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of urlRedirect, service or routeAction.weightedBackendService can be set.", "type": "string" }, "urlRedirect": { "$ref": "HttpRedirectAction", - "description": "When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. Only one of urlRedirect, service or routeAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." } }, "type": "object" @@ -64154,7 +65646,7 @@ "type": "string" }, "name": { - "description": "The name of a per-instance configuration and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance configuration with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance configconfiguration for a VM instance that either doesn't exist or is not part of the group will result in an error.", + "description": "The name of a per-instance configuration and its corresponding instance. Serves as a merge key during UpdatePerInstanceConfigs operations, that is, if a per-instance configuration with the same name exists then it will be updated, otherwise a new one will be created for the VM instance with the same name. An attempt to create a per-instance configuration for a VM instance that either doesn't exist or is not part of the group will result in an error.", "type": "string" }, "preservedState": { @@ -64384,7 +65876,7 @@ "type": "string" }, "enabledFeatures": { - "description": "Restricted features enabled for use on this project.", + "description": "An optional list of restricted features enabled for use on this project.", "items": { "type": "string" }, @@ -64417,7 +65909,7 @@ }, "usageExportLocation": { "$ref": "UsageExportLocation", - "description": "The naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." + "description": "An optional naming prefix for daily usage reports and the Google Cloud Storage bucket where they are stored." }, "vmDnsSetting": { "description": "[Output Only] Default internal DNS setting used by VMs running in this project.", @@ -64713,6 +66205,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -64749,6 +66242,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -64773,6 +66267,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -65015,6 +66510,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65051,6 +66547,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65075,6 +66572,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -65166,6 +66664,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65202,6 +66701,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65226,6 +66726,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -65360,6 +66861,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65396,6 +66898,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65420,6 +66923,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -65939,6 +67443,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -65975,6 +67480,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -65999,6 +67505,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66139,6 +67646,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66175,6 +67683,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66199,6 +67708,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66290,6 +67800,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66326,6 +67837,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66350,6 +67862,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66489,6 +68002,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66525,6 +68039,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66549,6 +68064,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66655,6 +68171,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66691,6 +68208,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66715,6 +68233,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -66932,6 +68451,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -66968,6 +68488,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -66992,6 +68513,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -67059,6 +68581,19 @@ }, "type": "object" }, + "RegionInstanceGroupManagersResumeInstancesRequest": { + "id": "RegionInstanceGroupManagersResumeInstancesRequest", + "properties": { + "instances": { + "description": "The URLs of one or more instances to resume. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "RegionInstanceGroupManagersSetTargetPoolsRequest": { "id": "RegionInstanceGroupManagersSetTargetPoolsRequest", "properties": { @@ -67087,6 +68622,53 @@ }, "type": "object" }, + "RegionInstanceGroupManagersStartInstancesRequest": { + "id": "RegionInstanceGroupManagersStartInstancesRequest", + "properties": { + "instances": { + "description": "The URLs of one or more instances to start. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RegionInstanceGroupManagersStopInstancesRequest": { + "id": "RegionInstanceGroupManagersStopInstancesRequest", + "properties": { + "forceStop": { + "description": "If this flag is set to true, the Instance Group Manager will proceed to stop the instances, skipping initialization on them.", + "type": "boolean" + }, + "instances": { + "description": "The URLs of one or more instances to stop. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "RegionInstanceGroupManagersSuspendInstancesRequest": { + "id": "RegionInstanceGroupManagersSuspendInstancesRequest", + "properties": { + "forceSuspend": { + "description": "If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them.", + "type": "boolean" + }, + "instances": { + "description": "The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, "RegionInstanceGroupsListInstances": { "id": "RegionInstanceGroupsListInstances", "properties": { @@ -67141,6 +68723,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -67177,6 +68760,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -67201,6 +68785,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -67334,6 +68919,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -67370,6 +68956,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -67394,6 +68981,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -67781,6 +69369,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -67817,6 +69406,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -67841,6 +69431,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -67932,6 +69523,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -67968,6 +69560,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -67992,6 +69585,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -68077,6 +69671,188 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", + "RESOURCE_NOT_DELETED", + "SCHEMA_VALIDATION_IGNORED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNDECLARED_PROPERTIES", + "UNREACHABLE" + ], + "enumDeprecated": [ + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false + ], + "enumDescriptions": [ + "Warning about failed cleanup of transient changes made by a failed operation.", + "A link to a deprecated resource was created.", + "When deploying and at least one of the resources has a type marked as deprecated", + "The user created a boot disk that is larger than image size.", + "When deploying and at least one of the resources has a type marked as experimental", + "Warning that is present in an external api call", + "Warning that value of a field has been overridden. Deprecated unused field.", + "The operation involved use of an injected kernel, which is deprecated.", + "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", + "When deploying a deployment with a exceedingly large number of resources", + "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", + "A resource depends on a missing type", + "The route's nextHopIp address is not assigned to an instance on the network.", + "The route's next hop instance cannot ip forward.", + "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", + "The route's nextHopInstance URL refers to an instance that does not exist.", + "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", + "The route's next hop instance does not have a status of RUNNING.", + "Error which is not critical. We decided to continue the process despite the mentioned error.", + "No results are present on a particular list page.", + "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", + "The user attempted to use a resource that requires a TOS they have not accepted.", + "Warning that a resource is in use.", + "One or more of the resources set to auto-delete could not be deleted because they were in use.", + "When a resource schema validation is ignored.", + "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", + "When undeclared properties in the schema are present", + "A given scope cannot be reached." + ], + "type": "string" + }, + "data": { + "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", + "items": { + "properties": { + "key": { + "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", + "type": "string" + }, + "value": { + "description": "[Output Only] A warning data value corresponding to the key.", + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "[Output Only] A human-readable description of the warning code.", + "type": "string" + } + }, + "type": "object" + } + }, + "type": "object" + }, + "ResourceCommitment": { + "description": "Commitment for a particular resource (a Commitment is composed of one or more of these).", + "id": "ResourceCommitment", + "properties": { + "acceleratorType": { + "description": "Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.", + "type": "string" + }, + "amount": { + "description": "The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.", + "format": "int64", + "type": "string" + }, + "type": { + "description": "Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.", + "enum": [ + "ACCELERATOR", + "LOCAL_SSD", + "MEMORY", + "UNSPECIFIED", + "VCPU" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "" + ], + "type": "string" + } + }, + "type": "object" + }, + "ResourceGroupReference": { + "id": "ResourceGroupReference", + "properties": { + "group": { + "description": "A URI referencing one of the instance groups or network endpoint groups listed in the backend service.", + "type": "string" + } + }, + "type": "object" + }, + "ResourcePoliciesScopedList": { + "id": "ResourcePoliciesScopedList", + "properties": { + "resourcePolicies": { + "description": "A list of resourcePolicies contained in this scope.", + "items": { + "$ref": "ResourcePolicy" + }, + "type": "array" + }, + "warning": { + "description": "Informational warning which replaces the list of resourcePolicies when the list is empty.", + "properties": { + "code": { + "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", + "enum": [ + "CLEANUP_FAILED", + "DEPRECATED_RESOURCE_USED", + "DEPRECATED_TYPE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "EXPERIMENTAL_TYPE_USED", + "EXTERNAL_API_WARNING", + "FIELD_VALUE_OVERRIDEN", + "INJECTED_KERNELS_DEPRECATED", + "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", + "LARGE_DEPLOYMENT_WARNING", + "LIST_OVERHEAD_QUOTA_EXCEED", + "MISSING_TYPE_DEPENDENCY", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -68113,183 +69889,6 @@ false, false, false, - false - ], - "enumDescriptions": [ - "Warning about failed cleanup of transient changes made by a failed operation.", - "A link to a deprecated resource was created.", - "When deploying and at least one of the resources has a type marked as deprecated", - "The user created a boot disk that is larger than image size.", - "When deploying and at least one of the resources has a type marked as experimental", - "Warning that is present in an external api call", - "Warning that value of a field has been overridden. Deprecated unused field.", - "The operation involved use of an injected kernel, which is deprecated.", - "A WEIGHTED_MAGLEV backend service is associated with a health check that is not of type HTTP/HTTPS/HTTP2.", - "When deploying a deployment with a exceedingly large number of resources", - "Resource can't be retrieved due to list overhead quota exceed which captures the amount of resources filtered out by user-defined list filter.", - "A resource depends on a missing type", - "The route's nextHopIp address is not assigned to an instance on the network.", - "The route's next hop instance cannot ip forward.", - "The route's nextHopInstance URL refers to an instance that does not have an ipv6 interface on the same network as the route.", - "The route's nextHopInstance URL refers to an instance that does not exist.", - "The route's nextHopInstance URL refers to an instance that is not on the same network as the route.", - "The route's next hop instance does not have a status of RUNNING.", - "Error which is not critical. We decided to continue the process despite the mentioned error.", - "No results are present on a particular list page.", - "Success is reported, but some results may be missing due to errors", - "The user attempted to use a resource that requires a TOS they have not accepted.", - "Warning that a resource is in use.", - "One or more of the resources set to auto-delete could not be deleted because they were in use.", - "When a resource schema validation is ignored.", - "Instance template used in instance group manager is valid as such, but its application does not make a lot of sense, because it allows only single instance in instance group.", - "When undeclared properties in the schema are present", - "A given scope cannot be reached." - ], - "type": "string" - }, - "data": { - "description": "[Output Only] Metadata about this warning in key: value format. For example: \"data\": [ { \"key\": \"scope\", \"value\": \"zones/us-east1-d\" } ", - "items": { - "properties": { - "key": { - "description": "[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).", - "type": "string" - }, - "value": { - "description": "[Output Only] A warning data value corresponding to the key.", - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - }, - "message": { - "description": "[Output Only] A human-readable description of the warning code.", - "type": "string" - } - }, - "type": "object" - } - }, - "type": "object" - }, - "ResourceCommitment": { - "description": "Commitment for a particular resource (a Commitment is composed of one or more of these).", - "id": "ResourceCommitment", - "properties": { - "acceleratorType": { - "description": "Name of the accelerator type resource. Applicable only when the type is ACCELERATOR.", - "type": "string" - }, - "amount": { - "description": "The amount of the resource purchased (in a type-dependent unit, such as bytes). For vCPUs, this can just be an integer. For memory, this must be provided in MB. Memory must be a multiple of 256 MB, with up to 6.5GB of memory per every vCPU.", - "format": "int64", - "type": "string" - }, - "type": { - "description": "Type of resource for which this commitment applies. Possible values are VCPU, MEMORY, LOCAL_SSD, and ACCELERATOR.", - "enum": [ - "ACCELERATOR", - "LOCAL_SSD", - "MEMORY", - "UNSPECIFIED", - "VCPU" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ResourceGroupReference": { - "id": "ResourceGroupReference", - "properties": { - "group": { - "description": "A URI referencing one of the instance groups or network endpoint groups listed in the backend service.", - "type": "string" - } - }, - "type": "object" - }, - "ResourcePoliciesScopedList": { - "id": "ResourcePoliciesScopedList", - "properties": { - "resourcePolicies": { - "description": "A list of resourcePolicies contained in this scope.", - "items": { - "$ref": "ResourcePolicy" - }, - "type": "array" - }, - "warning": { - "description": "Informational warning which replaces the list of resourcePolicies when the list is empty.", - "properties": { - "code": { - "description": "[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.", - "enum": [ - "CLEANUP_FAILED", - "DEPRECATED_RESOURCE_USED", - "DEPRECATED_TYPE_USED", - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", - "EXPERIMENTAL_TYPE_USED", - "EXTERNAL_API_WARNING", - "FIELD_VALUE_OVERRIDEN", - "INJECTED_KERNELS_DEPRECATED", - "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB", - "LARGE_DEPLOYMENT_WARNING", - "LIST_OVERHEAD_QUOTA_EXCEED", - "MISSING_TYPE_DEPENDENCY", - "NEXT_HOP_ADDRESS_NOT_ASSIGNED", - "NEXT_HOP_CANNOT_IP_FORWARD", - "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE", - "NEXT_HOP_INSTANCE_NOT_FOUND", - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", - "NEXT_HOP_NOT_RUNNING", - "NOT_CRITICAL_ERROR", - "NO_RESULTS_ON_PAGE", - "PARTIAL_SUCCESS", - "REQUIRED_TOS_AGREEMENT", - "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", - "RESOURCE_NOT_DELETED", - "SCHEMA_VALIDATION_IGNORED", - "SINGLE_INSTANCE_PROPERTY_TEMPLATE", - "UNDECLARED_PROPERTIES", - "UNREACHABLE" - ], - "enumDeprecated": [ - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, false, false ], @@ -68315,6 +69914,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -68497,6 +70097,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -68533,6 +70134,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -68557,6 +70159,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -68764,6 +70367,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -68800,6 +70404,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -68824,6 +70429,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -69033,7 +70639,7 @@ "id": "ResourceStatus", "properties": { "physicalHost": { - "description": "[Output Only] An opaque ID of the host on which the VM is running.", + "description": "[Output Only] The precise location of your instance within the zone's data center, including the block, sub-block, and host. The field is formatted as follows: blockId/subBlockId/hostId.", "type": "string" }, "scheduling": { @@ -69129,14 +70735,38 @@ "description": "The URL to an instance that should handle matching packets. You can specify this as a full or partial URL. For example: https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/", "type": "string" }, + "nextHopInterRegionCost": { + "description": "[Output only] Internal fixed region-to-region cost that Google Cloud calculates based on factors such as network performance, distance, and available bandwidth between regions.", + "format": "uint32", + "type": "integer" + }, "nextHopIp": { "description": "The network IP address of an instance that should handle matching packets. Both IPv6 address and IPv4 addresses are supported. Must specify an IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in RFC 4291 format (e.g. 2001:db8::2d9:51:0:0 or 2001:db8:0:0:2d9:51:0:0). IPv6 addresses will be displayed using RFC 5952 compressed format (e.g. 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address.", "type": "string" }, + "nextHopMed": { + "description": "[Output Only] Multi-Exit Discriminator, a BGP route metric that indicates the desirability of a particular route in a network.", + "format": "uint32", + "type": "integer" + }, "nextHopNetwork": { "description": "The URL of the local network if it should handle matching packets.", "type": "string" }, + "nextHopOrigin": { + "description": "[Output Only] Indicates the origin of the route. Can be IGP (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or INCOMPLETE.", + "enum": [ + "EGP", + "IGP", + "INCOMPLETE" + ], + "enumDescriptions": [ + "", + "", + "" + ], + "type": "string" + }, "nextHopPeering": { "description": "[Output Only] The network peering name that should handle matching packets, which should conform to RFC1035.", "type": "string" @@ -69231,6 +70861,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -69267,6 +70898,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -69291,6 +70923,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -69415,6 +71048,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -69451,6 +71085,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -69475,6 +71110,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -69679,6 +71315,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -69715,6 +71352,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -69739,6 +71377,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -70154,6 +71793,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -70190,6 +71830,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -70214,6 +71855,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -70857,6 +72499,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -70893,6 +72536,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -70917,6 +72561,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -71406,6 +73051,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -71442,6 +73088,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -71466,6 +73113,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -71549,6 +73197,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -71585,6 +73234,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -71609,6 +73259,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -71987,6 +73638,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -72023,6 +73675,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -72047,6 +73700,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -72439,7 +74093,7 @@ "type": "string" }, "enforceOnKey": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKey\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. ", + "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKey\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. ", "enum": [ "ALL", "HTTP_COOKIE", @@ -72449,6 +74103,7 @@ "REGION_CODE", "SNI", "TLS_JA3_FINGERPRINT", + "TLS_JA4_FINGERPRINT", "USER_IP", "XFF_IP" ], @@ -72462,6 +74117,7 @@ "", "", "", + "", "" ], "type": "string" @@ -72500,7 +74156,7 @@ "type": "string" }, "enforceOnKeyType": { - "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKeyConfigs\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. ", + "description": "Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if \"enforceOnKeyConfigs\" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under \"enforceOnKeyName\". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates. - TLS_JA3_FINGERPRINT: JA3 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. - USER_IP: The IP address of the originating client, which is resolved based on \"userIpRequestHeaders\" configured with the security policy. If there is no \"userIpRequestHeaders\" configuration or an IP address cannot be resolved from it, the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. ", "enum": [ "ALL", "HTTP_COOKIE", @@ -72510,6 +74166,7 @@ "REGION_CODE", "SNI", "TLS_JA3_FINGERPRINT", + "TLS_JA4_FINGERPRINT", "USER_IP", "XFF_IP" ], @@ -72523,6 +74180,7 @@ "", "", "", + "", "" ], "type": "string" @@ -72883,6 +74541,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -72919,6 +74578,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -72943,6 +74603,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -73098,6 +74759,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -73134,6 +74796,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -73158,6 +74821,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -73232,6 +74896,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -73268,6 +74933,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -73292,6 +74958,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -73775,6 +75442,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -73811,6 +75479,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -73835,6 +75504,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74179,6 +75849,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74215,6 +75886,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74239,6 +75911,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74331,6 +76004,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74367,6 +76041,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74391,6 +76066,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74539,6 +76215,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74575,6 +76252,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74599,6 +76277,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74701,6 +76380,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74737,6 +76417,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74761,6 +76442,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74852,6 +76534,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -74888,6 +76571,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -74912,6 +76596,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -74998,6 +76683,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -75034,6 +76720,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -75058,6 +76745,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -75207,6 +76895,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -75243,6 +76932,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -75267,6 +76957,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -75616,6 +77307,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -75652,6 +77344,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -75676,6 +77369,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -75854,6 +77548,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -75890,6 +77585,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -75914,6 +77610,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -76015,6 +77712,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76051,6 +77749,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76075,6 +77774,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -76310,6 +78010,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76346,6 +78047,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76370,6 +78072,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -76462,6 +78165,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76498,6 +78202,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76522,6 +78227,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -76596,6 +78302,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76632,6 +78339,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76656,6 +78364,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -76730,6 +78439,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -76766,6 +78476,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -76790,6 +78501,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -76922,10 +78634,11 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", + "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", "enum": [ "GLOBAL_MANAGED_PROXY", "INTERNAL_HTTPS_LOAD_BALANCER", + "PEER_MIGRATION", "PRIVATE", "PRIVATE_NAT", "PRIVATE_RFC_1918", @@ -76935,6 +78648,7 @@ "enumDescriptions": [ "Subnet reserved for Global Envoy-based Load Balancing.", "Subnet reserved for Internal HTTP(S) Load Balancing. This is a legacy purpose, please use REGIONAL_MANAGED_PROXY instead.", + "Subnetwork will be used for Migration from one peered VPC to another. (a transient state of subnetwork while migrating resources from one project to another).", "Regular user created or automatically created subnet.", "Subnetwork used as source range for Private NAT Gateways.", "Regular user created or automatically created subnet.", @@ -77065,6 +78779,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77101,6 +78816,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77125,6 +78841,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77217,6 +78934,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77253,6 +78971,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77277,6 +78996,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77441,6 +79161,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77477,6 +79198,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77501,6 +79223,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77744,6 +79467,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77780,6 +79504,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77804,6 +79529,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -77878,6 +79604,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -77914,6 +79641,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -77938,6 +79666,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78124,6 +79853,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78160,6 +79890,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78184,6 +79915,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78258,6 +79990,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78294,6 +80027,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78318,6 +80052,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78399,7 +80134,7 @@ "type": "object" }, "TargetHttpsProxy": { - "description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of GCP HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.", + "description": "Represents a Target HTTPS Proxy resource. Google Compute Engine has two Target HTTPS Proxy resources: * [Global](/compute/docs/reference/rest/v1/targetHttpsProxies) * [Regional](/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS proxy is a component of Google Cloud HTTPS load balancers. * targetHttpProxies are used by global external Application Load Balancers, classic Application Load Balancers, cross-region internal Application Load Balancers, and Traffic Director. * regionTargetHttpProxies are used by regional internal Application Load Balancers and regional external Application Load Balancers. Forwarding rules reference a target HTTPS proxy, and the target proxy then references a URL map. For more information, read Using Target Proxies and Forwarding rule concepts.", "id": "TargetHttpsProxy", "properties": { "authorizationPolicy": { @@ -78489,12 +80224,14 @@ "enum": [ "DISABLED", "PERMISSIVE", - "STRICT" + "STRICT", + "UNRESTRICTED" ], "enumDescriptions": [ "TLS 1.3 Early Data is not advertised, and any (invalid) attempts to send Early Data will be rejected by closing the connection.", "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE). This mode does not enforce any other limitations for requests with Early Data. The application owner should validate that Early Data is acceptable for a given request path.", - "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) without query parameters. Requests that send Early Data with non-idempotent HTTP methods or with query parameters will be rejected with a HTTP 425." + "This enables TLS 1.3 0-RTT, and only allows Early Data to be included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) without query parameters. Requests that send Early Data with non-idempotent HTTP methods or with query parameters will be rejected with a HTTP 425.", + "This enables TLS 1.3 Early Data for requests with any HTTP method including non-idempotent methods list POST. This mode does not enforce any other limitations. This may be valuable for gRPC use cases. However, we do not recommend this method unless you have evaluated your security stance and mitigated the risk of replay attacks using other mechanisms." ], "type": "string" }, @@ -78567,6 +80304,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78603,6 +80341,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78627,6 +80366,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78719,6 +80459,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78755,6 +80496,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78779,6 +80521,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -78938,6 +80681,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -78974,6 +80718,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -78998,6 +80743,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79090,6 +80836,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79126,6 +80873,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79150,6 +80898,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79224,6 +80973,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79260,6 +81010,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79284,6 +81035,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79474,6 +81226,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79510,6 +81263,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79534,6 +81288,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79643,6 +81398,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79679,6 +81435,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79703,6 +81460,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -79829,6 +81587,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -79865,6 +81624,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -79889,6 +81649,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -80106,6 +81867,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -80142,6 +81904,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -80166,6 +81929,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -80240,6 +82004,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -80276,6 +82041,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -80300,6 +82066,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -80485,6 +82252,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -80521,6 +82289,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -80545,6 +82314,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -80637,6 +82407,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -80673,6 +82444,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -80697,6 +82469,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -80890,6 +82663,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -80926,6 +82700,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -80950,6 +82725,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -81042,6 +82818,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -81078,6 +82855,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -81102,6 +82880,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -81176,6 +82955,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -81212,6 +82992,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -81236,6 +83017,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -81424,15 +83206,15 @@ }, "defaultRouteAction": { "$ref": "HttpRouteAction", - "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. If defaultRouteAction specifies any weightedBackendServices, defaultService must not be set. Conversely if defaultService is set, defaultRouteAction cannot contain any weightedBackendServices. Only one of defaultRouteAction or defaultUrlRedirect must be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." + "description": "defaultRouteAction takes effect when none of the hostRules match. The load balancer performs advanced routing actions, such as URL rewrites and header transformations, before forwarding the request to the selected backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. URL maps for classic Application Load Balancers only support the urlRewrite action within defaultRouteAction. defaultRouteAction has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true." }, "defaultService": { - "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. However, if defaultService is specified, defaultRouteAction cannot contain any defaultRouteAction.weightedBackendServices. Conversely, if defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, defaultService must not be specified. If defaultService is specified, then set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService Don't set both. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", + "description": "The full or partial URL of the defaultService resource to which traffic is directed if none of the hostRules match. If defaultRouteAction is also specified, advanced routing actions, such as URL rewrites, take effect before sending the request to the backend. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. defaultService has no effect when the URL map is bound to a target gRPC proxy that has the validateForProxyless field set to true.", "type": "string" }, "defaultUrlRedirect": { "$ref": "HttpRedirectAction", - "description": "When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService or defaultRouteAction must not be set. Not supported when the URL map is bound to a target gRPC proxy." + "description": "When none of the specified hostRules match, the request is redirected to a URL specified by defaultUrlRedirect. Only one of defaultUrlRedirect, defaultService or defaultRouteAction.weightedBackendService can be set. Not supported when the URL map is bound to a target gRPC proxy." }, "description": { "description": "An optional description of this resource. Provide this property when you create the resource.", @@ -81549,6 +83331,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -81585,6 +83368,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -81609,6 +83393,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -81798,6 +83583,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -81834,6 +83620,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -81858,6 +83645,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -81932,6 +83720,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -81968,6 +83757,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -81992,6 +83782,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -82117,10 +83908,11 @@ "type": "string" }, "purpose": { - "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", + "description": "The purpose of the resource. This field can be either PRIVATE, GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created subnets or subnets that are automatically created in auto mode networks. Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks that are reserved for Envoy-based load balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service Connect. A subnet with purpose set to PEER_MIGRATION is used for subnet migration from one peered VPC to another. If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs field isn't supported if the subnet purpose field is set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY.", "enum": [ "GLOBAL_MANAGED_PROXY", "INTERNAL_HTTPS_LOAD_BALANCER", + "PEER_MIGRATION", "PRIVATE", "PRIVATE_NAT", "PRIVATE_RFC_1918", @@ -82130,6 +83922,7 @@ "enumDescriptions": [ "Subnet reserved for Global Envoy-based Load Balancing.", "Subnet reserved for Internal HTTP(S) Load Balancing. This is a legacy purpose, please use REGIONAL_MANAGED_PROXY instead.", + "Subnetwork will be used for Migration from one peered VPC to another. (a transient state of subnetwork while migrating resources from one project to another).", "Regular user created or automatically created subnet.", "Subnetwork used as source range for Private NAT Gateways.", "Regular user created or automatically created subnet.", @@ -82247,6 +84040,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82283,6 +84077,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82307,6 +84102,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -82513,6 +84309,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82549,6 +84346,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82573,6 +84371,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -82769,6 +84568,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82805,6 +84605,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82829,6 +84630,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -82921,6 +84723,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -82957,6 +84760,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -82981,6 +84785,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83177,6 +84982,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -83213,6 +85019,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -83237,6 +85044,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83490,6 +85298,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -83526,6 +85335,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -83550,6 +85360,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83642,6 +85453,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -83678,6 +85490,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -83702,6 +85515,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83776,6 +85590,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -83812,6 +85627,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -83836,6 +85652,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -83986,6 +85803,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -84022,6 +85840,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -84046,6 +85865,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", @@ -84225,6 +86045,7 @@ "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "PARTIAL_SUCCESS", + "QUOTA_INFO_UNAVAILABLE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING", "RESOURCE_NOT_DELETED", @@ -84261,6 +86082,7 @@ false, false, false, + false, false ], "enumDescriptions": [ @@ -84285,6 +86107,7 @@ "Error which is not critical. We decided to continue the process despite the mentioned error.", "No results are present on a particular list page.", "Success is reported, but some results may be missing due to errors", + "Quota information is not available to client requests (e.g: regions.list).", "The user attempted to use a resource that requires a TOS they have not accepted.", "Warning that a resource is in use.", "One or more of the resources set to auto-delete could not be deleted because they were in use.", diff --git a/compute/v1/compute-gen.go b/compute/v1/compute-gen.go index b437b422fed..678061a207f 100644 --- a/compute/v1/compute-gen.go +++ b/compute/v1/compute-gen.go @@ -203,6 +203,7 @@ func New(client *http.Client) (*Service, error) { s.NetworkEdgeSecurityServices = NewNetworkEdgeSecurityServicesService(s) s.NetworkEndpointGroups = NewNetworkEndpointGroupsService(s) s.NetworkFirewallPolicies = NewNetworkFirewallPoliciesService(s) + s.NetworkProfiles = NewNetworkProfilesService(s) s.Networks = NewNetworksService(s) s.NodeGroups = NewNodeGroupsService(s) s.NodeTemplates = NewNodeTemplatesService(s) @@ -352,6 +353,8 @@ type Service struct { NetworkFirewallPolicies *NetworkFirewallPoliciesService + NetworkProfiles *NetworkProfilesService + Networks *NetworksService NodeGroups *NodeGroupsService @@ -847,6 +850,15 @@ type NetworkFirewallPoliciesService struct { s *Service } +func NewNetworkProfilesService(s *Service) *NetworkProfilesService { + rs := &NetworkProfilesService{s: s} + return rs +} + +type NetworkProfilesService struct { + s *Service +} + func NewNetworksService(s *Service) *NetworksService { rs := &NetworksService{s: s} return rs @@ -1587,6 +1599,8 @@ type AcceleratorTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -1741,6 +1755,8 @@ type AcceleratorTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -1881,6 +1897,8 @@ type AcceleratorTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -2286,6 +2304,8 @@ type AddressAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -2440,6 +2460,8 @@ type AddressListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -2579,6 +2601,8 @@ type AddressesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -3500,6 +3524,8 @@ type AutoscalerAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -3654,6 +3680,8 @@ type AutoscalerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -3894,6 +3922,8 @@ type AutoscalersScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -4520,7 +4550,8 @@ type BackendBucketCdnPolicy struct { // identifiable) content. CACHE_ALL_STATIC Automatically cache static content, // including common image formats, media (video and audio), and web assets // (JavaScript and CSS). Requests and responses that are marked as uncacheable, - // as well as dynamic content (including HTML), will not be cached. + // as well as dynamic content (including HTML), will not be cached. If no value + // is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. // // Possible values: // "CACHE_ALL_STATIC" - Automatically cache static content, including common @@ -4800,6 +4831,8 @@ type BackendBucketListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -5382,6 +5415,8 @@ type BackendServiceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -5470,7 +5505,8 @@ type BackendServiceCdnPolicy struct { // identifiable) content. CACHE_ALL_STATIC Automatically cache static content, // including common image formats, media (video and audio), and web assets // (JavaScript and CSS). Requests and responses that are marked as uncacheable, - // as well as dynamic content (including HTML), will not be cached. + // as well as dynamic content (including HTML), will not be cached. If no value + // is provided for cdnPolicy.cacheMode, it defaults to CACHE_ALL_STATIC. // // Possible values: // "CACHE_ALL_STATIC" - Automatically cache static content, including common @@ -5956,6 +5992,8 @@ type BackendServiceListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -6112,6 +6150,8 @@ type BackendServiceListUsableWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -6468,6 +6508,8 @@ type BackendServicesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -7224,6 +7266,9 @@ type Commitment struct { // "GRAPHICS_OPTIMIZED" // "MEMORY_OPTIMIZED" // "MEMORY_OPTIMIZED_M3" + // "MEMORY_OPTIMIZED_X4_16TB" + // "MEMORY_OPTIMIZED_X4_24TB" + // "MEMORY_OPTIMIZED_X4_32TB" // "STORAGE_OPTIMIZED_Z3" // "TYPE_UNSPECIFIED" Type string `json:"type,omitempty"` @@ -7337,6 +7382,8 @@ type CommitmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -7491,6 +7538,8 @@ type CommitmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -7657,6 +7706,8 @@ type CommitmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -8493,6 +8544,8 @@ type DiskAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -8770,6 +8823,8 @@ type DiskListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -9089,6 +9144,8 @@ type DiskTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -9243,6 +9300,8 @@ type DiskTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -9382,6 +9441,8 @@ type DiskTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -9585,6 +9646,8 @@ type DisksScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -10005,6 +10068,8 @@ type ExchangedPeeringRoutesListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -10341,6 +10406,8 @@ type ExternalVpnGatewayListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -10719,6 +10786,8 @@ type FirewallListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -11053,6 +11122,8 @@ type FirewallPolicyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -11774,6 +11845,8 @@ type ForwardingRuleAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -11927,6 +12000,8 @@ type ForwardingRuleListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -12119,6 +12194,8 @@ type ForwardingRulesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -12952,6 +13029,8 @@ type HealthCheckListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -13277,6 +13356,8 @@ type HealthCheckServicesListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -13432,6 +13513,8 @@ type HealthChecksAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -13571,6 +13654,8 @@ type HealthChecksScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -14249,6 +14334,8 @@ type HttpHealthCheckListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -14615,26 +14702,21 @@ type HttpRouteRule struct { Priority int64 `json:"priority,omitempty"` // RouteAction: In response to a matching matchRule, the load balancer performs // advanced routing actions, such as URL rewrites and header transformations, - // before forwarding the request to the selected backend. If routeAction - // specifies any weightedBackendServices, service must not be set. Conversely - // if service is set, routeAction cannot contain any weightedBackendServices. - // Only one of urlRedirect, service or routeAction.weightedBackendService must - // be set. URL maps for classic Application Load Balancers only support the - // urlRewrite action within a route rule's routeAction. + // before forwarding the request to the selected backend. Only one of + // urlRedirect, service or routeAction.weightedBackendService can be set. URL + // maps for classic Application Load Balancers only support the urlRewrite + // action within a route rule's routeAction. RouteAction *HttpRouteAction `json:"routeAction,omitempty"` // Service: The full or partial URL of the backend service resource to which // traffic is directed if this rule is matched. If routeAction is also // specified, advanced routing actions, such as URL rewrites, take effect - // before sending the request to the backend. However, if service is specified, - // routeAction cannot contain any weightedBackendServices. Conversely, if - // routeAction specifies any weightedBackendServices, service must not be - // specified. Only one of urlRedirect, service or - // routeAction.weightedBackendService must be set. + // before sending the request to the backend. Only one of urlRedirect, service + // or routeAction.weightedBackendService can be set. Service string `json:"service,omitempty"` // UrlRedirect: When this rule is matched, the request is redirected to a URL - // specified by urlRedirect. If urlRedirect is specified, service or - // routeAction must not be set. Not supported when the URL map is bound to a - // target gRPC proxy. + // specified by urlRedirect. Only one of urlRedirect, service or + // routeAction.weightedBackendService can be set. Not supported when the URL + // map is bound to a target gRPC proxy. UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomErrorResponsePolicy") // to unconditionally include in API requests. By default, fields with empty or @@ -14888,6 +14970,8 @@ type HttpsHealthCheckListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -15282,6 +15366,8 @@ type ImageListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -15692,6 +15778,8 @@ type InstanceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -15978,6 +16066,8 @@ type InstanceGroupAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -16132,6 +16222,8 @@ type InstanceGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -16287,6 +16379,8 @@ type InstanceGroupManager struct { // SelfLink: [Output Only] The URL for this managed instance group. The server // defines this URL. SelfLink string `json:"selfLink,omitempty"` + // StandbyPolicy: Standby policy for stopped and suspended instances. + StandbyPolicy *InstanceGroupManagerStandbyPolicy `json:"standbyPolicy,omitempty"` // StatefulPolicy: Stateful configuration for this Instanced Group Manager StatefulPolicy *StatefulPolicy `json:"statefulPolicy,omitempty"` // Status: [Output Only] The status of this managed instance group. @@ -16300,6 +16394,17 @@ type InstanceGroupManager struct { // deleteInstances or abandonInstances methods. Resizing the group also changes // this number. TargetSize int64 `json:"targetSize,omitempty"` + // TargetStoppedSize: The target number of stopped instances for this managed + // instance group. This number changes when you: - Stop instance using the + // stopInstances method or start instances using the startInstances method. - + // Manually change the targetStoppedSize using the update method. + TargetStoppedSize int64 `json:"targetStoppedSize,omitempty"` + // TargetSuspendedSize: The target number of suspended instances for this + // managed instance group. This number changes when you: - Suspend instance + // using the suspendInstances method or resume instances using the + // resumeInstances method. - Manually change the targetSuspendedSize using the + // update method. + TargetSuspendedSize int64 `json:"targetSuspendedSize,omitempty"` // UpdatePolicy: The update policy for this managed instance group. UpdatePolicy *InstanceGroupManagerUpdatePolicy `json:"updatePolicy,omitempty"` // Versions: Specifies the instance templates used by this managed instance @@ -16495,6 +16600,8 @@ type InstanceGroupManagerAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -16796,6 +16903,8 @@ type InstanceGroupManagerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -17239,6 +17348,8 @@ type InstanceGroupManagerResizeRequestsListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -17306,6 +17417,40 @@ func (s InstanceGroupManagerResizeRequestsListResponseWarningData) MarshalJSON() return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type InstanceGroupManagerStandbyPolicy struct { + // InitialDelaySec: Specifies the number of seconds that the MIG should wait to + // suspend or stop a VM after that VM was created. The initial delay gives the + // initialization script the time to prepare your VM for a quick scale out. The + // value of initial delay must be between 0 and 3600 seconds. The default value + // is 0. + InitialDelaySec int64 `json:"initialDelaySec,omitempty"` + // Mode: Defines how a MIG resumes or starts VMs from a standby pool when the + // group scales out. The default mode is `MANUAL`. + // + // Possible values: + // "MANUAL" - MIG does not automatically resume or start VMs in the standby + // pool when the group scales out. + // "SCALE_OUT_POOL" - MIG automatically resumes or starts VMs in the standby + // pool when the group scales out, and replenishes the standby pool afterwards. + Mode string `json:"mode,omitempty"` + // ForceSendFields is a list of field names (e.g. "InitialDelaySec") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "InitialDelaySec") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstanceGroupManagerStandbyPolicy) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagerStandbyPolicy + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagerStatus struct { // AllInstancesConfig: [Output only] Status of all-instances configuration on // the group. @@ -17890,6 +18035,8 @@ type InstanceGroupManagersListPerInstanceConfigsRespWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -18003,6 +18150,28 @@ func (s InstanceGroupManagersRecreateInstancesRequest) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type InstanceGroupManagersResumeInstancesRequest struct { + // Instances: The URLs of one or more instances to resume. This can be a full + // URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstanceGroupManagersResumeInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagersResumeInstancesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type InstanceGroupManagersScopedList struct { // InstanceGroupManagers: [Output Only] The list of managed instance groups // that are contained in the specified project and zone. @@ -18076,6 +18245,8 @@ type InstanceGroupManagersScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -18199,6 +18370,78 @@ func (s InstanceGroupManagersSetTargetPoolsRequest) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type InstanceGroupManagersStartInstancesRequest struct { + // Instances: The URLs of one or more instances to start. This can be a full + // URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstanceGroupManagersStartInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagersStartInstancesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type InstanceGroupManagersStopInstancesRequest struct { + // ForceStop: If this flag is set to true, the Instance Group Manager will + // proceed to stop the instances, skipping initialization on them. + ForceStop bool `json:"forceStop,omitempty"` + // Instances: The URLs of one or more instances to stop. This can be a full URL + // or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` + // ForceSendFields is a list of field names (e.g. "ForceStop") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ForceStop") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstanceGroupManagersStopInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagersStopInstancesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type InstanceGroupManagersSuspendInstancesRequest struct { + // ForceSuspend: If this flag is set to true, the Instance Group Manager will + // proceed to suspend the instances, skipping initialization on them. + ForceSuspend bool `json:"forceSuspend,omitempty"` + // Instances: The URLs of one or more instances to suspend. This can be a full + // URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` + // ForceSendFields is a list of field names (e.g. "ForceSuspend") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ForceSuspend") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s InstanceGroupManagersSuspendInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod InstanceGroupManagersSuspendInstancesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // InstanceGroupManagersUpdatePerInstanceConfigsReq: // InstanceGroupManagers.updatePerInstanceConfigs type InstanceGroupManagersUpdatePerInstanceConfigsReq struct { @@ -18332,6 +18575,8 @@ type InstanceGroupsListInstancesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -18522,6 +18767,8 @@ type InstanceGroupsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -18705,6 +18952,8 @@ type InstanceListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -18859,6 +19108,8 @@ type InstanceListReferrersWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -19490,6 +19741,8 @@ type InstanceTemplateAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -19644,6 +19897,8 @@ type InstanceTemplateListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -19784,6 +20039,8 @@ type InstanceTemplatesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -20100,6 +20357,8 @@ type InstancesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -20558,6 +20817,8 @@ type InstantSnapshotAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -20711,6 +20972,8 @@ type InstantSnapshotListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -20872,6 +21135,8 @@ type InstantSnapshotsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -21544,6 +21809,8 @@ type InterconnectAttachmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -21763,6 +22030,8 @@ type InterconnectAttachmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -21961,6 +22230,8 @@ type InterconnectAttachmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -22383,6 +22654,8 @@ type InterconnectListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -22464,7 +22737,8 @@ type InterconnectLocation struct { // "zone1" or "zone2". AvailabilityZone string `json:"availabilityZone,omitempty"` // AvailableFeatures: [Output only] List of features available at this - // InterconnectLocation, which can take one of the following values: - MACSEC + // InterconnectLocation, which can take one of the following values: - + // IF_MACSEC // // Possible values: // "IF_MACSEC" - Media Access Control security (MACsec) @@ -22648,6 +22922,8 @@ type InterconnectLocationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -23240,6 +23516,8 @@ type InterconnectRemoteLocationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -23404,7 +23682,8 @@ type License struct { LicenseCode uint64 `json:"licenseCode,omitempty,string"` // Name: Name of the resource. The name must be 1-63 characters long and comply // with RFC1035. - Name string `json:"name,omitempty"` + Name string `json:"name,omitempty"` + // ResourceRequirements: [Input Only] Deprecated. ResourceRequirements *LicenseResourceRequirements `json:"resourceRequirements,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` @@ -23544,11 +23823,11 @@ func (s LicenseResourceCommitment) MarshalJSON() ([]byte, error) { } type LicenseResourceRequirements struct { - // MinGuestCpuCount: Minimum number of guest cpus required to use the Instance. - // Enforced at Instance creation and Instance start. + // MinGuestCpuCount: [Input Only] Deprecated. This field no longer reflects the + // minimum number of guest cpus required to use the Instance. MinGuestCpuCount int64 `json:"minGuestCpuCount,omitempty"` - // MinMemoryMb: Minimum memory required to use the Instance. Enforced at - // Instance creation and Instance start. + // MinMemoryMb: [Input Only] Deprecated. This field no longer reflects the + // minimum memory required to use the Instance. MinMemoryMb int64 `json:"minMemoryMb,omitempty"` // ForceSendFields is a list of field names (e.g. "MinGuestCpuCount") to // unconditionally include in API requests. By default, fields with empty or @@ -23651,6 +23930,8 @@ type LicensesListResponseWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -24057,6 +24338,8 @@ type MachineImageListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -24334,6 +24617,8 @@ type MachineTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -24488,6 +24773,8 @@ type MachineTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -24627,6 +24914,8 @@ type MachineTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -25310,6 +25599,12 @@ type Network struct { // "AFTER_CLASSIC_FIREWALL" // "BEFORE_CLASSIC_FIREWALL" NetworkFirewallPolicyEnforcementOrder string `json:"networkFirewallPolicyEnforcementOrder,omitempty"` + // NetworkProfile: A full or partial URL of the network profile to apply to + // this network. This field can be set only at resource creation time. For + // example, the following are valid URLs: - + // https://www.googleapis.com/compute/{api_version}/projects/{project_id}/global/networkProfiles/{network_profile_name} + // - projects/{project_id}/global/networkProfiles/{network_profile_name} + NetworkProfile string `json:"networkProfile,omitempty"` // Peerings: [Output Only] A list of network peerings for the resource. Peerings []*NetworkPeering `json:"peerings,omitempty"` // RoutingConfig: The network-level routing configuration for this network. @@ -25511,6 +25806,8 @@ type NetworkAttachmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -25715,6 +26012,8 @@ type NetworkAttachmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -25854,6 +26153,8 @@ type NetworkAttachmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26075,6 +26376,8 @@ type NetworkEdgeSecurityServiceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26215,6 +26518,8 @@ type NetworkEdgeSecurityServicesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26533,6 +26838,8 @@ type NetworkEndpointGroupAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -26803,6 +27110,8 @@ type NetworkEndpointGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -27072,6 +27381,8 @@ type NetworkEndpointGroupsListNetworkEndpointsWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -27213,6 +27524,8 @@ type NetworkEndpointGroupsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -27373,6 +27686,8 @@ type NetworkInterface struct { // Possible values: // "GVNIC" - GVNIC // "IDPF" - IDPF + // "IRDMA" - IRDMA + // "MRDMA" - MRDMA // "UNSPECIFIED_NIC_TYPE" - No type specified. // "VIRTIO_NET" - VIRTIO NicType string `json:"nicType,omitempty"` @@ -27504,6 +27819,8 @@ type NetworkListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -27680,11 +27997,443 @@ func (s NetworkPerformanceConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +// NetworkProfile: NetworkProfile represents a Google managed network profile +// resource. +type NetworkProfile struct { + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text format. + CreationTimestamp string `json:"creationTimestamp,omitempty"` + // Description: [Output Only] An optional description of this resource. + Description string `json:"description,omitempty"` + // Features: [Output Only] Features supported by the network. + Features *NetworkProfileNetworkFeatures `json:"features,omitempty"` + // Id: [Output Only] The unique identifier for the resource. This identifier is + // defined by the server. + Id uint64 `json:"id,omitempty,string"` + // Kind: [Output Only] Type of the resource. Always compute#networkProfile for + // network profiles. + Kind string `json:"kind,omitempty"` + // Location: [Output Only] Location to which the network is restricted. + Location *NetworkProfileLocation `json:"location,omitempty"` + // Name: [Output Only] Name of the resource. + Name string `json:"name,omitempty"` + // SelfLink: [Output Only] Server-defined URL for the resource. + SelfLink string `json:"selfLink,omitempty"` + // SelfLinkWithId: [Output Only] Server-defined URL for this resource with the + // resource id. + SelfLinkWithId string `json:"selfLinkWithId,omitempty"` + // Zone: [Output Only] Zone to which the network is restricted. + Zone string `json:"zone,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "CreationTimestamp") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "CreationTimestamp") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s NetworkProfile) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfile + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type NetworkProfileLocation struct { + Name string `json:"name,omitempty"` + // Possible values: + // "REGION" + // "ZONE" + Scope string `json:"scope,omitempty"` + // ForceSendFields is a list of field names (e.g. "Name") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Name") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s NetworkProfileLocation) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfileLocation + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type NetworkProfileNetworkFeatures struct { + // AddressPurposes: Specifies what address purposes are supported. If empty, + // all address purposes are supported. + // + // Possible values: + // "DNS_RESOLVER" - DNS resolver address in the subnetwork. + // "GCE_ENDPOINT" - VM internal/alias IP, Internal LB service IP, etc. + // "IPSEC_INTERCONNECT" - A regional internal IP address range reserved for + // the VLAN attachment that is used in HA VPN over Cloud Interconnect. This + // regional internal IP address range must not overlap with any IP address + // range of subnet/route in the VPC network and its peering networks. After the + // VLAN attachment is created with the reserved IP address range, when creating + // a new VPN gateway, its interface IP address is allocated from the associated + // VLAN attachment’s IP address range. + // "NAT_AUTO" - External IP automatically reserved for Cloud NAT. + // "PRIVATE_SERVICE_CONNECT" - A private network IP address that can be used + // to configure Private Service Connect. This purpose can be specified only for + // GLOBAL addresses of Type INTERNAL + // "SERVERLESS" - A regional internal IP address range reserved for + // Serverless. + // "SHARED_LOADBALANCER_VIP" - A private network IP address that can be + // shared by multiple Internal Load Balancer forwarding rules. + // "VPC_PEERING" - IP range for peer networks. + AddressPurposes []string `json:"addressPurposes,omitempty"` + // AllowAliasIpRanges: Specifies whether alias IP ranges (and secondary address + // ranges) are allowed. + // + // Possible values: + // "ALIAS_IP_RANGES_ALLOWED" + // "ALIAS_IP_RANGES_BLOCKED" + AllowAliasIpRanges string `json:"allowAliasIpRanges,omitempty"` + // AllowAutoModeSubnet: Specifies whether auto mode subnet creation is allowed. + // + // Possible values: + // "AUTO_MODE_SUBNET_ALLOWED" + // "AUTO_MODE_SUBNET_BLOCKED" + AllowAutoModeSubnet string `json:"allowAutoModeSubnet,omitempty"` + // AllowClassDFirewalls: Specifies whether firewalls for Class D address ranges + // are supported. + // + // Possible values: + // "CLASS_D_FIREWALLS_ALLOWED" + // "CLASS_D_FIREWALLS_BLOCKED" + AllowClassDFirewalls string `json:"allowClassDFirewalls,omitempty"` + // AllowCloudNat: Specifies whether cloud NAT creation is allowed. + // + // Possible values: + // "CLOUD_NAT_ALLOWED" + // "CLOUD_NAT_BLOCKED" + AllowCloudNat string `json:"allowCloudNat,omitempty"` + // AllowCloudRouter: Specifies whether cloud router creation is allowed. + // + // Possible values: + // "CLOUD_ROUTER_ALLOWED" + // "CLOUD_ROUTER_BLOCKED" + AllowCloudRouter string `json:"allowCloudRouter,omitempty"` + // AllowExternalIpAccess: Specifies whether VMs are allowed to have external IP + // access on network interfaces connected to this VPC. + // + // Possible values: + // "EXTERNAL_IP_ACCESS_ALLOWED" + // "EXTERNAL_IP_ACCESS_BLOCKED" + AllowExternalIpAccess string `json:"allowExternalIpAccess,omitempty"` + // AllowInterconnect: Specifies whether Cloud Interconnect creation is allowed. + // + // Possible values: + // "INTERCONNECT_ALLOWED" + // "INTERCONNECT_BLOCKED" + AllowInterconnect string `json:"allowInterconnect,omitempty"` + // AllowLoadBalancing: Specifies whether cloud load balancing is allowed. + // + // Possible values: + // "LOAD_BALANCING_ALLOWED" + // "LOAD_BALANCING_BLOCKED" + AllowLoadBalancing string `json:"allowLoadBalancing,omitempty"` + // AllowMultiNicInSameNetwork: Specifies whether multi-nic in the same network + // is allowed. + // + // Possible values: + // "MULTI_NIC_IN_SAME_NETWORK_ALLOWED" + // "MULTI_NIC_IN_SAME_NETWORK_BLOCKED" + AllowMultiNicInSameNetwork string `json:"allowMultiNicInSameNetwork,omitempty"` + // AllowPacketMirroring: Specifies whether Packet Mirroring 1.0 is supported. + // + // Possible values: + // "PACKET_MIRRORING_ALLOWED" + // "PACKET_MIRRORING_BLOCKED" + AllowPacketMirroring string `json:"allowPacketMirroring,omitempty"` + // AllowPrivateGoogleAccess: Specifies whether private Google access is + // allowed. + // + // Possible values: + // "PRIVATE_GOOGLE_ACCESS_ALLOWED" + // "PRIVATE_GOOGLE_ACCESS_BLOCKED" + AllowPrivateGoogleAccess string `json:"allowPrivateGoogleAccess,omitempty"` + // AllowPsc: Specifies whether PSC creation is allowed. + // + // Possible values: + // "PSC_ALLOWED" + // "PSC_BLOCKED" + AllowPsc string `json:"allowPsc,omitempty"` + // AllowSameNetworkUnicast: Specifies whether unicast within the same network + // is allowed. + // + // Possible values: + // "SAME_NETWORK_UNICAST_ALLOWED" + // "SAME_NETWORK_UNICAST_BLOCKED" + AllowSameNetworkUnicast string `json:"allowSameNetworkUnicast,omitempty"` + // AllowStaticRoutes: Specifies whether static route creation is allowed. + // + // Possible values: + // "STATIC_ROUTES_ALLOWED" + // "STATIC_ROUTES_BLOCKED" + AllowStaticRoutes string `json:"allowStaticRoutes,omitempty"` + // AllowSubInterfaces: Specifies whether sub interfaces are allowed. + // + // Possible values: + // "SUBINTERFACES_ALLOWED" + // "SUBINTERFACES_BLOCKED" + AllowSubInterfaces string `json:"allowSubInterfaces,omitempty"` + // AllowVpcPeering: Specifies whether VPC peering is allowed. + // + // Possible values: + // "VPC_PEERING_ALLOWED" + // "VPC_PEERING_BLOCKED" + AllowVpcPeering string `json:"allowVpcPeering,omitempty"` + // AllowVpn: Specifies whether VPN creation is allowed. + // + // Possible values: + // "VPN_ALLOWED" + // "VPN_BLOCKED" + AllowVpn string `json:"allowVpn,omitempty"` + // InterfaceTypes: If set, limits the interface types that the network + // supports. If empty, all interface types are supported. + // + // Possible values: + // "GVNIC" - GVNIC + // "IDPF" - IDPF + // "IRDMA" - IRDMA + // "MRDMA" - MRDMA + // "UNSPECIFIED_NIC_TYPE" - No type specified. + // "VIRTIO_NET" - VIRTIO + InterfaceTypes []string `json:"interfaceTypes,omitempty"` + // SubnetPurposes: Specifies which subnetwork purposes are supported. + // + // Possible values: + // "SUBNET_PURPOSE_CUSTOM_HARDWARE" + // "SUBNET_PURPOSE_PRIVATE" + SubnetPurposes []string `json:"subnetPurposes,omitempty"` + // SubnetStackTypes: Specifies which subnetwork stack types are supported. + // + // Possible values: + // "SUBNET_STACK_TYPE_IPV4_IPV6" + // "SUBNET_STACK_TYPE_IPV4_ONLY" + // "SUBNET_STACK_TYPE_IPV6_ONLY" + SubnetStackTypes []string `json:"subnetStackTypes,omitempty"` + // Unicast: Specifies which type of unicast is supported. + // + // Possible values: + // "UNICAST_SDN" + // "UNICAST_ULL" + Unicast string `json:"unicast,omitempty"` + // ForceSendFields is a list of field names (e.g. "AddressPurposes") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "AddressPurposes") to include in + // API requests with the JSON null value. By default, fields with empty values + // are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s NetworkProfileNetworkFeatures) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfileNetworkFeatures + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// NetworkProfilesListResponse: Contains a list of network profiles. +type NetworkProfilesListResponse struct { + Etag string `json:"etag,omitempty"` + // Id: [Output Only] Unique identifier for the resource; defined by the server. + Id string `json:"id,omitempty"` + // Items: A list of NetworkProfile resources. + Items []*NetworkProfile `json:"items,omitempty"` + // Kind: [Output Only] Type of resource. Always compute#networkProfileList for + // network profiles. + Kind string `json:"kind,omitempty"` + // NextPageToken: [Output Only] This token allows you to get the next page of + // results for list requests. If the number of results is larger than + // maxResults, use the nextPageToken as a value for the query parameter + // pageToken in the next list request. Subsequent list requests will have their + // own nextPageToken to continue paging through the results. + NextPageToken string `json:"nextPageToken,omitempty"` + // SelfLink: [Output Only] Server-defined URL for this resource. + SelfLink string `json:"selfLink,omitempty"` + // Unreachables: [Output Only] Unreachable resources. end_interface: + // MixerListResponseWithEtagBuilder + Unreachables []string `json:"unreachables,omitempty"` + // Warning: [Output Only] Informational warning message. + Warning *NetworkProfilesListResponseWarning `json:"warning,omitempty"` + + // ServerResponse contains the HTTP response code and headers from the server. + googleapi.ServerResponse `json:"-"` + // ForceSendFields is a list of field names (e.g. "Etag") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Etag") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s NetworkProfilesListResponse) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfilesListResponse + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +// NetworkProfilesListResponseWarning: [Output Only] Informational warning +// message. +type NetworkProfilesListResponseWarning struct { + // Code: [Output Only] A warning code, if applicable. For example, Compute + // Engine returns NO_RESULTS_ON_PAGE if there are no results in the response. + // + // Possible values: + // "CLEANUP_FAILED" - Warning about failed cleanup of transient changes made + // by a failed operation. + // "DEPRECATED_RESOURCE_USED" - A link to a deprecated resource was created. + // "DEPRECATED_TYPE_USED" - When deploying and at least one of the resources + // has a type marked as deprecated + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" - The user created a boot disk that is + // larger than image size. + // "EXPERIMENTAL_TYPE_USED" - When deploying and at least one of the + // resources has a type marked as experimental + // "EXTERNAL_API_WARNING" - Warning that is present in an external api call + // "FIELD_VALUE_OVERRIDEN" - Warning that value of a field has been + // overridden. Deprecated unused field. + // "INJECTED_KERNELS_DEPRECATED" - The operation involved use of an injected + // kernel, which is deprecated. + // "INVALID_HEALTH_CHECK_FOR_DYNAMIC_WIEGHTED_LB" - A WEIGHTED_MAGLEV backend + // service is associated with a health check that is not of type + // HTTP/HTTPS/HTTP2. + // "LARGE_DEPLOYMENT_WARNING" - When deploying a deployment with a + // exceedingly large number of resources + // "LIST_OVERHEAD_QUOTA_EXCEED" - Resource can't be retrieved due to list + // overhead quota exceed which captures the amount of resources filtered out by + // user-defined list filter. + // "MISSING_TYPE_DEPENDENCY" - A resource depends on a missing type + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" - The route's nextHopIp address is not + // assigned to an instance on the network. + // "NEXT_HOP_CANNOT_IP_FORWARD" - The route's next hop instance cannot ip + // forward. + // "NEXT_HOP_INSTANCE_HAS_NO_IPV6_INTERFACE" - The route's nextHopInstance + // URL refers to an instance that does not have an ipv6 interface on the same + // network as the route. + // "NEXT_HOP_INSTANCE_NOT_FOUND" - The route's nextHopInstance URL refers to + // an instance that does not exist. + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" - The route's nextHopInstance URL + // refers to an instance that is not on the same network as the route. + // "NEXT_HOP_NOT_RUNNING" - The route's next hop instance does not have a + // status of RUNNING. + // "NOT_CRITICAL_ERROR" - Error which is not critical. We decided to continue + // the process despite the mentioned error. + // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. + // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing + // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). + // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that + // requires a TOS they have not accepted. + // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is + // in use. + // "RESOURCE_NOT_DELETED" - One or more of the resources set to auto-delete + // could not be deleted because they were in use. + // "SCHEMA_VALIDATION_IGNORED" - When a resource schema validation is + // ignored. + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" - Instance template used in instance + // group manager is valid as such, but its application does not make a lot of + // sense, because it allows only single instance in instance group. + // "UNDECLARED_PROPERTIES" - When undeclared properties in the schema are + // present + // "UNREACHABLE" - A given scope cannot be reached. + Code string `json:"code,omitempty"` + // Data: [Output Only] Metadata about this warning in key: value format. For + // example: "data": [ { "key": "scope", "value": "zones/us-east1-d" } + Data []*NetworkProfilesListResponseWarningData `json:"data,omitempty"` + // Message: [Output Only] A human-readable description of the warning code. + Message string `json:"message,omitempty"` + // ForceSendFields is a list of field names (e.g. "Code") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Code") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s NetworkProfilesListResponseWarning) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfilesListResponseWarning + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type NetworkProfilesListResponseWarningData struct { + // Key: [Output Only] A key that provides more detail on the warning being + // returned. For example, for warnings where there are no results in a list + // request for a particular zone, this key might be scope and the key value + // might be the zone name. Other examples might be a key indicating a + // deprecated resource and a suggested replacement, or a warning about invalid + // network settings (for example, if an instance attempts to perform IP + // forwarding but is not enabled for IP forwarding). + Key string `json:"key,omitempty"` + // Value: [Output Only] A warning data value corresponding to the key. + Value string `json:"value,omitempty"` + // ForceSendFields is a list of field names (e.g. "Key") to unconditionally + // include in API requests. By default, fields with empty or default values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Key") to include in API requests + // with the JSON null value. By default, fields with empty values are omitted + // from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s NetworkProfilesListResponseWarningData) MarshalJSON() ([]byte, error) { + type NoMethod NetworkProfilesListResponseWarningData + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + // NetworkRoutingConfig: A routing configuration attached to a network // resource. The message includes the list of routers associated with the // network, and a flag indicating the type of routing behavior to enforce // network-wide. type NetworkRoutingConfig struct { + // BgpAlwaysCompareMed: Enable comparison of Multi-Exit Discriminators (MED) + // across routes with different neighbor ASNs when using the STANDARD BGP best + // path selection algorithm. + BgpAlwaysCompareMed bool `json:"bgpAlwaysCompareMed,omitempty"` + // BgpBestPathSelectionMode: The BGP best path selection algorithm to be + // employed within this network for dynamic routes learned by Cloud Routers. + // Can be LEGACY (default) or STANDARD. + // + // Possible values: + // "LEGACY" + // "STANDARD" + BgpBestPathSelectionMode string `json:"bgpBestPathSelectionMode,omitempty"` + // BgpInterRegionCost: Allows to define a preferred approach for handling + // inter-region cost in the selection process when using the STANDARD BGP best + // path selection algorithm. Can be DEFAULT or ADD_COST_TO_MED. + // + // Possible values: + // "ADD_COST_TO_MED" + // "DEFAULT" + BgpInterRegionCost string `json:"bgpInterRegionCost,omitempty"` // RoutingMode: The network-wide routing mode to use. If set to REGIONAL, this // network's Cloud Routers will only advertise routes with subnets of this // network in the same region as the router. If set to GLOBAL, this network's @@ -27695,15 +28444,15 @@ type NetworkRoutingConfig struct { // "GLOBAL" // "REGIONAL" RoutingMode string `json:"routingMode,omitempty"` - // ForceSendFields is a list of field names (e.g. "RoutingMode") to + // ForceSendFields is a list of field names (e.g. "BgpAlwaysCompareMed") to // unconditionally include in API requests. By default, fields with empty or // default values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more // details. ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RoutingMode") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See + // NullFields is a list of field names (e.g. "BgpAlwaysCompareMed") to include + // in API requests with the JSON null value. By default, fields with empty + // values are omitted from API requests. See // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. NullFields []string `json:"-"` } @@ -28055,6 +28804,8 @@ type NodeGroupAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -28243,6 +28994,8 @@ type NodeGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -28527,6 +29280,8 @@ type NodeGroupsListNodesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -28690,6 +29445,8 @@ type NodeGroupsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -28973,6 +29730,8 @@ type NodeTemplateAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29127,6 +29886,8 @@ type NodeTemplateListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29289,6 +30050,8 @@ type NodeTemplatesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29502,6 +30265,8 @@ type NodeTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29656,6 +30421,8 @@ type NodeTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -29795,6 +30562,8 @@ type NodeTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30046,6 +30815,8 @@ type NotificationEndpointListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30356,6 +31127,8 @@ type OperationWarnings struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30512,6 +31285,8 @@ type OperationAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30667,6 +31442,8 @@ type OperationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -30806,6 +31583,8 @@ type OperationsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -31173,6 +31952,8 @@ type PacketMirroringAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -31391,6 +32172,8 @@ type PacketMirroringListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -31635,6 +32418,8 @@ type PacketMirroringsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -31736,14 +32521,10 @@ type PathMatcher struct { // DefaultRouteAction: defaultRouteAction takes effect when none of the // pathRules or routeRules match. The load balancer performs advanced routing // actions, such as URL rewrites and header transformations, before forwarding - // the request to the selected backend. If defaultRouteAction specifies any - // weightedBackendServices, defaultService must not be set. Conversely if - // defaultService is set, defaultRouteAction cannot contain any - // weightedBackendServices. If defaultRouteAction is specified, don't set - // defaultUrlRedirect. If defaultRouteAction.weightedBackendServices is - // specified, don't set defaultService. URL maps for classic Application Load - // Balancers only support the urlRewrite action within a path matcher's - // defaultRouteAction. + // the request to the selected backend. Only one of defaultUrlRedirect, + // defaultService or defaultRouteAction.weightedBackendService can be set. URL + // maps for classic Application Load Balancers only support the urlRewrite + // action within a path matcher's defaultRouteAction. DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` // DefaultService: The full or partial URL to the BackendService resource. This // URL is used if none of the pathRules or routeRules defined by this @@ -31754,20 +32535,17 @@ type PathMatcher struct { // compute/v1/projects/project/global/backendServices/backendService - // global/backendServices/backendService If defaultRouteAction is also // specified, advanced routing actions, such as URL rewrites, take effect - // before sending the request to the backend. However, if defaultService is - // specified, defaultRouteAction cannot contain any weightedBackendServices. - // Conversely, if defaultRouteAction specifies any weightedBackendServices, - // defaultService must not be specified. If defaultService is specified, then - // set either defaultUrlRedirect or defaultRouteAction.weightedBackendService. - // Don't set both. Authorization requires one or more of the following Google - // IAM permissions on the specified resource default_service: - - // compute.backendBuckets.use - compute.backendServices.use + // before sending the request to the backend. Only one of defaultUrlRedirect, + // defaultService or defaultRouteAction.weightedBackendService can be set. + // Authorization requires one or more of the following Google IAM permissions + // on the specified resource default_service: - compute.backendBuckets.use - + // compute.backendServices.use DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified pathRules or routeRules // match, the request is redirected to a URL specified by defaultUrlRedirect. - // If defaultUrlRedirect is specified, then set either defaultService or - // defaultRouteAction. Don't set both. Not supported when the URL map is bound - // to a target gRPC proxy. + // Only one of defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. Not supported when the + // URL map is bound to a target gRPC proxy. DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` // Description: An optional description of this resource. Provide this property // when you create the resource. @@ -31846,26 +32624,21 @@ type PathRule struct { Paths []string `json:"paths,omitempty"` // RouteAction: In response to a matching path, the load balancer performs // advanced routing actions, such as URL rewrites and header transformations, - // before forwarding the request to the selected backend. If routeAction - // specifies any weightedBackendServices, service must not be set. Conversely - // if service is set, routeAction cannot contain any weightedBackendServices. - // Only one of routeAction or urlRedirect must be set. URL maps for classic - // Application Load Balancers only support the urlRewrite action within a path - // rule's routeAction. + // before forwarding the request to the selected backend. Only one of + // urlRedirect, service or routeAction.weightedBackendService can be set. URL + // maps for classic Application Load Balancers only support the urlRewrite + // action within a path rule's routeAction. RouteAction *HttpRouteAction `json:"routeAction,omitempty"` // Service: The full or partial URL of the backend service resource to which // traffic is directed if this rule is matched. If routeAction is also // specified, advanced routing actions, such as URL rewrites, take effect - // before sending the request to the backend. However, if service is specified, - // routeAction cannot contain any weightedBackendServices. Conversely, if - // routeAction specifies any weightedBackendServices, service must not be - // specified. Only one of urlRedirect, service or - // routeAction.weightedBackendService must be set. + // before sending the request to the backend. Only one of urlRedirect, service + // or routeAction.weightedBackendService can be set. Service string `json:"service,omitempty"` // UrlRedirect: When a path pattern is matched, the request is redirected to a - // URL specified by urlRedirect. If urlRedirect is specified, service or - // routeAction must not be set. Not supported when the URL map is bound to a - // target gRPC proxy. + // URL specified by urlRedirect. Only one of urlRedirect, service or + // routeAction.weightedBackendService can be set. Not supported when the URL + // map is bound to a target gRPC proxy. UrlRedirect *HttpRedirectAction `json:"urlRedirect,omitempty"` // ForceSendFields is a list of field names (e.g. "CustomErrorResponsePolicy") // to unconditionally include in API requests. By default, fields with empty or @@ -31895,8 +32668,8 @@ type PerInstanceConfig struct { // instance. Serves as a merge key during UpdatePerInstanceConfigs operations, // that is, if a per-instance configuration with the same name exists then it // will be updated, otherwise a new one will be created for the VM instance - // with the same name. An attempt to create a per-instance configconfiguration - // for a VM instance that either doesn't exist or is not part of the group will + // with the same name. An attempt to create a per-instance configuration for a + // VM instance that either doesn't exist or is not part of the group will // result in an error. Name string `json:"name,omitempty"` // PreservedState: The intended preserved state for the given instance. Does @@ -32214,7 +32987,8 @@ type Project struct { DefaultServiceAccount string `json:"defaultServiceAccount,omitempty"` // Description: An optional textual description of the resource. Description string `json:"description,omitempty"` - // EnabledFeatures: Restricted features enabled for use on this project. + // EnabledFeatures: An optional list of restricted features enabled for use on + // this project. EnabledFeatures []string `json:"enabledFeatures,omitempty"` // Id: [Output Only] The unique identifier for the resource. This identifier is // defined by the server. This is *not* the project ID, and is just a unique ID @@ -32230,8 +33004,8 @@ type Project struct { Quotas []*Quota `json:"quotas,omitempty"` // SelfLink: [Output Only] Server-defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // UsageExportLocation: The naming prefix for daily usage reports and the - // Google Cloud Storage bucket where they are stored. + // UsageExportLocation: An optional naming prefix for daily usage reports and + // the Google Cloud Storage bucket where they are stored. UsageExportLocation *UsageExportLocation `json:"usageExportLocation,omitempty"` // VmDnsSetting: [Output Only] Default internal DNS setting used by VMs running // in this project. @@ -32625,6 +33399,8 @@ type PublicAdvertisedPrefixListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -32929,6 +33705,8 @@ type PublicDelegatedPrefixAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -33083,6 +33861,8 @@ type PublicDelegatedPrefixListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -33279,6 +34059,8 @@ type PublicDelegatedPrefixesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -33750,6 +34532,8 @@ type RegionQuotaStatusWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -33933,6 +34717,8 @@ type RegionAutoscalerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34086,6 +34872,8 @@ type RegionDiskTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34332,6 +35120,8 @@ type RegionInstanceGroupListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34512,6 +35302,8 @@ type RegionInstanceGroupManagerListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34871,6 +35663,8 @@ type RegionInstanceGroupManagersListInstanceConfigsRespWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -34990,6 +35784,28 @@ func (s RegionInstanceGroupManagersRecreateRequest) MarshalJSON() ([]byte, error return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type RegionInstanceGroupManagersResumeInstancesRequest struct { + // Instances: The URLs of one or more instances to resume. This can be a full + // URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RegionInstanceGroupManagersResumeInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersResumeInstancesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type RegionInstanceGroupManagersSetTargetPoolsRequest struct { // Fingerprint: Fingerprint of the target pools information, which is a hash of // the contents. This field is used for optimistic locking when you update the @@ -35039,6 +35855,78 @@ func (s RegionInstanceGroupManagersSetTemplateRequest) MarshalJSON() ([]byte, er return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } +type RegionInstanceGroupManagersStartInstancesRequest struct { + // Instances: The URLs of one or more instances to start. This can be a full + // URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` + // ForceSendFields is a list of field names (e.g. "Instances") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "Instances") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RegionInstanceGroupManagersStartInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersStartInstancesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupManagersStopInstancesRequest struct { + // ForceStop: If this flag is set to true, the Instance Group Manager will + // proceed to stop the instances, skipping initialization on them. + ForceStop bool `json:"forceStop,omitempty"` + // Instances: The URLs of one or more instances to stop. This can be a full URL + // or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` + // ForceSendFields is a list of field names (e.g. "ForceStop") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ForceStop") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RegionInstanceGroupManagersStopInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersStopInstancesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + +type RegionInstanceGroupManagersSuspendInstancesRequest struct { + // ForceSuspend: If this flag is set to true, the Instance Group Manager will + // proceed to suspend the instances, skipping initialization on them. + ForceSuspend bool `json:"forceSuspend,omitempty"` + // Instances: The URLs of one or more instances to suspend. This can be a full + // URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME]. + Instances []string `json:"instances,omitempty"` + // ForceSendFields is a list of field names (e.g. "ForceSuspend") to + // unconditionally include in API requests. By default, fields with empty or + // default values are omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more + // details. + ForceSendFields []string `json:"-"` + // NullFields is a list of field names (e.g. "ForceSuspend") to include in API + // requests with the JSON null value. By default, fields with empty values are + // omitted from API requests. See + // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. + NullFields []string `json:"-"` +} + +func (s RegionInstanceGroupManagersSuspendInstancesRequest) MarshalJSON() ([]byte, error) { + type NoMethod RegionInstanceGroupManagersSuspendInstancesRequest + return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) +} + type RegionInstanceGroupsListInstances struct { // Id: [Output Only] Unique identifier for the resource; defined by the server. Id string `json:"id,omitempty"` @@ -35125,6 +36013,8 @@ type RegionInstanceGroupsListInstancesWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -35338,6 +36228,8 @@ type RegionListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -35861,6 +36753,8 @@ type ReservationAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36015,6 +36909,8 @@ type ReservationListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36176,6 +37072,8 @@ type ReservationsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36376,6 +37274,8 @@ type ResourcePoliciesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36600,6 +37500,8 @@ type ResourcePolicyAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -36913,6 +37815,8 @@ type ResourcePolicyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37217,8 +38121,9 @@ func (s ResourcePolicyWeeklyCycleDayOfWeek) MarshalJSON() ([]byte, error) { // values set on Instance attributes as compared to the value requested by the // user (intent) in their instance CRUD calls. type ResourceStatus struct { - // PhysicalHost: [Output Only] An opaque ID of the host on which the VM is - // running. + // PhysicalHost: [Output Only] The precise location of your instance within the + // zone's data center, including the block, sub-block, and host. The field is + // formatted as follows: blockId/subBlockId/hostId. PhysicalHost string `json:"physicalHost,omitempty"` Scheduling *ResourceStatusScheduling `json:"scheduling,omitempty"` UpcomingMaintenance *UpcomingMaintenance `json:"upcomingMaintenance,omitempty"` @@ -37319,6 +38224,10 @@ type Route struct { // You can specify this as a full or partial URL. For example: // https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/ NextHopInstance string `json:"nextHopInstance,omitempty"` + // NextHopInterRegionCost: [Output only] Internal fixed region-to-region cost + // that Google Cloud calculates based on factors such as network performance, + // distance, and available bandwidth between regions. + NextHopInterRegionCost int64 `json:"nextHopInterRegionCost,omitempty"` // NextHopIp: The network IP address of an instance that should handle matching // packets. Both IPv6 address and IPv4 addresses are supported. Must specify an // IPv4 address in dot-decimal notation (e.g. 192.0.2.99) or an IPv6 address in @@ -37326,9 +38235,20 @@ type Route struct { // addresses will be displayed using RFC 5952 compressed format (e.g. // 2001:db8::2d9:51:0:0). Should never be an IPv4-mapped IPv6 address. NextHopIp string `json:"nextHopIp,omitempty"` + // NextHopMed: [Output Only] Multi-Exit Discriminator, a BGP route metric that + // indicates the desirability of a particular route in a network. + NextHopMed int64 `json:"nextHopMed,omitempty"` // NextHopNetwork: The URL of the local network if it should handle matching // packets. NextHopNetwork string `json:"nextHopNetwork,omitempty"` + // NextHopOrigin: [Output Only] Indicates the origin of the route. Can be IGP + // (Interior Gateway Protocol), EGP (Exterior Gateway Protocol), or INCOMPLETE. + // + // Possible values: + // "EGP" + // "IGP" + // "INCOMPLETE" + NextHopOrigin string `json:"nextHopOrigin,omitempty"` // NextHopPeering: [Output Only] The network peering name that should handle // matching packets, which should conform to RFC1035. NextHopPeering string `json:"nextHopPeering,omitempty"` @@ -37440,6 +38360,8 @@ type RouteWarnings struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37628,6 +38550,8 @@ type RouteListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -37877,6 +38801,8 @@ type RouterAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -38394,6 +39320,8 @@ type RouterListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -39098,6 +40026,8 @@ type RoutersScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -39672,6 +40602,8 @@ type SecurityPoliciesAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -39834,6 +40766,8 @@ type SecurityPoliciesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -40347,6 +41281,8 @@ type SecurityPolicyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -40919,7 +41855,9 @@ type SecurityPolicyRuleRateLimitOptions struct { // defaults to ALL. - USER_IP: The IP address of the originating client, which // is resolved based on "userIpRequestHeaders" configured with the security // policy. If there is no "userIpRequestHeaders" configuration or an IP address - // cannot be resolved from it, the key type defaults to IP. + // cannot be resolved from it, the key type defaults to IP. - + // TLS_JA4_FINGERPRINT: JA4 TLS/SSL fingerprint if the client connects using + // HTTPS, HTTP/2 or HTTP/3. If not available, the key type defaults to ALL. // // Possible values: // "ALL" @@ -40930,6 +41868,7 @@ type SecurityPolicyRuleRateLimitOptions struct { // "REGION_CODE" // "SNI" // "TLS_JA3_FINGERPRINT" + // "TLS_JA4_FINGERPRINT" // "USER_IP" // "XFF_IP" EnforceOnKey string `json:"enforceOnKey,omitempty"` @@ -41008,7 +41947,9 @@ type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { // USER_IP: The IP address of the originating client, which is resolved based // on "userIpRequestHeaders" configured with the security policy. If there is // no "userIpRequestHeaders" configuration or an IP address cannot be resolved - // from it, the key type defaults to IP. + // from it, the key type defaults to IP. - TLS_JA4_FINGERPRINT: JA4 TLS/SSL + // fingerprint if the client connects using HTTPS, HTTP/2 or HTTP/3. If not + // available, the key type defaults to ALL. // // Possible values: // "ALL" @@ -41019,6 +41960,7 @@ type SecurityPolicyRuleRateLimitOptionsEnforceOnKeyConfig struct { // "REGION_CODE" // "SNI" // "TLS_JA3_FINGERPRINT" + // "TLS_JA4_FINGERPRINT" // "USER_IP" // "XFF_IP" EnforceOnKeyType string `json:"enforceOnKeyType,omitempty"` @@ -41492,6 +42434,8 @@ type ServiceAttachmentAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -41714,6 +42658,8 @@ type ServiceAttachmentListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -41853,6 +42799,8 @@ type ServiceAttachmentsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -42447,6 +43395,8 @@ type SnapshotListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -42913,6 +43863,8 @@ type SslCertificateAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43066,6 +44018,8 @@ type SslCertificateListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43283,6 +44237,8 @@ type SslCertificatesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43440,6 +44396,8 @@ type SslPoliciesAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43593,6 +44551,8 @@ type SslPoliciesListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43755,6 +44715,8 @@ type SslPoliciesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -43959,6 +44921,8 @@ type SslPolicyWarnings struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -44392,6 +45356,8 @@ type StoragePoolAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -44602,6 +45568,8 @@ type StoragePoolListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -44759,6 +45727,8 @@ type StoragePoolListDisksWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -45032,6 +46002,8 @@ type StoragePoolTypeAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -45186,6 +46158,8 @@ type StoragePoolTypeListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -45326,6 +46300,8 @@ type StoragePoolTypesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -45465,6 +46441,8 @@ type StoragePoolsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -45622,14 +46600,16 @@ type Subnetwork struct { // VMs in this subnet to Google services. PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"` // Purpose: The purpose of the resource. This field can be either PRIVATE, - // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or - // PRIVATE is the default purpose for user-created subnets or subnets that are - // automatically created in auto mode networks. Subnets with purpose set to - // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks - // that are reserved for Envoy-based load balancers. A subnet with purpose set - // to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service - // Connect. If unspecified, the subnet purpose defaults to PRIVATE. The - // enableFlowLogs field isn't supported if the subnet purpose field is set to + // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or + // PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created + // subnets or subnets that are automatically created in auto mode networks. + // Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY + // are user-created subnetworks that are reserved for Envoy-based load + // balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to + // publish services using Private Service Connect. A subnet with purpose set to + // PEER_MIGRATION is used for subnet migration from one peered VPC to another. + // If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs + // field isn't supported if the subnet purpose field is set to // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. // // Possible values: @@ -45638,6 +46618,9 @@ type Subnetwork struct { // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal HTTP(S) Load // Balancing. This is a legacy purpose, please use REGIONAL_MANAGED_PROXY // instead. + // "PEER_MIGRATION" - Subnetwork will be used for Migration from one peered + // VPC to another. (a transient state of subnetwork while migrating resources + // from one project to another). // "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. @@ -45803,6 +46786,8 @@ type SubnetworkAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -45957,6 +46942,8 @@ type SubnetworkListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -46230,6 +47217,8 @@ type SubnetworksScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -46611,6 +47600,8 @@ type TargetGrpcProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -46750,6 +47741,8 @@ type TargetHttpProxiesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -47027,6 +48020,8 @@ type TargetHttpProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -47166,6 +48161,8 @@ type TargetHttpsProxiesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -47312,14 +48309,14 @@ func (s TargetHttpsProxiesSetSslCertificatesRequest) MarshalJSON() ([]byte, erro // Engine has two Target HTTPS Proxy resources: * Global // (/compute/docs/reference/rest/v1/targetHttpsProxies) * Regional // (/compute/docs/reference/rest/v1/regionTargetHttpsProxies) A target HTTPS -// proxy is a component of GCP HTTPS load balancers. * targetHttpProxies are -// used by global external Application Load Balancers, classic Application Load -// Balancers, cross-region internal Application Load Balancers, and Traffic -// Director. * regionTargetHttpProxies are used by regional internal -// Application Load Balancers and regional external Application Load Balancers. -// Forwarding rules reference a target HTTPS proxy, and the target proxy then -// references a URL map. For more information, read Using Target Proxies and -// Forwarding rule concepts. +// proxy is a component of Google Cloud HTTPS load balancers. * +// targetHttpProxies are used by global external Application Load Balancers, +// classic Application Load Balancers, cross-region internal Application Load +// Balancers, and Traffic Director. * regionTargetHttpProxies are used by +// regional internal Application Load Balancers and regional external +// Application Load Balancers. Forwarding rules reference a target HTTPS proxy, +// and the target proxy then references a URL map. For more information, read +// Using Target Proxies and Forwarding rule concepts. type TargetHttpsProxy struct { // AuthorizationPolicy: Optional. A URL referring to a // networksecurity.AuthorizationPolicy resource that describes how the proxy @@ -47459,6 +48456,12 @@ type TargetHttpsProxy struct { // included on requests with safe HTTP methods (GET, HEAD, OPTIONS, TRACE) // without query parameters. Requests that send Early Data with non-idempotent // HTTP methods or with query parameters will be rejected with a HTTP 425. + // "UNRESTRICTED" - This enables TLS 1.3 Early Data for requests with any + // HTTP method including non-idempotent methods list POST. This mode does not + // enforce any other limitations. This may be valuable for gRPC use cases. + // However, we do not recommend this method unless you have evaluated your + // security stance and mitigated the risk of replay attacks using other + // mechanisms. TlsEarlyData string `json:"tlsEarlyData,omitempty"` // UrlMap: A fully-qualified or valid partial URL to the UrlMap resource that // defines the mapping from URL to the BackendService. For example, the @@ -47576,6 +48579,8 @@ type TargetHttpsProxyAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -47730,6 +48735,8 @@ type TargetHttpsProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -47958,6 +48965,8 @@ type TargetInstanceAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -48111,6 +49120,8 @@ type TargetInstanceListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -48250,6 +49261,8 @@ type TargetInstancesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -48542,6 +49555,8 @@ type TargetPoolAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -48722,6 +49737,8 @@ type TargetPoolListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -48955,6 +49972,8 @@ type TargetPoolsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49295,6 +50314,8 @@ type TargetSslProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49434,6 +50455,8 @@ type TargetTcpProxiesScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49706,6 +50729,8 @@ type TargetTcpProxyAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -49859,6 +50884,8 @@ type TargetTcpProxyListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -50097,6 +51124,8 @@ type TargetVpnGatewayAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -50251,6 +51280,8 @@ type TargetVpnGatewayListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -50391,6 +51422,8 @@ type TargetVpnGatewaysScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -50661,31 +51694,27 @@ type UrlMap struct { // DefaultRouteAction: defaultRouteAction takes effect when none of the // hostRules match. The load balancer performs advanced routing actions, such // as URL rewrites and header transformations, before forwarding the request to - // the selected backend. If defaultRouteAction specifies any - // weightedBackendServices, defaultService must not be set. Conversely if - // defaultService is set, defaultRouteAction cannot contain any - // weightedBackendServices. Only one of defaultRouteAction or - // defaultUrlRedirect must be set. URL maps for classic Application Load - // Balancers only support the urlRewrite action within defaultRouteAction. - // defaultRouteAction has no effect when the URL map is bound to a target gRPC - // proxy that has the validateForProxyless field set to true. + // the selected backend. Only one of defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. URL maps for classic + // Application Load Balancers only support the urlRewrite action within + // defaultRouteAction. defaultRouteAction has no effect when the URL map is + // bound to a target gRPC proxy that has the validateForProxyless field set to + // true. DefaultRouteAction *HttpRouteAction `json:"defaultRouteAction,omitempty"` // DefaultService: The full or partial URL of the defaultService resource to // which traffic is directed if none of the hostRules match. If // defaultRouteAction is also specified, advanced routing actions, such as URL - // rewrites, take effect before sending the request to the backend. However, if - // defaultService is specified, defaultRouteAction cannot contain any - // defaultRouteAction.weightedBackendServices. Conversely, if - // defaultRouteAction specifies any defaultRouteAction.weightedBackendServices, - // defaultService must not be specified. If defaultService is specified, then - // set either defaultUrlRedirect , or defaultRouteAction.weightedBackendService - // Don't set both. defaultService has no effect when the URL map is bound to a - // target gRPC proxy that has the validateForProxyless field set to true. + // rewrites, take effect before sending the request to the backend. Only one of + // defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. defaultService has no + // effect when the URL map is bound to a target gRPC proxy that has the + // validateForProxyless field set to true. DefaultService string `json:"defaultService,omitempty"` // DefaultUrlRedirect: When none of the specified hostRules match, the request - // is redirected to a URL specified by defaultUrlRedirect. If - // defaultUrlRedirect is specified, defaultService or defaultRouteAction must - // not be set. Not supported when the URL map is bound to a target gRPC proxy. + // is redirected to a URL specified by defaultUrlRedirect. Only one of + // defaultUrlRedirect, defaultService or + // defaultRouteAction.weightedBackendService can be set. Not supported when the + // URL map is bound to a target gRPC proxy. DefaultUrlRedirect *HttpRedirectAction `json:"defaultUrlRedirect,omitempty"` // Description: An optional description of this resource. Provide this property // when you create the resource. @@ -50841,6 +51870,8 @@ type UrlMapListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -51121,6 +52152,8 @@ type UrlMapsAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -51260,6 +52293,8 @@ type UrlMapsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -51462,14 +52497,16 @@ type UsableSubnetwork struct { // Network: Network URL. Network string `json:"network,omitempty"` // Purpose: The purpose of the resource. This field can be either PRIVATE, - // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PRIVATE_SERVICE_CONNECT, or - // PRIVATE is the default purpose for user-created subnets or subnets that are - // automatically created in auto mode networks. Subnets with purpose set to - // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY are user-created subnetworks - // that are reserved for Envoy-based load balancers. A subnet with purpose set - // to PRIVATE_SERVICE_CONNECT is used to publish services using Private Service - // Connect. If unspecified, the subnet purpose defaults to PRIVATE. The - // enableFlowLogs field isn't supported if the subnet purpose field is set to + // GLOBAL_MANAGED_PROXY, REGIONAL_MANAGED_PROXY, PEER_MIGRATION or + // PRIVATE_SERVICE_CONNECT. PRIVATE is the default purpose for user-created + // subnets or subnets that are automatically created in auto mode networks. + // Subnets with purpose set to GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY + // are user-created subnetworks that are reserved for Envoy-based load + // balancers. A subnet with purpose set to PRIVATE_SERVICE_CONNECT is used to + // publish services using Private Service Connect. A subnet with purpose set to + // PEER_MIGRATION is used for subnet migration from one peered VPC to another. + // If unspecified, the subnet purpose defaults to PRIVATE. The enableFlowLogs + // field isn't supported if the subnet purpose field is set to // GLOBAL_MANAGED_PROXY or REGIONAL_MANAGED_PROXY. // // Possible values: @@ -51478,6 +52515,9 @@ type UsableSubnetwork struct { // "INTERNAL_HTTPS_LOAD_BALANCER" - Subnet reserved for Internal HTTP(S) Load // Balancing. This is a legacy purpose, please use REGIONAL_MANAGED_PROXY // instead. + // "PEER_MIGRATION" - Subnetwork will be used for Migration from one peered + // VPC to another. (a transient state of subnetwork while migrating resources + // from one project to another). // "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. @@ -51650,6 +52690,8 @@ type UsableSubnetworksAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -51950,6 +52992,8 @@ type VmEndpointNatMappingsListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -52192,6 +53236,8 @@ type VpnGatewayAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -52346,6 +53392,8 @@ type VpnGatewayListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -52679,6 +53727,8 @@ type VpnGatewaysScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -52991,6 +54041,8 @@ type VpnTunnelAggregatedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -53145,6 +54197,8 @@ type VpnTunnelListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -53284,6 +54338,8 @@ type VpnTunnelsScopedListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -53541,6 +54597,8 @@ type XpnHostListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is @@ -53779,6 +54837,8 @@ type ZoneListWarning struct { // "NO_RESULTS_ON_PAGE" - No results are present on a particular list page. // "PARTIAL_SUCCESS" - Success is reported, but some results may be missing // due to errors + // "QUOTA_INFO_UNAVAILABLE" - Quota information is not available to client + // requests (e.g: regions.list). // "REQUIRED_TOS_AGREEMENT" - The user attempted to use a resource that // requires a TOS they have not accepted. // "RESOURCE_IN_USE_BY_OTHER_RESOURCE_WARNING" - Warning that a resource is diff --git a/compute/v1/compute2-gen.go b/compute/v1/compute2-gen.go index f66a5b58a34..1cf1f4e406f 100644 --- a/compute/v1/compute2-gen.go +++ b/compute/v1/compute2-gen.go @@ -26062,6 +26062,142 @@ func (c *InstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } +type InstanceGroupManagersResumeInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersresumeinstancesrequest *InstanceGroupManagersResumeInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ResumeInstances: Flags the specified instances in the managed instance group +// to be resumed. This method increases the targetSize and decreases the +// targetSuspendedSize of the managed instance group by the number of instances +// that you resume. The resumeInstances operation is marked DONE if the +// resumeInstances request is successful. The underlying actions take +// additional time. You must separately verify the status of the RESUMING +// action with the listmanagedinstances method. In this request, you can only +// specify instances that are suspended. For example, if an instance was +// previously suspended using the suspendInstances method, it can be resumed +// using the resumeInstances method. If a health check is attached to the +// managed instance group, the specified instances will be verified as healthy +// after they are resumed. You can specify a maximum of 1000 instances with +// this method per request. +// +// - instanceGroupManager: The name of the managed instance group. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is located. +func (r *InstanceGroupManagersService) ResumeInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersresumeinstancesrequest *InstanceGroupManagersResumeInstancesRequest) *InstanceGroupManagersResumeInstancesCall { + c := &InstanceGroupManagersResumeInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagersresumeinstancesrequest = instancegroupmanagersresumeinstancesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstanceGroupManagersResumeInstancesCall) RequestId(requestId string) *InstanceGroupManagersResumeInstancesCall { + 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 +// details. +func (c *InstanceGroupManagersResumeInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersResumeInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstanceGroupManagersResumeInstancesCall) Context(ctx context.Context) *InstanceGroupManagersResumeInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstanceGroupManagersResumeInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstanceGroupManagersResumeInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersresumeinstancesrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/resumeInstances") + 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{ + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instanceGroupManagers.resumeInstances" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *InstanceGroupManagersResumeInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type InstanceGroupManagersSetInstanceTemplateCall struct { s *Service project string @@ -26318,32 +26454,39 @@ func (c *InstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOptio return ret, nil } -type InstanceGroupManagersUpdatePerInstanceConfigsCall struct { - s *Service - project string - zone string - instanceGroupManager string - instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersStartInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersstartinstancesrequest *InstanceGroupManagersStartInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdatePerInstanceConfigs: Inserts or updates per-instance configurations for -// the managed instance group. perInstanceConfig.name serves as a key used to -// distinguish whether to perform insert or patch. +// StartInstances: Flags the specified instances in the managed instance group +// to be started. This method increases the targetSize and decreases the +// targetStoppedSize of the managed instance group by the number of instances +// that you start. The startInstances operation is marked DONE if the +// startInstances request is successful. The underlying actions take additional +// time. You must separately verify the status of the STARTING action with the +// listmanagedinstances method. In this request, you can only specify instances +// that are stopped. For example, if an instance was previously stopped using +// the stopInstances method, it can be started using the startInstances method. +// If a health check is attached to the managed instance group, the specified +// instances will be verified as healthy after they are started. You can +// specify a maximum of 1000 instances with this method per request. // -// - instanceGroupManager: The name of the managed instance group. It should -// conform to RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where the managed instance group is located. It -// should conform to RFC1035. -func (r *InstanceGroupManagersService) UpdatePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq) *InstanceGroupManagersUpdatePerInstanceConfigsCall { - c := &InstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is located. +func (r *InstanceGroupManagersService) StartInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersstartinstancesrequest *InstanceGroupManagersStartInstancesRequest) *InstanceGroupManagersStartInstancesCall { + c := &InstanceGroupManagersStartInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroupManager = instanceGroupManager - c.instancegroupmanagersupdateperinstanceconfigsreq = instancegroupmanagersupdateperinstanceconfigsreq + c.instancegroupmanagersstartinstancesrequest = instancegroupmanagersstartinstancesrequest return c } @@ -26357,7 +26500,7 @@ func (r *InstanceGroupManagersService) UpdatePerInstanceConfigs(project string, // 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 *InstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersUpdatePerInstanceConfigsCall { +func (c *InstanceGroupManagersStartInstancesCall) RequestId(requestId string) *InstanceGroupManagersStartInstancesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -26365,36 +26508,36 @@ func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdatePerInstanceConfigsCall { +func (c *InstanceGroupManagersStartInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersStartInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersUpdatePerInstanceConfigsCall { +func (c *InstanceGroupManagersStartInstancesCall) Context(ctx context.Context) *InstanceGroupManagersStartInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { +func (c *InstanceGroupManagersStartInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersStartInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersupdateperinstanceconfigsreq) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersstartinstancesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/startInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -26409,12 +26552,12 @@ func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroupManagers.updatePerInstanceConfigs" call. +// Do executes the "compute.instanceGroupManagers.startInstances" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersStartInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26446,31 +26589,45 @@ func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi return ret, nil } -type InstanceGroupsAddInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersStopInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersstopinstancesrequest *InstanceGroupManagersStopInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddInstances: Adds a list of instances to the specified instance group. All -// of the instances in the instance group must be in the same -// network/subnetwork. Read Adding instances for more information. +// StopInstances: Flags the specified instances in the managed instance group +// to be immediately stopped. You can only specify instances that are running +// in this request. This method reduces the targetSize and increases the +// targetStoppedSize of the managed instance group by the number of instances +// that you stop. The stopInstances operation is marked DONE if the +// stopInstances request is successful. The underlying actions take additional +// time. You must separately verify the status of the STOPPING action with the +// listmanagedinstances method. If the standbyPolicy.initialDelaySec field is +// set, the group delays stopping the instances until initialDelaySec have +// passed from instance.creationTimestamp (that is, when the instance was +// created). This delay gives your application time to set itself up and +// initialize on the instance. If more than initialDelaySec seconds have passed +// since instance.creationTimestamp when this method is called, there will be +// zero delay. If the group is part of a backend service that has enabled +// connection draining, it can take up to 60 seconds after the connection +// draining duration has elapsed before the VM instance is stopped. Stopped +// instances can be started using the startInstances method. You can specify a +// maximum of 1000 instances with this method per request. // -// - instanceGroup: The name of the instance group where you are adding -// instances. -// - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { - c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is located. +func (r *InstanceGroupManagersService) StopInstances(project string, zone string, instanceGroupManager string, instancegroupmanagersstopinstancesrequest *InstanceGroupManagersStopInstancesRequest) *InstanceGroupManagersStopInstancesCall { + c := &InstanceGroupManagersStopInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagersstopinstancesrequest = instancegroupmanagersstopinstancesrequest return c } @@ -26484,7 +26641,7 @@ func (r *InstanceGroupsService) AddInstances(project string, zone string, instan // 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 *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGroupsAddInstancesCall { +func (c *InstanceGroupManagersStopInstancesCall) RequestId(requestId string) *InstanceGroupManagersStopInstancesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -26492,36 +26649,36 @@ func (c *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall { +func (c *InstanceGroupManagersStopInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersStopInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall { +func (c *InstanceGroupManagersStopInstancesCall) Context(ctx context.Context) *InstanceGroupManagersStopInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceGroupsAddInstancesCall) Header() http.Header { +func (c *InstanceGroupManagersStopInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupManagersStopInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersstopinstancesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/stopInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -26529,19 +26686,19 @@ func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.addInstances" call. +// Do executes the "compute.instanceGroupManagers.stopInstances" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersStopInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26573,184 +26730,117 @@ func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Oper return ret, nil } -type InstanceGroupsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersSuspendInstancesCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagerssuspendinstancesrequest *InstanceGroupManagersSuspendInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AggregatedList: Retrieves the list of instance groups and sorts them by -// zone. To prevent failure, Google recommends that you set the -// `returnPartialSuccess` parameter to `true`. +// SuspendInstances: Flags the specified instances in the managed instance +// group to be immediately suspended. You can only specify instances that are +// running in this request. This method reduces the targetSize and increases +// the targetSuspendedSize of the managed instance group by the number of +// instances that you suspend. The suspendInstances operation is marked DONE if +// the suspendInstances request is successful. The underlying actions take +// additional time. You must separately verify the status of the SUSPENDING +// action with the listmanagedinstances method. If the +// standbyPolicy.initialDelaySec field is set, the group delays suspension of +// the instances until initialDelaySec have passed from +// instance.creationTimestamp (that is, when the instance was created). This +// delay gives your application time to set itself up and initialize on the +// instance. If more than initialDelaySec seconds have passed since +// instance.creationTimestamp when this method is called, there will be zero +// delay. If the group is part of a backend service that has enabled connection +// draining, it can take up to 60 seconds after the connection draining +// duration has elapsed before the VM instance is suspended. Suspended +// instances can be resumed using the resumeInstances method. You can specify a +// maximum of 1000 instances with this method per request. // +// - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. -func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { - c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone where the managed instance group is located. +func (r *InstanceGroupManagersService) SuspendInstances(project string, zone string, instanceGroupManager string, instancegroupmanagerssuspendinstancesrequest *InstanceGroupManagersSuspendInstancesRequest) *InstanceGroupManagersSuspendInstancesCall { + c := &InstanceGroupManagersSuspendInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagerssuspendinstancesrequest = instancegroupmanagerssuspendinstancesrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *InstanceGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *InstanceGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *InstanceGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstanceGroupsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstanceGroupManagersSuspendInstancesCall) RequestId(requestId string) *InstanceGroupManagersSuspendInstancesCall { + 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 // details. -func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall { +func (c *InstanceGroupManagersSuspendInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupManagersSuspendInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall { +func (c *InstanceGroupManagersSuspendInstancesCall) Context(ctx context.Context) *InstanceGroupManagersSuspendInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceGroupsAggregatedListCall) Header() http.Header { +func (c *InstanceGroupManagersSuspendInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InstanceGroupManagersSuspendInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagerssuspendinstancesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/suspendInstances") 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{ - "project": c.project, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.aggregatedList" call. +// Do executes the "compute.instanceGroupManagers.suspendInstances" call. // Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, error) { +// *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 *InstanceGroupManagersSuspendInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26769,7 +26859,7 @@ func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*In if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupAggregatedList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -26782,49 +26872,32 @@ func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*In return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type InstanceGroupsDeleteCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupManagersUpdatePerInstanceConfigsCall struct { + s *Service + project string + zone string + instanceGroupManager string + instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified instance group. The instances in the group are -// not deleted. Note that instance group must not belong to a backend service. -// Read Deleting an instance group for more information. +// UpdatePerInstanceConfigs: Inserts or updates per-instance configurations for +// the managed instance group. perInstanceConfig.name serves as a key used to +// distinguish whether to perform insert or patch. // -// - instanceGroup: The name of the instance group to delete. -// - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { - c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. It should +// conform to RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the managed instance group is located. It +// should conform to RFC1035. +func (r *InstanceGroupManagersService) UpdatePerInstanceConfigs(project string, zone string, instanceGroupManager string, instancegroupmanagersupdateperinstanceconfigsreq *InstanceGroupManagersUpdatePerInstanceConfigsReq) *InstanceGroupManagersUpdatePerInstanceConfigsCall { + c := &InstanceGroupManagersUpdatePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroup = instanceGroup + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanagersupdateperinstanceconfigsreq = instancegroupmanagersupdateperinstanceconfigsreq return c } @@ -26838,7 +26911,7 @@ func (r *InstanceGroupsService) Delete(project string, zone string, instanceGrou // 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 *InstanceGroupsDeleteCall) RequestId(requestId string) *InstanceGroupsDeleteCall { +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) RequestId(requestId string) *InstanceGroupManagersUpdatePerInstanceConfigsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -26846,52 +26919,56 @@ func (c *InstanceGroupsDeleteCall) RequestId(requestId string) *InstanceGroupsDe // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall { +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Fields(s ...googleapi.Field) *InstanceGroupManagersUpdatePerInstanceConfigsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall { +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Context(ctx context.Context) *InstanceGroupManagersUpdatePerInstanceConfigsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceGroupsDeleteCall) Header() http.Header { +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanagersupdateperinstanceconfigsreq) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroupManagers/{instanceGroupManager}/updatePerInstanceConfigs") 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{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, + "project": c.project, + "zone": c.zone, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.delete" call. +// Do executes the "compute.instanceGroupManagers.updatePerInstanceConfigs" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupManagersUpdatePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -26923,195 +27000,82 @@ func (c *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type InstanceGroupsGetCall struct { - s *Service - project string - zone string - instanceGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstanceGroupsAddInstancesCall struct { + s *Service + project string + zone string + instanceGroup string + instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified zonal instance group. Get a list of available -// zonal instance groups by making a list() request. For managed instance -// groups, use the instanceGroupManagers or regionInstanceGroupManagers methods -// instead. +// AddInstances: Adds a list of instances to the specified instance group. All +// of the instances in the instance group must be in the same +// network/subnetwork. Read Adding instances for more information. // -// - instanceGroup: The name of the instance group. -// - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { - c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroup: The name of the instance group where you are adding +// instances. +// - project: Project ID for this request. +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) AddInstances(project string, zone string, instanceGroup string, instancegroupsaddinstancesrequest *InstanceGroupsAddInstancesRequest) *InstanceGroupsAddInstancesCall { + c := &InstanceGroupsAddInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroup = instanceGroup + c.instancegroupsaddinstancesrequest = instancegroupsaddinstancesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstanceGroupsAddInstancesCall) RequestId(requestId string) *InstanceGroupsAddInstancesCall { + 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 // details. -func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *InstanceGroup.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, 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 := &InstanceGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type InstanceGroupsInsertCall struct { - s *Service - project string - zone string - instancegroup *InstanceGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates an instance group in the specified project using the -// parameters that are included in the request. -// -// - project: Project ID for this request. -// - zone: The name of the zone where you want to create the instance group. -func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { - c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instancegroup = instancegroup - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstanceGroupsInsertCall) RequestId(requestId string) *InstanceGroupsInsertCall { - 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 -// details. -func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall { +func (c *InstanceGroupsAddInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsAddInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall { +func (c *InstanceGroupsAddInstancesCall) Context(ctx context.Context) *InstanceGroupsAddInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceGroupsInsertCall) Header() http.Header { +func (c *InstanceGroupsAddInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsAddInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsaddinstancesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/addInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27119,18 +27083,19 @@ func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.insert" call. +// Do executes the "compute.instanceGroups.addInstances" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupsAddInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27162,26 +27127,23 @@ func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type InstanceGroupsListCall struct { +type InstanceGroupsAggregatedListCall struct { s *Service project string - zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of zonal instance group resources contained within -// the specified zone. For managed instance groups, use the -// instanceGroupManagers or regionInstanceGroupManagers methods instead. +// AggregatedList: Retrieves the list of instance groups and sorts them by +// zone. To prevent failure, Google recommends that you set the +// `returnPartialSuccess` parameter to `true`. // // - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { - c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstanceGroupsService) AggregatedList(project string) *InstanceGroupsAggregatedListCall { + c := &InstanceGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone return c } @@ -27217,17 +27179,30 @@ func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroup // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall { +func (c *InstanceGroupsAggregatedListCall) Filter(filter string) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *InstanceGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceGroupsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall { +func (c *InstanceGroupsAggregatedListCall) MaxResults(maxResults int64) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -27240,7 +27215,7 @@ func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsLis // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall { +func (c *InstanceGroupsAggregatedListCall) OrderBy(orderBy string) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -27248,7 +27223,7 @@ func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall { +func (c *InstanceGroupsAggregatedListCall) PageToken(pageToken string) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -27258,15 +27233,23 @@ func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsList // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *InstanceGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListCall { +func (c *InstanceGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *InstanceGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstanceGroupsAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall { +func (c *InstanceGroupsAggregatedListCall) Fields(s ...googleapi.Field) *InstanceGroupsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27274,27 +27257,27 @@ func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsLis // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall { +func (c *InstanceGroupsAggregatedListCall) IfNoneMatch(entityTag string) *InstanceGroupsAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall { +func (c *InstanceGroupsAggregatedListCall) Context(ctx context.Context) *InstanceGroupsAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceGroupsListCall) Header() http.Header { +func (c *InstanceGroupsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27302,7 +27285,7 @@ func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27311,18 +27294,17 @@ func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.list" call. +// Do executes the "compute.instanceGroups.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, error) { +// *InstanceGroupAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27341,7 +27323,7 @@ func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGrou if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupList{ + ret := &InstanceGroupAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27357,7 +27339,7 @@ func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGrou // 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 *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) error) error { +func (c *InstanceGroupsAggregatedListCall) Pages(ctx context.Context, f func(*InstanceGroupAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -27375,148 +27357,77 @@ func (c *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGrou } } -type InstanceGroupsListInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsDeleteCall struct { + s *Service + project string + zone string + instanceGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListInstances: Lists the instances in the specified instance group. The -// orderBy query parameter is not supported. The filter query parameter is -// supported, but only for expressions that use `eq` (equal) or `ne` (not -// equal) operators. +// Delete: Deletes the specified instance group. The instances in the group are +// not deleted. Note that instance group must not belong to a backend service. +// Read Deleting an instance group for more information. // -// - instanceGroup: The name of the instance group from which you want to -// generate a list of included instances. -// - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { - c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroup: The name of the instance group to delete. +// - project: Project ID for this request. +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) Delete(project string, zone string, instanceGroup string) *InstanceGroupsDeleteCall { + c := &InstanceGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroup = instanceGroup - c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *InstanceGroupsListInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListInstancesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstanceGroupsDeleteCall) RequestId(requestId string) *InstanceGroupsDeleteCall { + 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 // details. -func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall { +func (c *InstanceGroupsDeleteCall) Fields(s ...googleapi.Field) *InstanceGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall { +func (c *InstanceGroupsDeleteCall) Context(ctx context.Context) *InstanceGroupsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceGroupsListInstancesCall) Header() http.Header { +func (c *InstanceGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstanceGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupslistinstancesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -27529,13 +27440,12 @@ func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.listInstances" call. +// Do executes the "compute.instanceGroups.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupsListInstances.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, error) { +// *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 *InstanceGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27554,7 +27464,7 @@ func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*Ins if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupsListInstances{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27567,107 +27477,75 @@ func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*Ins return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupsListInstances) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type InstanceGroupsRemoveInstancesCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsGetCall struct { + s *Service + project string + zone string + instanceGroup string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RemoveInstances: Removes one or more instances from the specified instance -// group, but does not delete those instances. If the group is part of a -// backend service that has enabled connection draining, it can take up to 60 -// seconds after the connection draining duration before the VM instance is -// removed or deleted. +// Get: Returns the specified zonal instance group. Get a list of available +// zonal instance groups by making a list() request. For managed instance +// groups, use the instanceGroupManagers or regionInstanceGroupManagers methods +// instead. // -// - instanceGroup: The name of the instance group where the specified -// instances will be removed. -// - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { - c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroup: The name of the instance group. +// - project: Project ID for this request. +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) Get(project string, zone string, instanceGroup string) *InstanceGroupsGetCall { + c := &InstanceGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instanceGroup = instanceGroup - c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstanceGroupsRemoveInstancesCall) RequestId(requestId string) *InstanceGroupsRemoveInstancesCall { - 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 // details. -func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall { +func (c *InstanceGroupsGetCall) Fields(s ...googleapi.Field) *InstanceGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InstanceGroupsGetCall) IfNoneMatch(entityTag string) *InstanceGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall { +func (c *InstanceGroupsGetCall) Context(ctx context.Context) *InstanceGroupsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { +func (c *InstanceGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest) - if err != nil { - return nil, err +func (c *InstanceGroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -27680,12 +27558,12 @@ func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.removeInstances" call. +// Do executes the "compute.instanceGroups.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *InstanceGroup.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupsGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27704,7 +27582,7 @@ func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstanceGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27717,29 +27595,26 @@ func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type InstanceGroupsSetNamedPortsCall struct { - s *Service - project string - zone string - instanceGroup string - instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsInsertCall struct { + s *Service + project string + zone string + instancegroup *InstanceGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetNamedPorts: Sets the named ports for the specified instance group. +// Insert: Creates an instance group in the specified project using the +// parameters that are included in the request. // -// - instanceGroup: The name of the instance group where the named ports are -// updated. -// - project: Project ID for this request. -// - zone: The name of the zone where the instance group is located. -func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { - c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: The name of the zone where you want to create the instance group. +func (r *InstanceGroupsService) Insert(project string, zone string, instancegroup *InstanceGroup) *InstanceGroupsInsertCall { + c := &InstanceGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instanceGroup = instanceGroup - c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest + c.instancegroup = instancegroup return c } @@ -27753,7 +27628,7 @@ func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, insta // 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 *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceGroupsSetNamedPortsCall { +func (c *InstanceGroupsInsertCall) RequestId(requestId string) *InstanceGroupsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -27761,36 +27636,36 @@ func (c *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceG // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall { +func (c *InstanceGroupsInsertCall) Fields(s ...googleapi.Field) *InstanceGroupsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall { +func (c *InstanceGroupsInsertCall) Context(ctx context.Context) *InstanceGroupsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { +func (c *InstanceGroupsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroup) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -27798,19 +27673,18 @@ func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instanceGroup": c.instanceGroup, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceGroups.setNamedPorts" call. +// Do executes the "compute.instanceGroups.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27842,7 +27716,7 @@ func (c *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type InstanceSettingsGetCall struct { +type InstanceGroupsListCall struct { s *Service project string zone string @@ -27852,21 +27726,101 @@ type InstanceSettingsGetCall struct { header_ http.Header } -// Get: Get Instance settings. +// List: Retrieves the list of zonal instance group resources contained within +// the specified zone. For managed instance groups, use the +// instanceGroupManagers or regionInstanceGroupManagers methods instead. // // - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *InstanceSettingsService) Get(project string, zone string) *InstanceSettingsGetCall { - c := &InstanceSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) List(project string, zone string) *InstanceGroupsListCall { + c := &InstanceGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone return c } +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *InstanceGroupsListCall) Filter(filter string) *InstanceGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *InstanceGroupsListCall) MaxResults(maxResults int64) *InstanceGroupsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *InstanceGroupsListCall) OrderBy(orderBy string) *InstanceGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *InstanceGroupsListCall) PageToken(pageToken string) *InstanceGroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *InstanceGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceSettingsGetCall) Fields(s ...googleapi.Field) *InstanceSettingsGetCall { +func (c *InstanceGroupsListCall) Fields(s ...googleapi.Field) *InstanceGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -27874,27 +27828,27 @@ func (c *InstanceSettingsGetCall) Fields(s ...googleapi.Field) *InstanceSettings // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InstanceSettingsGetCall) IfNoneMatch(entityTag string) *InstanceSettingsGetCall { +func (c *InstanceGroupsListCall) IfNoneMatch(entityTag string) *InstanceGroupsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceSettingsGetCall) Context(ctx context.Context) *InstanceSettingsGetCall { +func (c *InstanceGroupsListCall) Context(ctx context.Context) *InstanceGroupsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceSettingsGetCall) Header() http.Header { +func (c *InstanceGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceSettingsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -27902,7 +27856,7 @@ func (c *InstanceSettingsGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceSettings") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -27916,13 +27870,13 @@ func (c *InstanceSettingsGetCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceSettings.get" call. +// Do executes the "compute.instanceGroups.list" call. // Any non-2xx status code is an error. Response headers are in either -// *InstanceSettings.ServerResponse.Header or (if a response was returned at +// *InstanceGroupList.ServerResponse.Header or (if a response was returned at // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *InstanceSettingsGetCall) Do(opts ...googleapi.CallOption) (*InstanceSettings, error) { +func (c *InstanceGroupsListCall) Do(opts ...googleapi.CallOption) (*InstanceGroupList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -27941,7 +27895,7 @@ func (c *InstanceSettingsGetCall) Do(opts ...googleapi.CallOption) (*InstanceSet if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceSettings{ + ret := &InstanceGroupList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -27954,211 +27908,100 @@ func (c *InstanceSettingsGetCall) Do(opts ...googleapi.CallOption) (*InstanceSet return ret, nil } -type InstanceSettingsPatchCall struct { - s *Service - project string - zone string - instancesettings *InstanceSettings - 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 *InstanceGroupsListCall) Pages(ctx context.Context, f func(*InstanceGroupList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Patch: Patch Instance settings +type InstanceGroupsListInstancesCall struct { + s *Service + project string + zone string + instanceGroup string + instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ListInstances: Lists the instances in the specified instance group. The +// orderBy query parameter is not supported. The filter query parameter is +// supported, but only for expressions that use `eq` (equal) or `ne` (not +// equal) operators. // -// - project: Project ID for this request. -// - zone: The zone scoping this request. It should conform to RFC1035. -func (r *InstanceSettingsService) Patch(project string, zone string, instancesettings *InstanceSettings) *InstanceSettingsPatchCall { - c := &InstanceSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroup: The name of the instance group from which you want to +// generate a list of included instances. +// - project: Project ID for this request. +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) ListInstances(project string, zone string, instanceGroup string, instancegroupslistinstancesrequest *InstanceGroupsListInstancesRequest) *InstanceGroupsListInstancesCall { + c := &InstanceGroupsListInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instancesettings = instancesettings + c.instanceGroup = instanceGroup + c.instancegroupslistinstancesrequest = instancegroupslistinstancesrequest return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstanceSettingsPatchCall) RequestId(requestId string) *InstanceSettingsPatchCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *InstanceGroupsListInstancesCall) Filter(filter string) *InstanceGroupsListInstancesCall { + c.urlParams_.Set("filter", filter) return c } -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *InstanceSettingsPatchCall) UpdateMask(updateMask string) *InstanceSettingsPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstanceSettingsPatchCall) Fields(s ...googleapi.Field) *InstanceSettingsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InstanceSettingsPatchCall) Context(ctx context.Context) *InstanceSettingsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstanceSettingsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstanceSettingsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesettings) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceSettings") - 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{ - "project": c.project, - "zone": c.zone, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.instanceSettings.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type InstanceTemplatesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves the list of all InstanceTemplates resources, -// regional and global, available to the specified project. To prevent failure, -// Google recommends that you set the `returnPartialSuccess` parameter to -// `true`. -// -// - project: Name of the project scoping this request. -func (r *InstanceTemplatesService) AggregatedList(project string) *InstanceTemplatesAggregatedListCall { - c := &InstanceTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *InstanceTemplatesAggregatedListCall) Filter(filter string) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *InstanceTemplatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceTemplatesAggregatedListCall) MaxResults(maxResults int64) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *InstanceGroupsListInstancesCall) MaxResults(maxResults int64) *InstanceGroupsListInstancesCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -28170,7 +28013,7 @@ func (c *InstanceTemplatesAggregatedListCall) MaxResults(maxResults int64) *Inst // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *InstanceTemplatesAggregatedListCall) OrderBy(orderBy string) *InstanceTemplatesAggregatedListCall { +func (c *InstanceGroupsListInstancesCall) OrderBy(orderBy string) *InstanceGroupsListInstancesCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -28178,7 +28021,7 @@ func (c *InstanceTemplatesAggregatedListCall) OrderBy(orderBy string) *InstanceT // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *InstanceTemplatesAggregatedListCall) PageToken(pageToken string) *InstanceTemplatesAggregatedListCall { +func (c *InstanceGroupsListInstancesCall) PageToken(pageToken string) *InstanceGroupsListInstancesCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -28188,78 +28031,65 @@ func (c *InstanceTemplatesAggregatedListCall) PageToken(pageToken string) *Insta // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *InstanceTemplatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesAggregatedListCall { +func (c *InstanceGroupsListInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceGroupsListInstancesCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *InstanceTemplatesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstanceTemplatesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceTemplatesAggregatedListCall) Fields(s ...googleapi.Field) *InstanceTemplatesAggregatedListCall { +func (c *InstanceGroupsListInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsListInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstanceTemplatesAggregatedListCall) IfNoneMatch(entityTag string) *InstanceTemplatesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesAggregatedListCall) Context(ctx context.Context) *InstanceTemplatesAggregatedListCall { +func (c *InstanceGroupsListInstancesCall) Context(ctx context.Context) *InstanceGroupsListInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceTemplatesAggregatedListCall) Header() http.Header { +func (c *InstanceGroupsListInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InstanceGroupsListInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupslistinstancesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/listInstances") 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{ - "project": c.project, + "project": c.project, + "zone": c.zone, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.aggregatedList" call. +// Do executes the "compute.instanceGroups.listInstances" call. // Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplateAggregatedList.ServerResponse.Header or (if a response was +// *InstanceGroupsListInstances.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstanceTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateAggregatedList, error) { +func (c *InstanceGroupsListInstancesCall) Do(opts ...googleapi.CallOption) (*InstanceGroupsListInstances, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28278,7 +28108,7 @@ func (c *InstanceTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceTemplateAggregatedList{ + ret := &InstanceGroupsListInstances{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28294,7 +28124,7 @@ func (c *InstanceTemplatesAggregatedListCall) 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 *InstanceTemplatesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceTemplateAggregatedList) error) error { +func (c *InstanceGroupsListInstancesCall) Pages(ctx context.Context, f func(*InstanceGroupsListInstances) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -28312,25 +28142,33 @@ func (c *InstanceTemplatesAggregatedListCall) Pages(ctx context.Context, f func( } } -type InstanceTemplatesDeleteCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceGroupsRemoveInstancesCall struct { + s *Service + project string + zone string + instanceGroup string + instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified instance template. Deleting an instance -// template is permanent and cannot be undone. It is not possible to delete -// templates that are already in use by a managed instance group. +// RemoveInstances: Removes one or more instances from the specified instance +// group, but does not delete those instances. If the group is part of a +// backend service that has enabled connection draining, it can take up to 60 +// seconds after the connection draining duration before the VM instance is +// removed or deleted. // -// - instanceTemplate: The name of the instance template to delete. -// - project: Project ID for this request. -func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { - c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroup: The name of the instance group where the specified +// instances will be removed. +// - project: Project ID for this request. +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) RemoveInstances(project string, zone string, instanceGroup string, instancegroupsremoveinstancesrequest *InstanceGroupsRemoveInstancesRequest) *InstanceGroupsRemoveInstancesCall { + c := &InstanceGroupsRemoveInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.instanceTemplate = instanceTemplate + c.zone = zone + c.instanceGroup = instanceGroup + c.instancegroupsremoveinstancesrequest = instancegroupsremoveinstancesrequest return c } @@ -28344,7 +28182,7 @@ func (r *InstanceTemplatesService) Delete(project string, instanceTemplate strin // 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 *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTemplatesDeleteCall { +func (c *InstanceGroupsRemoveInstancesCall) RequestId(requestId string) *InstanceGroupsRemoveInstancesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -28352,51 +28190,56 @@ func (c *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTempl // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall { +func (c *InstanceGroupsRemoveInstancesCall) Fields(s ...googleapi.Field) *InstanceGroupsRemoveInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall { +func (c *InstanceGroupsRemoveInstancesCall) Context(ctx context.Context) *InstanceGroupsRemoveInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceTemplatesDeleteCall) Header() http.Header { +func (c *InstanceGroupsRemoveInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InstanceGroupsRemoveInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupsremoveinstancesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/removeInstances") 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{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, + "project": c.project, + "zone": c.zone, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.delete" call. +// Do executes the "compute.instanceGroups.removeInstances" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceGroupsRemoveInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28428,87 +28271,100 @@ func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operati return ret, nil } -type InstanceTemplatesGetCall struct { - s *Service - project string - instanceTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstanceGroupsSetNamedPortsCall struct { + s *Service + project string + zone string + instanceGroup string + instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified instance template. +// SetNamedPorts: Sets the named ports for the specified instance group. // -// - instanceTemplate: The name of the instance template. -// - project: Project ID for this request. -func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { - c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroup: The name of the instance group where the named ports are +// updated. +// - project: Project ID for this request. +// - zone: The name of the zone where the instance group is located. +func (r *InstanceGroupsService) SetNamedPorts(project string, zone string, instanceGroup string, instancegroupssetnamedportsrequest *InstanceGroupsSetNamedPortsRequest) *InstanceGroupsSetNamedPortsCall { + c := &InstanceGroupsSetNamedPortsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.instanceTemplate = instanceTemplate + c.zone = zone + c.instanceGroup = instanceGroup + c.instancegroupssetnamedportsrequest = instancegroupssetnamedportsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstanceGroupsSetNamedPortsCall) RequestId(requestId string) *InstanceGroupsSetNamedPortsCall { + 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 // details. -func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall { +func (c *InstanceGroupsSetNamedPortsCall) Fields(s ...googleapi.Field) *InstanceGroupsSetNamedPortsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall { +func (c *InstanceGroupsSetNamedPortsCall) Context(ctx context.Context) *InstanceGroupsSetNamedPortsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceTemplatesGetCall) Header() http.Header { +func (c *InstanceGroupsSetNamedPortsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InstanceGroupsSetNamedPortsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupssetnamedportsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceGroups/{instanceGroup}/setNamedPorts") 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{ - "project": c.project, - "instanceTemplate": c.instanceTemplate, + "project": c.project, + "zone": c.zone, + "instanceGroup": c.instanceGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.get" call. +// Do executes the "compute.instanceGroups.setNamedPorts" call. // Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplate.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) { +// *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 *InstanceGroupsSetNamedPortsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28527,7 +28383,7 @@ func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceTemplate{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28540,39 +28396,31 @@ func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTe return ret, nil } -type InstanceTemplatesGetIamPolicyCall struct { +type InstanceSettingsGetCall struct { s *Service project string - resource string + zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// Get: Get Instance settings. // // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) *InstanceTemplatesGetIamPolicyCall { - c := &InstanceTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: Name of the zone for this request. +func (r *InstanceSettingsService) Get(project string, zone string) *InstanceSettingsGetCall { + c := &InstanceSettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstanceTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstanceTemplatesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.zone = zone return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetIamPolicyCall { +func (c *InstanceSettingsGetCall) Fields(s ...googleapi.Field) *InstanceSettingsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28580,27 +28428,27 @@ func (c *InstanceTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *Instan // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InstanceTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetIamPolicyCall { +func (c *InstanceSettingsGetCall) IfNoneMatch(entityTag string) *InstanceSettingsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesGetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesGetIamPolicyCall { +func (c *InstanceSettingsGetCall) Context(ctx context.Context) *InstanceSettingsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceTemplatesGetIamPolicyCall) Header() http.Header { +func (c *InstanceSettingsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceSettingsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28608,7 +28456,7 @@ func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Respons var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceSettings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28616,18 +28464,19 @@ func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.getIamPolicy" call. +// Do executes the "compute.instanceSettings.get" call. // 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 *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *InstanceSettings.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InstanceSettingsGetCall) Do(opts ...googleapi.CallOption) (*InstanceSettings, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28646,7 +28495,7 @@ func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &InstanceSettings{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28659,26 +28508,25 @@ func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P return ret, nil } -type InstanceTemplatesInsertCall struct { +type InstanceSettingsPatchCall struct { s *Service project string - instancetemplate *InstanceTemplate + zone string + instancesettings *InstanceSettings urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Creates an instance template in the specified project using the data -// that is included in the request. If you are creating a new template to -// update an existing instance group, your new instance template must use the -// same network or, if applicable, the same subnetwork as the original -// template. +// Patch: Patch Instance settings // // - project: Project ID for this request. -func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { - c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The zone scoping this request. It should conform to RFC1035. +func (r *InstanceSettingsService) Patch(project string, zone string, instancesettings *InstanceSettings) *InstanceSettingsPatchCall { + c := &InstanceSettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.instancetemplate = instancetemplate + c.zone = zone + c.instancesettings = instancesettings return c } @@ -28692,62 +28540,70 @@ func (r *InstanceTemplatesService) Insert(project string, instancetemplate *Inst // 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 *InstanceTemplatesInsertCall) RequestId(requestId string) *InstanceTemplatesInsertCall { +func (c *InstanceSettingsPatchCall) RequestId(requestId string) *InstanceSettingsPatchCall { c.urlParams_.Set("requestId", requestId) return c } +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *InstanceSettingsPatchCall) UpdateMask(updateMask string) *InstanceSettingsPatchCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall { +func (c *InstanceSettingsPatchCall) Fields(s ...googleapi.Field) *InstanceSettingsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall { +func (c *InstanceSettingsPatchCall) Context(ctx context.Context) *InstanceSettingsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceTemplatesInsertCall) Header() http.Header { +func (c *InstanceSettingsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceSettingsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesettings) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instanceSettings") 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{ "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.insert" call. +// Do executes the "compute.instanceSettings.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceSettingsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28779,7 +28635,7 @@ func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operati return ret, nil } -type InstanceTemplatesListCall struct { +type InstanceTemplatesAggregatedListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -28788,12 +28644,14 @@ type InstanceTemplatesListCall struct { header_ http.Header } -// List: Retrieves a list of instance templates that are contained within the -// specified project. +// AggregatedList: Retrieves the list of all InstanceTemplates resources, +// regional and global, available to the specified project. To prevent failure, +// Google recommends that you set the `returnPartialSuccess` parameter to +// `true`. // -// - project: Project ID for this request. -func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { - c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *InstanceTemplatesService) AggregatedList(project string) *InstanceTemplatesAggregatedListCall { + c := &InstanceTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -28830,17 +28688,30 @@ func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCa // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { +func (c *InstanceTemplatesAggregatedListCall) Filter(filter string) *InstanceTemplatesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *InstanceTemplatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstanceTemplatesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { +func (c *InstanceTemplatesAggregatedListCall) MaxResults(maxResults int64) *InstanceTemplatesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -28853,7 +28724,7 @@ func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTempla // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesListCall { +func (c *InstanceTemplatesAggregatedListCall) OrderBy(orderBy string) *InstanceTemplatesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -28861,7 +28732,7 @@ func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesLi // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall { +func (c *InstanceTemplatesAggregatedListCall) PageToken(pageToken string) *InstanceTemplatesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -28871,15 +28742,23 @@ func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplat // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *InstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesListCall { +func (c *InstanceTemplatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *InstanceTemplatesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstanceTemplatesAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall { +func (c *InstanceTemplatesAggregatedListCall) Fields(s ...googleapi.Field) *InstanceTemplatesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -28887,27 +28766,27 @@ func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTempla // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall { +func (c *InstanceTemplatesAggregatedListCall) IfNoneMatch(entityTag string) *InstanceTemplatesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall { +func (c *InstanceTemplatesAggregatedListCall) Context(ctx context.Context) *InstanceTemplatesAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceTemplatesListCall) Header() http.Header { +func (c *InstanceTemplatesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -28915,7 +28794,7 @@ func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instanceTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -28928,13 +28807,13 @@ func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.list" call. +// Do executes the "compute.instanceTemplates.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *InstanceTemplateList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) { +// *InstanceTemplateAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -28953,7 +28832,7 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceTemplateList{ + ret := &InstanceTemplateAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -28969,7 +28848,7 @@ func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceT // 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 *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { +func (c *InstanceTemplatesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceTemplateAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -28987,81 +28866,91 @@ func (c *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceT } } -type InstanceTemplatesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceTemplatesDeleteCall struct { + s *Service + project string + instanceTemplate string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. +// Delete: Deletes the specified instance template. Deleting an instance +// template is permanent and cannot be undone. It is not possible to delete +// templates that are already in use by a managed instance group. // +// - instanceTemplate: The name of the instance template to delete. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InstanceTemplatesSetIamPolicyCall { - c := &InstanceTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstanceTemplatesService) Delete(project string, instanceTemplate string) *InstanceTemplatesDeleteCall { + c := &InstanceTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest + c.instanceTemplate = instanceTemplate + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstanceTemplatesDeleteCall) RequestId(requestId string) *InstanceTemplatesDeleteCall { + 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 // details. -func (c *InstanceTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesSetIamPolicyCall { +func (c *InstanceTemplatesDeleteCall) Fields(s ...googleapi.Field) *InstanceTemplatesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesSetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesSetIamPolicyCall { +func (c *InstanceTemplatesDeleteCall) Context(ctx context.Context) *InstanceTemplatesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceTemplatesSetIamPolicyCall) Header() http.Header { +func (c *InstanceTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstanceTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "instanceTemplate": c.instanceTemplate, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.setIamPolicy" call. +// Do executes the "compute.instanceTemplates.delete" call. // 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 +// *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 *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *InstanceTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29080,7 +28969,7 @@ func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P 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, @@ -29093,82 +28982,87 @@ func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*P return ret, nil } -type InstanceTemplatesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceTemplatesGetCall struct { + s *Service + project string + instanceTemplate string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// Get: Returns the specified instance template. // +// - instanceTemplate: The name of the instance template. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall { - c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstanceTemplatesService) Get(project string, instanceTemplate string) *InstanceTemplatesGetCall { + c := &InstanceTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.instanceTemplate = instanceTemplate return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstanceTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceTemplatesTestIamPermissionsCall { +func (c *InstanceTemplatesGetCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InstanceTemplatesGetCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *InstanceTemplatesTestIamPermissionsCall) Context(ctx context.Context) *InstanceTemplatesTestIamPermissionsCall { +func (c *InstanceTemplatesGetCall) Context(ctx context.Context) *InstanceTemplatesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header { +func (c *InstanceTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err +func (c *InstanceTemplatesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{instanceTemplate}") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "instanceTemplate": c.instanceTemplate, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instanceTemplates.testIamPermissions" call. +// Do executes the "compute.instanceTemplates.get" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *InstanceTemplate.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InstanceTemplatesGetCall) Do(opts ...googleapi.CallOption) (*InstanceTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29187,7 +29081,7 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &InstanceTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29200,102 +29094,94 @@ func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOptio return ret, nil } -type InstancesAddAccessConfigCall struct { +type InstanceTemplatesGetIamPolicyCall struct { s *Service project string - zone string - instance string - accessconfig *AccessConfig + resource string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AddAccessConfig: Adds an access config to an instance's network interface. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. // -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface to add to this -// instance. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { - c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +func (r *InstanceTemplatesService) GetIamPolicy(project string, resource string) *InstanceTemplatesGetIamPolicyCall { + c := &InstanceTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig + c.resource = resource return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesAddAccessConfigCall) RequestId(requestId string) *InstancesAddAccessConfigCall { - c.urlParams_.Set("requestId", requestId) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InstanceTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstanceTemplatesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 // details. -func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall { +func (c *InstanceTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InstanceTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstanceTemplatesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall { +func (c *InstanceTemplatesGetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesAddAccessConfigCall) Header() http.Header { +func (c *InstanceTemplatesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) - if err != nil { - return nil, err +func (c *InstanceTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{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{ "project": c.project, - "zone": c.zone, - "instance": c.instance, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.addAccessConfig" call. +// Do executes the "compute.instanceTemplates.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29314,7 +29200,7 @@ func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operat 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, @@ -29327,30 +29213,26 @@ func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operat return ret, nil } -type InstancesAddResourcePoliciesCall struct { - s *Service - project string - zone string - instance string - instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceTemplatesInsertCall struct { + s *Service + project string + instancetemplate *InstanceTemplate + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddResourcePolicies: Adds existing resource policies to an instance. You can -// only add one policy right now which will be applied to this instance for -// scheduling live migrations. +// Insert: Creates an instance template in the specified project using the data +// that is included in the request. If you are creating a new template to +// update an existing instance group, your new instance template must use the +// same network or, if applicable, the same subnetwork as the original +// template. // -// - instance: The instance name for this request. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AddResourcePolicies(project string, zone string, instance string, instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest) *InstancesAddResourcePoliciesCall { - c := &InstancesAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstanceTemplatesService) Insert(project string, instancetemplate *InstanceTemplate) *InstanceTemplatesInsertCall { + c := &InstanceTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instance = instance - c.instancesaddresourcepoliciesrequest = instancesaddresourcepoliciesrequest + c.instancetemplate = instancetemplate return c } @@ -29364,7 +29246,7 @@ func (r *InstancesService) AddResourcePolicies(project string, zone string, inst // 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 *InstancesAddResourcePoliciesCall) RequestId(requestId string) *InstancesAddResourcePoliciesCall { +func (c *InstanceTemplatesInsertCall) RequestId(requestId string) *InstanceTemplatesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -29372,36 +29254,36 @@ func (c *InstancesAddResourcePoliciesCall) RequestId(requestId string) *Instance // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesAddResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesAddResourcePoliciesCall { +func (c *InstanceTemplatesInsertCall) Fields(s ...googleapi.Field) *InstanceTemplatesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesAddResourcePoliciesCall) Context(ctx context.Context) *InstancesAddResourcePoliciesCall { +func (c *InstanceTemplatesInsertCall) Context(ctx context.Context) *InstanceTemplatesInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesAddResourcePoliciesCall) Header() http.Header { +func (c *InstanceTemplatesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesaddresourcepoliciesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancetemplate) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29409,19 +29291,17 @@ func (c *InstancesAddResourcePoliciesCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.addResourcePolicies" call. +// Do executes the "compute.instanceTemplates.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29453,7 +29333,7 @@ func (c *InstancesAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Op return ret, nil } -type InstancesAggregatedListCall struct { +type InstanceTemplatesListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -29462,15 +29342,12 @@ type InstancesAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves an aggregated list of all of the instances in your -// project across all regions and zones. The performance of this method -// degrades when a filter is specified on a project that has a very large -// number of instances. To prevent failure, Google recommends that you set the -// `returnPartialSuccess` parameter to `true`. +// List: Retrieves a list of instance templates that are contained within the +// specified project. // // - project: Project ID for this request. -func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { - c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstanceTemplatesService) List(project string) *InstanceTemplatesListCall { + c := &InstanceTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -29507,30 +29384,17 @@ func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedLi // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall { +func (c *InstanceTemplatesListCall) Filter(filter string) *InstanceTemplatesListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *InstancesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstancesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall { +func (c *InstanceTemplatesListCall) MaxResults(maxResults int64) *InstanceTemplatesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -29543,7 +29407,7 @@ func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAgg // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregatedListCall { +func (c *InstanceTemplatesListCall) OrderBy(orderBy string) *InstanceTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -29551,7 +29415,7 @@ func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregat // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall { +func (c *InstanceTemplatesListCall) PageToken(pageToken string) *InstanceTemplatesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -29561,23 +29425,15 @@ func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggr // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *InstancesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesAggregatedListCall { +func (c *InstanceTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstanceTemplatesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *InstancesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstancesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall { +func (c *InstanceTemplatesListCall) Fields(s ...googleapi.Field) *InstanceTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -29585,27 +29441,27 @@ func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAgg // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall { +func (c *InstanceTemplatesListCall) IfNoneMatch(entityTag string) *InstanceTemplatesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall { +func (c *InstanceTemplatesListCall) Context(ctx context.Context) *InstanceTemplatesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesAggregatedListCall) Header() http.Header { +func (c *InstanceTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -29613,7 +29469,7 @@ func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, err var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -29626,13 +29482,13 @@ func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.aggregatedList" call. +// Do executes the "compute.instanceTemplates.list" call. // Any non-2xx status code is an error. Response headers are in either -// *InstanceAggregatedList.ServerResponse.Header or (if a response was returned +// *InstanceTemplateList.ServerResponse.Header or (if a response was returned // at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, error) { +func (c *InstanceTemplatesListCall) Do(opts ...googleapi.CallOption) (*InstanceTemplateList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29651,7 +29507,7 @@ func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Instanc if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceAggregatedList{ + ret := &InstanceTemplateList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29667,7 +29523,7 @@ func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Instanc // 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 *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error { +func (c *InstanceTemplatesListCall) Pages(ctx context.Context, f func(*InstanceTemplateList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -29685,91 +29541,62 @@ func (c *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*Instanc } } -type InstancesAttachDiskCall struct { - s *Service - project string - zone string - instance string - attacheddisk *AttachedDisk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceTemplatesSetIamPolicyCall struct { + s *Service + project string + resource string + globalsetpolicyrequest *GlobalSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AttachDisk: Attaches an existing Disk resource to an instance. You must -// first create the disk before you can attach it. It is not possible to create -// and attach a disk at the same time. For more information, read Adding a -// persistent disk to your instance. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. // -// - instance: The instance name for this request. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { - c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *InstanceTemplatesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *InstanceTemplatesSetIamPolicyCall { + c := &InstanceTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instance = instance - c.attacheddisk = attacheddisk - return c -} - -// ForceAttach sets the optional parameter "forceAttach": Whether to force -// attach the regional disk even if it's currently attached to another -// instance. If you try to force attach a zonal disk to an instance, you will -// receive an error. -func (c *InstancesAttachDiskCall) ForceAttach(forceAttach bool) *InstancesAttachDiskCall { - c.urlParams_.Set("forceAttach", fmt.Sprint(forceAttach)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesAttachDiskCall) RequestId(requestId string) *InstancesAttachDiskCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.globalsetpolicyrequest = globalsetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall { +func (c *InstanceTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstanceTemplatesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall { +func (c *InstanceTemplatesSetIamPolicyCall) Context(ctx context.Context) *InstanceTemplatesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesAttachDiskCall) Header() http.Header { +func (c *InstanceTemplatesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/attachDisk") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29778,18 +29605,17 @@ func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, - "instance": c.instance, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.attachDisk" call. +// Do executes the "compute.instanceTemplates.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstanceTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29808,7 +29634,7 @@ func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, 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, @@ -29821,77 +29647,62 @@ func (c *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type InstancesBulkInsertCall struct { - s *Service - project string - zone string - bulkinsertinstanceresource *BulkInsertInstanceResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstanceTemplatesTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BulkInsert: Creates multiple instances. Count specifies the number of -// instances to create. For more information, see About bulk creation of VMs. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) BulkInsert(project string, zone string, bulkinsertinstanceresource *BulkInsertInstanceResource) *InstancesBulkInsertCall { - c := &InstancesBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *InstanceTemplatesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstanceTemplatesTestIamPermissionsCall { + c := &InstanceTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.bulkinsertinstanceresource = bulkinsertinstanceresource - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesBulkInsertCall) RequestId(requestId string) *InstancesBulkInsertCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesBulkInsertCall) Fields(s ...googleapi.Field) *InstancesBulkInsertCall { +func (c *InstanceTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstanceTemplatesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesBulkInsertCall) Context(ctx context.Context) *InstancesBulkInsertCall { +func (c *InstanceTemplatesTestIamPermissionsCall) Context(ctx context.Context) *InstanceTemplatesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesBulkInsertCall) Header() http.Header { +func (c *InstanceTemplatesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesBulkInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *InstanceTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkinsertinstanceresource) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/bulkInsert") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/instanceTemplates/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -29899,18 +29710,19 @@ func (c *InstancesBulkInsertCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.bulkInsert" call. +// Do executes the "compute.instanceTemplates.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstanceTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -29929,7 +29741,7 @@ func (c *InstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -29942,27 +29754,31 @@ func (c *InstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type InstancesDeleteCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesAddAccessConfigCall struct { + s *Service + project string + zone string + instance string + accessconfig *AccessConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified Instance resource. For more information, see -// Deleting an instance. +// AddAccessConfig: Adds an access config to an instance's network interface. // -// - instance: Name of the instance resource to delete. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { - c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: The instance name for this request. +// - networkInterface: The name of the network interface to add to this +// instance. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) AddAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesAddAccessConfigCall { + c := &InstancesAddAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.urlParams_.Set("networkInterface", networkInterface) + c.accessconfig = accessconfig return c } @@ -29976,7 +29792,7 @@ func (r *InstancesService) Delete(project string, zone string, instance string) // 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 *InstancesDeleteCall) RequestId(requestId string) *InstancesDeleteCall { +func (c *InstancesAddAccessConfigCall) RequestId(requestId string) *InstancesAddAccessConfigCall { c.urlParams_.Set("requestId", requestId) return c } @@ -29984,34 +29800,38 @@ func (c *InstancesDeleteCall) RequestId(requestId string) *InstancesDeleteCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { +func (c *InstancesAddAccessConfigCall) Fields(s ...googleapi.Field) *InstancesAddAccessConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall { +func (c *InstancesAddAccessConfigCall) Context(ctx context.Context) *InstancesAddAccessConfigCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesDeleteCall) Header() http.Header { +func (c *InstancesAddAccessConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InstancesAddAccessConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addAccessConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -30024,12 +29844,12 @@ func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.delete" call. +// Do executes the "compute.instances.addAccessConfig" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesAddAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30061,31 +29881,30 @@ func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, erro return ret, nil } -type InstancesDeleteAccessConfigCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesAddResourcePoliciesCall struct { + s *Service + project string + zone string + instance string + instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DeleteAccessConfig: Deletes an access config from an instance's network -// interface. +// AddResourcePolicies: Adds existing resource policies to an instance. You can +// only add one policy right now which will be applied to this instance for +// scheduling live migrations. // -// - accessConfig: The name of the access config to delete. // - instance: The instance name for this request. -// - networkInterface: The name of the network interface. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { - c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) AddResourcePolicies(project string, zone string, instance string, instancesaddresourcepoliciesrequest *InstancesAddResourcePoliciesRequest) *InstancesAddResourcePoliciesCall { + c := &InstancesAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.urlParams_.Set("accessConfig", accessConfig) - c.urlParams_.Set("networkInterface", networkInterface) + c.instancesaddresourcepoliciesrequest = instancesaddresourcepoliciesrequest return c } @@ -30099,7 +29918,7 @@ func (r *InstancesService) DeleteAccessConfig(project string, zone string, insta // 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 *InstancesDeleteAccessConfigCall) RequestId(requestId string) *InstancesDeleteAccessConfigCall { +func (c *InstancesAddResourcePoliciesCall) RequestId(requestId string) *InstancesAddResourcePoliciesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -30107,32 +29926,36 @@ func (c *InstancesDeleteAccessConfigCall) RequestId(requestId string) *Instances // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall { +func (c *InstancesAddResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesAddResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall { +func (c *InstancesAddResourcePoliciesCall) Context(ctx context.Context) *InstancesAddResourcePoliciesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesDeleteAccessConfigCall) Header() http.Header { +func (c *InstancesAddResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InstancesAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesaddresourcepoliciesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/addResourcePolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -30147,12 +29970,12 @@ func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.deleteAccessConfig" call. +// Do executes the "compute.instances.addResourcePolicies" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30184,155 +30007,131 @@ func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type InstancesDetachDiskCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DetachDisk: Detaches a disk from an instance. +// AggregatedList: Retrieves an aggregated list of all of the instances in your +// project across all regions and zones. The performance of this method +// degrades when a filter is specified on a project that has a very large +// number of instances. To prevent failure, Google recommends that you set the +// `returnPartialSuccess` parameter to `true`. // -// - deviceName: The device name of the disk to detach. Make a get() request on -// the instance to view currently attached disks and device names. -// - instance: Instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { - c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *InstancesService) AggregatedList(project string) *InstancesAggregatedListCall { + c := &InstancesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.instance = instance - c.urlParams_.Set("deviceName", deviceName) return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesDetachDiskCall) RequestId(requestId string) *InstancesDetachDiskCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *InstancesAggregatedListCall) Filter(filter string) *InstancesAggregatedListCall { + c.urlParams_.Set("filter", filter) return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *InstancesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstancesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) return c } -// Context sets the context to be used in this call's Do method. -func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall { - c.ctx_ = ctx +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *InstancesAggregatedListCall) MaxResults(maxResults int64) *InstancesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InstancesDetachDiskCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/detachDisk") - 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *InstancesAggregatedListCall) OrderBy(orderBy string) *InstancesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// Do executes the "compute.instances.detachDisk" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesDetachDiskCall) 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 +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *InstancesAggregatedListCall) PageToken(pageToken string) *InstancesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -type InstancesGetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *InstancesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c } -// Get: Returns the specified Instance resource. -// -// - instance: Name of the instance resource to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { - c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.instance = instance +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *InstancesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstancesAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { +func (c *InstancesAggregatedListCall) Fields(s ...googleapi.Field) *InstancesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -30340,27 +30139,27 @@ func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall { +func (c *InstancesAggregatedListCall) IfNoneMatch(entityTag string) *InstancesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { +func (c *InstancesAggregatedListCall) Context(ctx context.Context) *InstancesAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesGetCall) Header() http.Header { +func (c *InstancesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -30368,7 +30167,7 @@ func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -30376,19 +30175,18 @@ func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.get" call. +// Do executes the "compute.instances.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *Instance.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { +// *InstanceAggregatedList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InstancesAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstanceAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30407,7 +30205,7 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Instance{ + ret := &InstanceAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30420,76 +30218,114 @@ func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { return ret, nil } -type InstancesGetEffectiveFirewallsCall struct { +// 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 *InstancesAggregatedListCall) Pages(ctx context.Context, f func(*InstanceAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type InstancesAttachDiskCall struct { s *Service project string zone string instance string + attacheddisk *AttachedDisk urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetEffectiveFirewalls: Returns effective firewalls applied to an interface -// of the instance. +// AttachDisk: Attaches an existing Disk resource to an instance. You must +// first create the disk before you can attach it. It is not possible to create +// and attach a disk at the same time. For more information, read Adding a +// persistent disk to your instance. // -// - instance: Name of the instance scoping this request. -// - networkInterface: The name of the network interface to get the effective -// firewalls. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetEffectiveFirewalls(project string, zone string, instance string, networkInterface string) *InstancesGetEffectiveFirewallsCall { - c := &InstancesGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: The instance name for this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) AttachDisk(project string, zone string, instance string, attacheddisk *AttachedDisk) *InstancesAttachDiskCall { + c := &InstancesAttachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) + c.attacheddisk = attacheddisk + return c +} + +// ForceAttach sets the optional parameter "forceAttach": Whether to force +// attach the regional disk even if it's currently attached to another +// instance. If you try to force attach a zonal disk to an instance, you will +// receive an error. +func (c *InstancesAttachDiskCall) ForceAttach(forceAttach bool) *InstancesAttachDiskCall { + c.urlParams_.Set("forceAttach", fmt.Sprint(forceAttach)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesAttachDiskCall) RequestId(requestId string) *InstancesAttachDiskCall { + 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 // details. -func (c *InstancesGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *InstancesGetEffectiveFirewallsCall { +func (c *InstancesAttachDiskCall) Fields(s ...googleapi.Field) *InstancesAttachDiskCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstancesGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *InstancesGetEffectiveFirewallsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InstancesGetEffectiveFirewallsCall) Context(ctx context.Context) *InstancesGetEffectiveFirewallsCall { +func (c *InstancesAttachDiskCall) Context(ctx context.Context) *InstancesAttachDiskCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesGetEffectiveFirewallsCall) Header() http.Header { +func (c *InstancesAttachDiskCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InstancesAttachDiskCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.attacheddisk) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/attachDisk") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -30502,13 +30338,12 @@ func (c *InstancesGetEffectiveFirewallsCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.getEffectiveFirewalls" call. +// Do executes the "compute.instances.attachDisk" call. // Any non-2xx status code is an error. Response headers are in either -// *InstancesGetEffectiveFirewallsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*InstancesGetEffectiveFirewallsResponse, error) { +// *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 *InstancesAttachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30527,7 +30362,7 @@ func (c *InstancesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstancesGetEffectiveFirewallsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30540,105 +30375,96 @@ func (c *InstancesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type InstancesGetGuestAttributesCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesBulkInsertCall struct { + s *Service + project string + zone string + bulkinsertinstanceresource *BulkInsertInstanceResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetGuestAttributes: Returns the specified guest attributes entry. +// BulkInsert: Creates multiple instances. Count specifies the number of +// instances to create. For more information, see About bulk creation of VMs. // -// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) GetGuestAttributes(project string, zone string, instance string) *InstancesGetGuestAttributesCall { - c := &InstancesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) BulkInsert(project string, zone string, bulkinsertinstanceresource *BulkInsertInstanceResource) *InstancesBulkInsertCall { + c := &InstancesBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - return c -} - -// QueryPath sets the optional parameter "queryPath": Specifies the guest -// attributes path to be queried. -func (c *InstancesGetGuestAttributesCall) QueryPath(queryPath string) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("queryPath", queryPath) + c.bulkinsertinstanceresource = bulkinsertinstanceresource return c } -// VariableKey sets the optional parameter "variableKey": Specifies the key for -// the guest attributes entry. -func (c *InstancesGetGuestAttributesCall) VariableKey(variableKey string) *InstancesGetGuestAttributesCall { - c.urlParams_.Set("variableKey", variableKey) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesBulkInsertCall) RequestId(requestId string) *InstancesBulkInsertCall { + 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 // details. -func (c *InstancesGetGuestAttributesCall) Fields(s ...googleapi.Field) *InstancesGetGuestAttributesCall { +func (c *InstancesBulkInsertCall) Fields(s ...googleapi.Field) *InstancesBulkInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstancesGetGuestAttributesCall) IfNoneMatch(entityTag string) *InstancesGetGuestAttributesCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InstancesGetGuestAttributesCall) Context(ctx context.Context) *InstancesGetGuestAttributesCall { +func (c *InstancesBulkInsertCall) Context(ctx context.Context) *InstancesBulkInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesGetGuestAttributesCall) Header() http.Header { +func (c *InstancesBulkInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InstancesBulkInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkinsertinstanceresource) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/bulkInsert") 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.getGuestAttributes" call. +// Do executes the "compute.instances.bulkInsert" call. // Any non-2xx status code is an error. Response headers are in either -// *GuestAttributes.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*GuestAttributes, error) { +// *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 *InstancesBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30657,7 +30483,7 @@ func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*Gue if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &GuestAttributes{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30670,80 +30496,76 @@ func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*Gue return ret, nil } -type InstancesGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesDeleteCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// Delete: Deletes the specified Instance resource. For more information, see +// Deleting an instance. // +// - instance: Name of the instance resource to delete. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) GetIamPolicy(project string, zone string, resource string) *InstancesGetIamPolicyCall { - c := &InstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Delete(project string, zone string, instance string) *InstancesDeleteCall { + c := &InstancesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource + c.instance = instance return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstancesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesDeleteCall) RequestId(requestId string) *InstancesDeleteCall { + 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 // details. -func (c *InstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesGetIamPolicyCall { +func (c *InstancesDeleteCall) Fields(s ...googleapi.Field) *InstancesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstancesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InstancesGetIamPolicyCall) Context(ctx context.Context) *InstancesGetIamPolicyCall { +func (c *InstancesDeleteCall) Context(ctx context.Context) *InstancesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesGetIamPolicyCall) Header() http.Header { +func (c *InstancesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -30751,17 +30573,17 @@ func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "resource": c.resource, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.getIamPolicy" call. +// Do executes the "compute.instances.delete" call. // 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 +// *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 *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *InstancesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30780,7 +30602,7 @@ func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e 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, @@ -30793,72 +30615,80 @@ func (c *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e return ret, nil } -type InstancesGetScreenshotCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesDeleteAccessConfigCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetScreenshot: Returns the screenshot from the specified instance. +// DeleteAccessConfig: Deletes an access config from an instance's network +// interface. // -// - instance: Name of the instance scoping this request. +// - accessConfig: The name of the access config to delete. +// - instance: The instance name for this request. +// - networkInterface: The name of the network interface. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) GetScreenshot(project string, zone string, instance string) *InstancesGetScreenshotCall { - c := &InstancesGetScreenshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) DeleteAccessConfig(project string, zone string, instance string, accessConfig string, networkInterface string) *InstancesDeleteAccessConfigCall { + c := &InstancesDeleteAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.urlParams_.Set("accessConfig", accessConfig) + c.urlParams_.Set("networkInterface", networkInterface) + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesDeleteAccessConfigCall) RequestId(requestId string) *InstancesDeleteAccessConfigCall { + 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 // details. -func (c *InstancesGetScreenshotCall) Fields(s ...googleapi.Field) *InstancesGetScreenshotCall { +func (c *InstancesDeleteAccessConfigCall) Fields(s ...googleapi.Field) *InstancesDeleteAccessConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstancesGetScreenshotCall) IfNoneMatch(entityTag string) *InstancesGetScreenshotCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InstancesGetScreenshotCall) Context(ctx context.Context) *InstancesGetScreenshotCall { +func (c *InstancesDeleteAccessConfigCall) Context(ctx context.Context) *InstancesDeleteAccessConfigCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesGetScreenshotCall) Header() http.Header { +func (c *InstancesDeleteAccessConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetScreenshotCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesDeleteAccessConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/screenshot") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/deleteAccessConfig") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -30871,12 +30701,12 @@ func (c *InstancesGetScreenshotCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.getScreenshot" call. +// Do executes the "compute.instances.deleteAccessConfig" call. // Any non-2xx status code is an error. Response headers are in either -// *Screenshot.ServerResponse.Header or (if a response was returned at all) in +// *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 *InstancesGetScreenshotCall) Do(opts ...googleapi.CallOption) (*Screenshot, error) { +func (c *InstancesDeleteAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -30895,7 +30725,7 @@ func (c *InstancesGetScreenshotCall) Do(opts ...googleapi.CallOption) (*Screensh if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Screenshot{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -30908,97 +30738,78 @@ func (c *InstancesGetScreenshotCall) Do(opts ...googleapi.CallOption) (*Screensh return ret, nil } -type InstancesGetSerialPortOutputCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// GetSerialPortOutput: Returns the last 1 MB of serial port output from the -// specified instance. -// -// - instance: Name of the instance for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { - c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} +type InstancesDetachDiskCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// DetachDisk: Detaches a disk from an instance. +// +// - deviceName: The device name of the disk to detach. Make a get() request on +// the instance to view currently attached disks and device names. +// - instance: Instance name for this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) DetachDisk(project string, zone string, instance string, deviceName string) *InstancesDetachDiskCall { + c := &InstancesDetachDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.urlParams_.Set("deviceName", deviceName) return c } -// Port sets the optional parameter "port": Specifies which COM or serial port -// to retrieve data from. -func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("port", fmt.Sprint(port)) - return c -} - -// Start sets the optional parameter "start": Specifies the starting byte -// position of the output to return. To start with the first byte of output to -// the specified port, omit this field or set it to `0`. If the output for that -// byte position is available, this field matches the `start` parameter sent -// with the request. If the amount of serial console output exceeds the size of -// the buffer (1 MB), the oldest output is discarded and is no longer -// available. If the requested start position refers to discarded output, the -// start position is adjusted to the oldest output still available, and the -// adjusted start position is returned as the `start` property value. You can -// also provide a negative start position, which translates to the most recent -// number of bytes written to the serial port. For example, -3 is interpreted -// as the most recent 3 bytes written to the serial console. -func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall { - c.urlParams_.Set("start", fmt.Sprint(start)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesDetachDiskCall) RequestId(requestId string) *InstancesDetachDiskCall { + 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 // details. -func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall { +func (c *InstancesDetachDiskCall) Fields(s ...googleapi.Field) *InstancesDetachDiskCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall { +func (c *InstancesDetachDiskCall) Context(ctx context.Context) *InstancesDetachDiskCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesGetSerialPortOutputCall) Header() http.Header { +func (c *InstancesDetachDiskCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesDetachDiskCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/serialPort") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/detachDisk") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -31011,13 +30822,12 @@ func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.getSerialPortOutput" call. +// Do executes the "compute.instances.detachDisk" call. // Any non-2xx status code is an error. Response headers are in either -// *SerialPortOutput.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, error) { +// *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 *InstancesDetachDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31036,7 +30846,7 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &SerialPortOutput{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31049,7 +30859,7 @@ func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*Se return ret, nil } -type InstancesGetShieldedInstanceIdentityCall struct { +type InstancesGetCall struct { s *Service project string zone string @@ -31060,14 +30870,13 @@ type InstancesGetShieldedInstanceIdentityCall struct { header_ http.Header } -// GetShieldedInstanceIdentity: Returns the Shielded Instance Identity of an -// instance +// Get: Returns the specified Instance resource. // -// - instance: Name or id of the instance scoping this request. +// - instance: Name of the instance resource to return. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone string, instance string) *InstancesGetShieldedInstanceIdentityCall { - c := &InstancesGetShieldedInstanceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Get(project string, zone string, instance string) *InstancesGetCall { + c := &InstancesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance @@ -31077,7 +30886,7 @@ func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesGetShieldedInstanceIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedInstanceIdentityCall { +func (c *InstancesGetCall) Fields(s ...googleapi.Field) *InstancesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31085,27 +30894,27 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InstancesGetShieldedInstanceIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedInstanceIdentityCall { +func (c *InstancesGetCall) IfNoneMatch(entityTag string) *InstancesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesGetShieldedInstanceIdentityCall) Context(ctx context.Context) *InstancesGetShieldedInstanceIdentityCall { +func (c *InstancesGetCall) Context(ctx context.Context) *InstancesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesGetShieldedInstanceIdentityCall) Header() http.Header { +func (c *InstancesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -31113,7 +30922,7 @@ func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http. var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -31128,13 +30937,12 @@ func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http. return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.getShieldedInstanceIdentity" call. +// Do executes the "compute.instances.get" call. // Any non-2xx status code is an error. Response headers are in either -// *ShieldedInstanceIdentity.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedInstanceIdentity, error) { +// *Instance.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *InstancesGetCall) Do(opts ...googleapi.CallOption) (*Instance, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31153,7 +30961,7 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ShieldedInstanceIdentity{ + ret := &Instance{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31166,122 +30974,95 @@ func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOpti return ret, nil } -type InstancesInsertCall struct { - s *Service - project string - zone string - instance *Instance - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesGetEffectiveFirewallsCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Creates an instance resource in the specified project using the data -// included in the request. +// GetEffectiveFirewalls: Returns effective firewalls applied to an interface +// of the instance. // -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { - c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the instance scoping this request. +// - networkInterface: The name of the network interface to get the effective +// firewalls. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) GetEffectiveFirewalls(project string, zone string, instance string, networkInterface string) *InstancesGetEffectiveFirewallsCall { + c := &InstancesGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// SourceInstanceTemplate sets the optional parameter "sourceInstanceTemplate": -// Specifies instance template to create the instance. This field is optional. -// It can be a full or partial URL. For example, the following are all valid -// URLs to an instance template: - -// https://www.googleapis.com/compute/v1/projects/project -// /global/instanceTemplates/instanceTemplate - -// projects/project/global/instanceTemplates/instanceTemplate - -// global/instanceTemplates/instanceTemplate -func (c *InstancesInsertCall) SourceInstanceTemplate(sourceInstanceTemplate string) *InstancesInsertCall { - c.urlParams_.Set("sourceInstanceTemplate", sourceInstanceTemplate) - return c -} - -// SourceMachineImage sets the optional parameter "sourceMachineImage": -// Specifies the machine image to use to create the instance. This field is -// optional. It can be a full or partial URL. For example, the following are -// all valid URLs to a machine image: - -// https://www.googleapis.com/compute/v1/projects/project/global/global -// /machineImages/machineImage - -// projects/project/global/global/machineImages/machineImage - -// global/machineImages/machineImage -func (c *InstancesInsertCall) SourceMachineImage(sourceMachineImage string) *InstancesInsertCall { - c.urlParams_.Set("sourceMachineImage", sourceMachineImage) + c.urlParams_.Set("networkInterface", networkInterface) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { +func (c *InstancesGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *InstancesGetEffectiveFirewallsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InstancesGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *InstancesGetEffectiveFirewallsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall { +func (c *InstancesGetEffectiveFirewallsCall) Context(ctx context.Context) *InstancesGetEffectiveFirewallsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesInsertCall) Header() http.Header { +func (c *InstancesGetEffectiveFirewallsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) - if err != nil { - return nil, err +func (c *InstancesGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getEffectiveFirewalls") 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{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.insert" call. +// Do executes the "compute.instances.getEffectiveFirewalls" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *InstancesGetEffectiveFirewallsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*InstancesGetEffectiveFirewallsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31300,7 +31081,7 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstancesGetEffectiveFirewallsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31313,109 +31094,48 @@ func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, erro return ret, nil } -type InstancesListCall struct { +type InstancesGetGuestAttributesCall struct { s *Service project string zone string + instance string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of instances contained within the specified zone. +// GetGuestAttributes: Returns the specified guest attributes entry. // +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) List(project string, zone string) *InstancesListCall { - c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) GetGuestAttributes(project string, zone string, instance string) *InstancesGetGuestAttributesCall { + c := &InstancesGetGuestAttributesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone + c.instance = instance return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *InstancesListCall) Filter(filter string) *InstancesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *InstancesListCall) OrderBy(orderBy string) *InstancesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { - c.urlParams_.Set("pageToken", pageToken) +// QueryPath sets the optional parameter "queryPath": Specifies the guest +// attributes path to be queried. +func (c *InstancesGetGuestAttributesCall) QueryPath(queryPath string) *InstancesGetGuestAttributesCall { + c.urlParams_.Set("queryPath", queryPath) return c } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *InstancesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// VariableKey sets the optional parameter "variableKey": Specifies the key for +// the guest attributes entry. +func (c *InstancesGetGuestAttributesCall) VariableKey(variableKey string) *InstancesGetGuestAttributesCall { + c.urlParams_.Set("variableKey", variableKey) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { +func (c *InstancesGetGuestAttributesCall) Fields(s ...googleapi.Field) *InstancesGetGuestAttributesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31423,27 +31143,27 @@ func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall { +func (c *InstancesGetGuestAttributesCall) IfNoneMatch(entityTag string) *InstancesGetGuestAttributesCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall { +func (c *InstancesGetGuestAttributesCall) Context(ctx context.Context) *InstancesGetGuestAttributesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesListCall) Header() http.Header { +func (c *InstancesGetGuestAttributesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetGuestAttributesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -31451,7 +31171,7 @@ func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getGuestAttributes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -31459,18 +31179,20 @@ func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.list" call. +// Do executes the "compute.instances.getGuestAttributes" call. // Any non-2xx status code is an error. Response headers are in either -// *InstanceList.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, error) { +// *GuestAttributes.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InstancesGetGuestAttributesCall) Do(opts ...googleapi.CallOption) (*GuestAttributes, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31489,7 +31211,7 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceList{ + ret := &GuestAttributes{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31502,138 +31224,42 @@ func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, err return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type InstancesListReferrersCall struct { +type InstancesGetIamPolicyCall struct { s *Service project string zone string - instance string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// ListReferrers: Retrieves a list of resources that refer to the VM instance -// specified in the request. For example, if the VM instance is part of a -// managed or unmanaged instance group, the referrers list includes the -// instance group. For more information, read Viewing referrers to VM -// instances. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. // -// - instance: Name of the target instance scoping this request, or '-' if the -// request should span over all instances in the container. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall { - c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) GetIamPolicy(project string, zone string, resource string) *InstancesGetIamPolicyCall { + c := &InstancesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *InstancesListReferrersCall) Filter(filter string) *InstancesListReferrersCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InstancesListReferrersCall) MaxResults(maxResults int64) *InstancesListReferrersCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *InstancesListReferrersCall) OrderBy(orderBy string) *InstancesListReferrersCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *InstancesListReferrersCall) PageToken(pageToken string) *InstancesListReferrersCall { - c.urlParams_.Set("pageToken", pageToken) + c.resource = resource return c } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *InstancesListReferrersCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListReferrersCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InstancesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstancesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 // details. -func (c *InstancesListReferrersCall) Fields(s ...googleapi.Field) *InstancesListReferrersCall { +func (c *InstancesGetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -31641,27 +31267,27 @@ func (c *InstancesListReferrersCall) Fields(s ...googleapi.Field) *InstancesList // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InstancesListReferrersCall) IfNoneMatch(entityTag string) *InstancesListReferrersCall { +func (c *InstancesGetIamPolicyCall) IfNoneMatch(entityTag string) *InstancesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesListReferrersCall) Context(ctx context.Context) *InstancesListReferrersCall { +func (c *InstancesGetIamPolicyCall) Context(ctx context.Context) *InstancesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesListReferrersCall) Header() http.Header { +func (c *InstancesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -31669,7 +31295,7 @@ func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, erro var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/referrers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -31679,18 +31305,17 @@ func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, erro googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "instance": c.instance, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.listReferrers" call. +// Do executes the "compute.instances.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *InstanceListReferrers.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*InstanceListReferrers, error) { +// *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 *InstancesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31709,7 +31334,7 @@ func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*Instance if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceListReferrers{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31722,96 +31347,72 @@ func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*Instance return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstancesListReferrersCall) Pages(ctx context.Context, f func(*InstanceListReferrers) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type InstancesPerformMaintenanceCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesGetScreenshotCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PerformMaintenance: Perform a manual maintenance on the instance. +// GetScreenshot: Returns the screenshot from the specified instance. // // - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) PerformMaintenance(project string, zone string, instance string) *InstancesPerformMaintenanceCall { - c := &InstancesPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) GetScreenshot(project string, zone string, instance string) *InstancesGetScreenshotCall { + c := &InstancesGetScreenshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesPerformMaintenanceCall) RequestId(requestId string) *InstancesPerformMaintenanceCall { - 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 // details. -func (c *InstancesPerformMaintenanceCall) Fields(s ...googleapi.Field) *InstancesPerformMaintenanceCall { +func (c *InstancesGetScreenshotCall) Fields(s ...googleapi.Field) *InstancesGetScreenshotCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InstancesGetScreenshotCall) IfNoneMatch(entityTag string) *InstancesGetScreenshotCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *InstancesPerformMaintenanceCall) Context(ctx context.Context) *InstancesPerformMaintenanceCall { +func (c *InstancesGetScreenshotCall) Context(ctx context.Context) *InstancesGetScreenshotCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesPerformMaintenanceCall) Header() http.Header { +func (c *InstancesGetScreenshotCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetScreenshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/performMaintenance") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/screenshot") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -31824,12 +31425,12 @@ func (c *InstancesPerformMaintenanceCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.performMaintenance" call. +// Do executes the "compute.instances.getScreenshot" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *Screenshot.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesGetScreenshotCall) Do(opts ...googleapi.CallOption) (*Screenshot, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31848,7 +31449,7 @@ func (c *InstancesPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Ope if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Screenshot{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31861,81 +31462,99 @@ func (c *InstancesPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type InstancesRemoveResourcePoliciesCall struct { - s *Service - project string - zone string - instance string - instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesGetSerialPortOutputCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RemoveResourcePolicies: Removes resource policies from an instance. +// GetSerialPortOutput: Returns the last 1 MB of serial port output from the +// specified instance. // -// - instance: The instance name for this request. +// - instance: Name of the instance for this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) RemoveResourcePolicies(project string, zone string, instance string, instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest) *InstancesRemoveResourcePoliciesCall { - c := &InstancesRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) GetSerialPortOutput(project string, zone string, instance string) *InstancesGetSerialPortOutputCall { + c := &InstancesGetSerialPortOutputCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancesremoveresourcepoliciesrequest = instancesremoveresourcepoliciesrequest return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesRemoveResourcePoliciesCall) RequestId(requestId string) *InstancesRemoveResourcePoliciesCall { - c.urlParams_.Set("requestId", requestId) +// Port sets the optional parameter "port": Specifies which COM or serial port +// to retrieve data from. +func (c *InstancesGetSerialPortOutputCall) Port(port int64) *InstancesGetSerialPortOutputCall { + c.urlParams_.Set("port", fmt.Sprint(port)) + return c +} + +// Start sets the optional parameter "start": Specifies the starting byte +// position of the output to return. To start with the first byte of output to +// the specified port, omit this field or set it to `0`. If the output for that +// byte position is available, this field matches the `start` parameter sent +// with the request. If the amount of serial console output exceeds the size of +// the buffer (1 MB), the oldest output is discarded and is no longer +// available. If the requested start position refers to discarded output, the +// start position is adjusted to the oldest output still available, and the +// adjusted start position is returned as the `start` property value. You can +// also provide a negative start position, which translates to the most recent +// number of bytes written to the serial port. For example, -3 is interpreted +// as the most recent 3 bytes written to the serial console. Note that the +// negative start is bounded by the retained buffer size, and the returned +// serial console output will not exceed the max buffer size. +func (c *InstancesGetSerialPortOutputCall) Start(start int64) *InstancesGetSerialPortOutputCall { + c.urlParams_.Set("start", fmt.Sprint(start)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesRemoveResourcePoliciesCall { +func (c *InstancesGetSerialPortOutputCall) Fields(s ...googleapi.Field) *InstancesGetSerialPortOutputCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InstancesGetSerialPortOutputCall) IfNoneMatch(entityTag string) *InstancesGetSerialPortOutputCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *InstancesRemoveResourcePoliciesCall) Context(ctx context.Context) *InstancesRemoveResourcePoliciesCall { +func (c *InstancesGetSerialPortOutputCall) Context(ctx context.Context) *InstancesGetSerialPortOutputCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesRemoveResourcePoliciesCall) Header() http.Header { +func (c *InstancesGetSerialPortOutputCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesremoveresourcepoliciesrequest) - if err != nil { - return nil, err +func (c *InstancesGetSerialPortOutputCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/serialPort") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -31948,12 +31567,13 @@ func (c *InstancesRemoveResourcePoliciesCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.removeResourcePolicies" call. +// Do executes the "compute.instances.getSerialPortOutput" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *SerialPortOutput.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InstancesGetSerialPortOutputCall) Do(opts ...googleapi.CallOption) (*SerialPortOutput, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -31972,7 +31592,7 @@ func (c *InstancesRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &SerialPortOutput{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -31985,76 +31605,73 @@ func (c *InstancesRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type InstancesResetCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesGetShieldedInstanceIdentityCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Reset: Performs a reset on the instance. This is a hard reset. The VM does -// not do a graceful shutdown. For more information, see Resetting an instance. +// GetShieldedInstanceIdentity: Returns the Shielded Instance Identity of an +// instance // -// - instance: Name of the instance scoping this request. +// - instance: Name or id of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { - c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) GetShieldedInstanceIdentity(project string, zone string, instance string) *InstancesGetShieldedInstanceIdentityCall { + c := &InstancesGetShieldedInstanceIdentityCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesResetCall) RequestId(requestId string) *InstancesResetCall { - 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 // details. -func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { +func (c *InstancesGetShieldedInstanceIdentityCall) Fields(s ...googleapi.Field) *InstancesGetShieldedInstanceIdentityCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InstancesGetShieldedInstanceIdentityCall) IfNoneMatch(entityTag string) *InstancesGetShieldedInstanceIdentityCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall { +func (c *InstancesGetShieldedInstanceIdentityCall) Context(ctx context.Context) *InstancesGetShieldedInstanceIdentityCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesResetCall) Header() http.Header { +func (c *InstancesGetShieldedInstanceIdentityCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesGetShieldedInstanceIdentityCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/reset") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/getShieldedInstanceIdentity") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -32067,12 +31684,13 @@ func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.reset" call. +// Do executes the "compute.instances.getShieldedInstanceIdentity" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *ShieldedInstanceIdentity.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstancesGetShieldedInstanceIdentityCall) Do(opts ...googleapi.CallOption) (*ShieldedInstanceIdentity, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32091,7 +31709,7 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ShieldedInstanceIdentity{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32104,24 +31722,23 @@ func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error return ret, nil } -type InstancesResumeCall struct { +type InstancesInsertCall struct { s *Service project string zone string - instance string + instance *Instance urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Resume: Resumes an instance that was suspended using the instances().suspend -// method. +// Insert: Creates an instance resource in the specified project using the data +// included in the request. // -// - instance: Name of the instance resource to resume. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Resume(project string, zone string, instance string) *InstancesResumeCall { - c := &InstancesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Insert(project string, zone string, instance *Instance) *InstancesInsertCall { + c := &InstancesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance @@ -32138,40 +31755,70 @@ func (r *InstancesService) Resume(project string, zone string, instance string) // 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 *InstancesResumeCall) RequestId(requestId string) *InstancesResumeCall { +func (c *InstancesInsertCall) RequestId(requestId string) *InstancesInsertCall { c.urlParams_.Set("requestId", requestId) return c } +// SourceInstanceTemplate sets the optional parameter "sourceInstanceTemplate": +// Specifies instance template to create the instance. This field is optional. +// It can be a full or partial URL. For example, the following are all valid +// URLs to an instance template: - +// https://www.googleapis.com/compute/v1/projects/project +// /global/instanceTemplates/instanceTemplate - +// projects/project/global/instanceTemplates/instanceTemplate - +// global/instanceTemplates/instanceTemplate +func (c *InstancesInsertCall) SourceInstanceTemplate(sourceInstanceTemplate string) *InstancesInsertCall { + c.urlParams_.Set("sourceInstanceTemplate", sourceInstanceTemplate) + return c +} + +// SourceMachineImage sets the optional parameter "sourceMachineImage": +// Specifies the machine image to use to create the instance. This field is +// optional. It can be a full or partial URL. For example, the following are +// all valid URLs to a machine image: - +// https://www.googleapis.com/compute/v1/projects/project/global/global +// /machineImages/machineImage - +// projects/project/global/global/machineImages/machineImage - +// global/machineImages/machineImage +func (c *InstancesInsertCall) SourceMachineImage(sourceMachineImage string) *InstancesInsertCall { + c.urlParams_.Set("sourceMachineImage", sourceMachineImage) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesResumeCall) Fields(s ...googleapi.Field) *InstancesResumeCall { +func (c *InstancesInsertCall) Fields(s ...googleapi.Field) *InstancesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesResumeCall) Context(ctx context.Context) *InstancesResumeCall { +func (c *InstancesInsertCall) Context(ctx context.Context) *InstancesInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesResumeCall) Header() http.Header { +func (c *InstancesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesResumeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InstancesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/resume") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -32179,19 +31826,18 @@ func (c *InstancesResumeCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.resume" call. +// Do executes the "compute.instances.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesResumeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32223,162 +31869,365 @@ func (c *InstancesResumeCall) Do(opts ...googleapi.CallOption) (*Operation, erro return ret, nil } -type InstancesSendDiagnosticInterruptCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SendDiagnosticInterrupt: Sends diagnostic interrupt to the instance. +// List: Retrieves the list of instances contained within the specified zone. // -// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SendDiagnosticInterrupt(project string, zone string, instance string) *InstancesSendDiagnosticInterruptCall { - c := &InstancesSendDiagnosticInterruptCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) List(project string, zone string) *InstancesListCall { + c := &InstancesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *InstancesListCall) Filter(filter string) *InstancesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *InstancesListCall) MaxResults(maxResults int64) *InstancesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *InstancesListCall) OrderBy(orderBy string) *InstancesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *InstancesListCall) PageToken(pageToken string) *InstancesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *InstancesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSendDiagnosticInterruptCall) Fields(s ...googleapi.Field) *InstancesSendDiagnosticInterruptCall { +func (c *InstancesListCall) Fields(s ...googleapi.Field) *InstancesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InstancesListCall) IfNoneMatch(entityTag string) *InstancesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *InstancesSendDiagnosticInterruptCall) Context(ctx context.Context) *InstancesSendDiagnosticInterruptCall { +func (c *InstancesListCall) Context(ctx context.Context) *InstancesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSendDiagnosticInterruptCall) Header() http.Header { +func (c *InstancesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSendDiagnosticInterruptCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances") 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{ - "project": c.project, - "zone": c.zone, - "instance": c.instance, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.sendDiagnosticInterrupt" call. -func (c *InstancesSendDiagnosticInterruptCall) Do(opts ...googleapi.CallOption) error { +// Do executes the "compute.instances.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *InstanceList.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *InstancesListCall) Do(opts ...googleapi.CallOption) (*InstanceList, 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 err + return nil, err } defer googleapi.CloseBody(res) if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) + return nil, gensupport.WrapError(err) } - return nil + ret := &InstanceList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -type InstancesSetDeletionProtectionCall struct { - s *Service - project string - zone string - resource 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 *InstancesListCall) Pages(ctx context.Context, f func(*InstanceList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// SetDeletionProtection: Sets deletion protection on the instance. +type InstancesListReferrersCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListReferrers: Retrieves a list of resources that refer to the VM instance +// specified in the request. For example, if the VM instance is part of a +// managed or unmanaged instance group, the referrers list includes the +// instance group. For more information, read Viewing referrers to VM +// instances. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetDeletionProtection(project string, zone string, resource string) *InstancesSetDeletionProtectionCall { - c := &InstancesSetDeletionProtectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the target instance scoping this request, or '-' if the +// request should span over all instances in the container. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) ListReferrers(project string, zone string, instance string) *InstancesListReferrersCall { + c := &InstancesListReferrersCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource + c.instance = instance return c } -// DeletionProtection sets the optional parameter "deletionProtection": Whether -// the resource should be protected against deletion. -func (c *InstancesSetDeletionProtectionCall) DeletionProtection(deletionProtection bool) *InstancesSetDeletionProtectionCall { - c.urlParams_.Set("deletionProtection", fmt.Sprint(deletionProtection)) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *InstancesListReferrersCall) Filter(filter string) *InstancesListReferrersCall { + c.urlParams_.Set("filter", filter) return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesSetDeletionProtectionCall) RequestId(requestId string) *InstancesSetDeletionProtectionCall { - c.urlParams_.Set("requestId", requestId) +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *InstancesListReferrersCall) MaxResults(maxResults int64) *InstancesListReferrersCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *InstancesListReferrersCall) OrderBy(orderBy string) *InstancesListReferrersCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *InstancesListReferrersCall) PageToken(pageToken string) *InstancesListReferrersCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *InstancesListReferrersCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstancesListReferrersCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetDeletionProtectionCall) Fields(s ...googleapi.Field) *InstancesSetDeletionProtectionCall { +func (c *InstancesListReferrersCall) Fields(s ...googleapi.Field) *InstancesListReferrersCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InstancesListReferrersCall) IfNoneMatch(entityTag string) *InstancesListReferrersCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *InstancesSetDeletionProtectionCall) Context(ctx context.Context) *InstancesSetDeletionProtectionCall { +func (c *InstancesListReferrersCall) Context(ctx context.Context) *InstancesListReferrersCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetDeletionProtectionCall) Header() http.Header { +func (c *InstancesListReferrersCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesListReferrersCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/referrers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -32386,17 +32235,18 @@ func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Respon googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "resource": c.resource, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setDeletionProtection" call. +// Do executes the "compute.instances.listReferrers" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *InstanceListReferrers.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InstancesListReferrersCall) Do(opts ...googleapi.CallOption) (*InstanceListReferrers, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32415,7 +32265,7 @@ func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstanceListReferrers{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -32428,7 +32278,28 @@ func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type InstancesSetDiskAutoDeleteCall struct { +// 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 *InstancesListReferrersCall) Pages(ctx context.Context, f func(*InstanceListReferrers) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type InstancesPerformMaintenanceCall struct { s *Service project string zone string @@ -32438,22 +32309,16 @@ type InstancesSetDiskAutoDeleteCall struct { header_ http.Header } -// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to an -// instance. +// PerformMaintenance: Perform a manual maintenance on the instance. // -// - autoDelete: Whether to auto-delete the disk when the instance is deleted. -// - deviceName: The device name of the disk to modify. Make a get() request on -// the instance to view currently attached disks and device names. -// - instance: The instance name for this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { - c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the instance scoping this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) PerformMaintenance(project string, zone string, instance string) *InstancesPerformMaintenanceCall { + c := &InstancesPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete)) - c.urlParams_.Set("deviceName", deviceName) return c } @@ -32467,7 +32332,7 @@ func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instan // 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 *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesSetDiskAutoDeleteCall { +func (c *InstancesPerformMaintenanceCall) RequestId(requestId string) *InstancesPerformMaintenanceCall { c.urlParams_.Set("requestId", requestId) return c } @@ -32475,32 +32340,32 @@ func (c *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall { +func (c *InstancesPerformMaintenanceCall) Fields(s ...googleapi.Field) *InstancesPerformMaintenanceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall { +func (c *InstancesPerformMaintenanceCall) Context(ctx context.Context) *InstancesPerformMaintenanceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { +func (c *InstancesPerformMaintenanceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/performMaintenance") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -32515,12 +32380,12 @@ func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setDiskAutoDelete" call. +// Do executes the "compute.instances.performMaintenance" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32552,65 +32417,79 @@ func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Oper return ret, nil } -type InstancesSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesRemoveResourcePoliciesCall struct { + s *Service + project string + zone string + instance string + instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. +// RemoveResourcePolicies: Removes resource policies from an instance. // +// - instance: The instance name for this request. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstancesSetIamPolicyCall { - c := &InstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) RemoveResourcePolicies(project string, zone string, instance string, instancesremoveresourcepoliciesrequest *InstancesRemoveResourcePoliciesRequest) *InstancesRemoveResourcePoliciesCall { + c := &InstancesRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest + c.instance = instance + c.instancesremoveresourcepoliciesrequest = instancesremoveresourcepoliciesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesRemoveResourcePoliciesCall) RequestId(requestId string) *InstancesRemoveResourcePoliciesCall { + 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 // details. -func (c *InstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesSetIamPolicyCall { +func (c *InstancesRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *InstancesRemoveResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetIamPolicyCall) Context(ctx context.Context) *InstancesSetIamPolicyCall { +func (c *InstancesRemoveResourcePoliciesCall) Context(ctx context.Context) *InstancesRemoveResourcePoliciesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetIamPolicyCall) Header() http.Header { +func (c *InstancesRemoveResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesremoveresourcepoliciesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/removeResourcePolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -32620,17 +32499,17 @@ func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "resource": c.resource, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setIamPolicy" call. +// Do executes the "compute.instances.removeResourcePolicies" call. // 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 +// *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 *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *InstancesRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32649,7 +32528,7 @@ func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e 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, @@ -32662,29 +32541,27 @@ func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, e return ret, nil } -type InstancesSetLabelsCall struct { - s *Service - project string - zone string - instance string - instancessetlabelsrequest *InstancesSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesResetCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets labels on an instance. To learn more about labels, read the -// Labeling Resources documentation. +// Reset: Performs a reset on the instance. This is a hard reset. The VM does +// not do a graceful shutdown. For more information, see Resetting an instance. // // - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { - c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Reset(project string, zone string, instance string) *InstancesResetCall { + c := &InstancesResetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetlabelsrequest = instancessetlabelsrequest return c } @@ -32698,7 +32575,7 @@ func (r *InstancesService) SetLabels(project string, zone string, instance strin // 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 *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabelsCall { +func (c *InstancesResetCall) RequestId(requestId string) *InstancesResetCall { c.urlParams_.Set("requestId", requestId) return c } @@ -32706,36 +32583,32 @@ func (c *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabels // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabelsCall { +func (c *InstancesResetCall) Fields(s ...googleapi.Field) *InstancesResetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetLabelsCall) Context(ctx context.Context) *InstancesSetLabelsCall { +func (c *InstancesResetCall) Context(ctx context.Context) *InstancesResetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetLabelsCall) Header() http.Header { +func (c *InstancesResetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstancesResetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetlabelsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/reset") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -32750,12 +32623,12 @@ func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setLabels" call. +// Do executes the "compute.instances.reset" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesResetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32787,29 +32660,27 @@ func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, e return ret, nil } -type InstancesSetMachineResourcesCall struct { - s *Service - project string - zone string - instance string - instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesResumeCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetMachineResources: Changes the number and/or type of accelerator for a -// stopped instance to the values specified in the request. +// Resume: Resumes an instance that was suspended using the instances().suspend +// method. // -// - instance: Name of the instance scoping this request. +// - instance: Name of the instance resource to resume. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { - c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Resume(project string, zone string, instance string) *InstancesResumeCall { + c := &InstancesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetmachineresourcesrequest = instancessetmachineresourcesrequest return c } @@ -32823,7 +32694,7 @@ func (r *InstancesService) SetMachineResources(project string, zone string, inst // 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 *InstancesSetMachineResourcesCall) RequestId(requestId string) *InstancesSetMachineResourcesCall { +func (c *InstancesResumeCall) RequestId(requestId string) *InstancesResumeCall { c.urlParams_.Set("requestId", requestId) return c } @@ -32831,36 +32702,32 @@ func (c *InstancesSetMachineResourcesCall) RequestId(requestId string) *Instance // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *InstancesSetMachineResourcesCall { +func (c *InstancesResumeCall) Fields(s ...googleapi.Field) *InstancesResumeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetMachineResourcesCall) Context(ctx context.Context) *InstancesSetMachineResourcesCall { +func (c *InstancesResumeCall) Context(ctx context.Context) *InstancesResumeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetMachineResourcesCall) Header() http.Header { +func (c *InstancesResumeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstancesResumeCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachineresourcesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/resume") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -32875,12 +32742,12 @@ func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setMachineResources" call. +// Do executes the "compute.instances.resume" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesResumeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -32912,80 +32779,58 @@ func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Op return ret, nil } -type InstancesSetMachineTypeCall struct { - s *Service - project string - zone string - instance string - instancessetmachinetyperequest *InstancesSetMachineTypeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSendDiagnosticInterruptCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetMachineType: Changes the machine type for a stopped instance to the -// machine type specified in the request. +// SendDiagnosticInterrupt: Sends diagnostic interrupt to the instance. // // - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { - c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SendDiagnosticInterrupt(project string, zone string, instance string) *InstancesSendDiagnosticInterruptCall { + c := &InstancesSendDiagnosticInterruptCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetmachinetyperequest = instancessetmachinetyperequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesSetMachineTypeCall) RequestId(requestId string) *InstancesSetMachineTypeCall { - 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 // details. -func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall { +func (c *InstancesSendDiagnosticInterruptCall) Fields(s ...googleapi.Field) *InstancesSendDiagnosticInterruptCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall { +func (c *InstancesSendDiagnosticInterruptCall) Context(ctx context.Context) *InstancesSendDiagnosticInterruptCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetMachineTypeCall) Header() http.Header { +func (c *InstancesSendDiagnosticInterruptCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstancesSendDiagnosticInterruptCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachinetyperequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineType") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/sendDiagnosticInterrupt") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -33000,72 +32845,53 @@ func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setMachineType" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// Do executes the "compute.instances.sendDiagnosticInterrupt" call. +func (c *InstancesSendDiagnosticInterruptCall) Do(opts ...googleapi.CallOption) 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 + return 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 gensupport.WrapError(err) } - return ret, nil + return nil } -type InstancesSetMetadataCall struct { +type InstancesSetDeletionProtectionCall struct { s *Service project string zone string - instance string - metadata *Metadata + resource string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// SetMetadata: Sets metadata for the specified instance to the data included -// in the request. +// SetDeletionProtection: Sets deletion protection on the instance. // -// - instance: Name of the instance scoping this request. // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { - c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetDeletionProtection(project string, zone string, resource string) *InstancesSetDeletionProtectionCall { + c := &InstancesSetDeletionProtectionCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - c.metadata = metadata + c.resource = resource return c } -// RequestId sets the optional parameter "requestId": An optional 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 +// DeletionProtection sets the optional parameter "deletionProtection": Whether +// the resource should be protected against deletion. +func (c *InstancesSetDeletionProtectionCall) DeletionProtection(deletionProtection bool) *InstancesSetDeletionProtectionCall { + c.urlParams_.Set("deletionProtection", fmt.Sprint(deletionProtection)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 @@ -33073,7 +32899,7 @@ func (r *InstancesService) SetMetadata(project string, zone string, instance str // 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 *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMetadataCall { +func (c *InstancesSetDeletionProtectionCall) RequestId(requestId string) *InstancesSetDeletionProtectionCall { c.urlParams_.Set("requestId", requestId) return c } @@ -33081,36 +32907,32 @@ func (c *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMeta // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall { +func (c *InstancesSetDeletionProtectionCall) Fields(s ...googleapi.Field) *InstancesSetDeletionProtectionCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall { +func (c *InstancesSetDeletionProtectionCall) Context(ctx context.Context) *InstancesSetDeletionProtectionCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetMetadataCall) Header() http.Header { +func (c *InstancesSetDeletionProtectionCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstancesSetDeletionProtectionCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMetadata") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/setDeletionProtection") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -33120,17 +32942,17 @@ func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "instance": c.instance, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setMetadata" call. +// Do executes the "compute.instances.setDeletionProtection" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetDeletionProtectionCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33162,30 +32984,32 @@ func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type InstancesSetMinCpuPlatformCall struct { - s *Service - project string - zone string - instance string - instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetDiskAutoDeleteCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetMinCpuPlatform: Changes the minimum CPU platform that this instance -// should use. This method can only be called on a stopped instance. For more -// information, read Specifying a Minimum CPU Platform. +// SetDiskAutoDelete: Sets the auto-delete flag for a disk attached to an +// instance. // -// - instance: Name of the instance scoping this request. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall { - c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - autoDelete: Whether to auto-delete the disk when the instance is deleted. +// - deviceName: The device name of the disk to modify. Make a get() request on +// the instance to view currently attached disks and device names. +// - instance: The instance name for this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) SetDiskAutoDelete(project string, zone string, instance string, autoDelete bool, deviceName string) *InstancesSetDiskAutoDeleteCall { + c := &InstancesSetDiskAutoDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetmincpuplatformrequest = instancessetmincpuplatformrequest + c.urlParams_.Set("autoDelete", fmt.Sprint(autoDelete)) + c.urlParams_.Set("deviceName", deviceName) return c } @@ -33199,7 +33023,7 @@ func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instan // 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 *InstancesSetMinCpuPlatformCall) RequestId(requestId string) *InstancesSetMinCpuPlatformCall { +func (c *InstancesSetDiskAutoDeleteCall) RequestId(requestId string) *InstancesSetDiskAutoDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -33207,36 +33031,32 @@ func (c *InstancesSetMinCpuPlatformCall) RequestId(requestId string) *InstancesS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetMinCpuPlatformCall) Fields(s ...googleapi.Field) *InstancesSetMinCpuPlatformCall { +func (c *InstancesSetDiskAutoDeleteCall) Fields(s ...googleapi.Field) *InstancesSetDiskAutoDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetMinCpuPlatformCall) Context(ctx context.Context) *InstancesSetMinCpuPlatformCall { +func (c *InstancesSetDiskAutoDeleteCall) Context(ctx context.Context) *InstancesSetDiskAutoDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetMinCpuPlatformCall) Header() http.Header { +func (c *InstancesSetDiskAutoDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstancesSetDiskAutoDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmincpuplatformrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -33251,12 +33071,12 @@ func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setMinCpuPlatform" call. +// Do executes the "compute.instances.setDiskAutoDelete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetDiskAutoDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33288,79 +33108,65 @@ func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Oper return ret, nil } -type InstancesSetNameCall struct { - s *Service - project string - zone string - instance string - instancessetnamerequest *InstancesSetNameRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetIamPolicyCall struct { + s *Service + project string + zone string + resource string + zonesetpolicyrequest *ZoneSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetName: Sets name of an instance. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. // -// - instance: The instance name for this request. // - project: Project ID for this request. +// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetName(project string, zone string, instance string, instancessetnamerequest *InstancesSetNameRequest) *InstancesSetNameCall { - c := &InstancesSetNameCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstancesSetIamPolicyCall { + c := &InstancesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instance = instance - c.instancessetnamerequest = instancessetnamerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesSetNameCall) RequestId(requestId string) *InstancesSetNameCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.zonesetpolicyrequest = zonesetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetNameCall) Fields(s ...googleapi.Field) *InstancesSetNameCall { +func (c *InstancesSetIamPolicyCall) Fields(s ...googleapi.Field) *InstancesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetNameCall) Context(ctx context.Context) *InstancesSetNameCall { +func (c *InstancesSetIamPolicyCall) Context(ctx context.Context) *InstancesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetNameCall) Header() http.Header { +func (c *InstancesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetNameCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetnamerequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setName") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -33370,17 +33176,17 @@ func (c *InstancesSetNameCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "instance": c.instance, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setName" call. +// Do executes the "compute.instances.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *InstancesSetNameCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33399,7 +33205,7 @@ func (c *InstancesSetNameCall) Do(opts ...googleapi.CallOption) (*Operation, err 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, @@ -33412,32 +33218,29 @@ func (c *InstancesSetNameCall) Do(opts ...googleapi.CallOption) (*Operation, err return ret, nil } -type InstancesSetSchedulingCall struct { - s *Service - project string - zone string - instance string - scheduling *Scheduling - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetLabelsCall struct { + s *Service + project string + zone string + instance string + instancessetlabelsrequest *InstancesSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetScheduling: Sets an instance's scheduling options. You can only call this -// method on a stopped instance, that is, a VM instance that is in a -// `TERMINATED` state. See Instance Life Cycle for more information on the -// possible instance states. For more information about setting scheduling -// options for a VM, see Set VM host maintenance policy. +// SetLabels: Sets labels on an instance. To learn more about labels, read the +// Labeling Resources documentation. // -// - instance: Instance name for this request. +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { - c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetLabels(project string, zone string, instance string, instancessetlabelsrequest *InstancesSetLabelsRequest) *InstancesSetLabelsCall { + c := &InstancesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.scheduling = scheduling + c.instancessetlabelsrequest = instancessetlabelsrequest return c } @@ -33451,7 +33254,7 @@ func (r *InstancesService) SetScheduling(project string, zone string, instance s // 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 *InstancesSetSchedulingCall) RequestId(requestId string) *InstancesSetSchedulingCall { +func (c *InstancesSetLabelsCall) RequestId(requestId string) *InstancesSetLabelsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -33459,36 +33262,36 @@ func (c *InstancesSetSchedulingCall) RequestId(requestId string) *InstancesSetSc // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall { +func (c *InstancesSetLabelsCall) Fields(s ...googleapi.Field) *InstancesSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall { +func (c *InstancesSetLabelsCall) Context(ctx context.Context) *InstancesSetLabelsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetSchedulingCall) Header() http.Header { +func (c *InstancesSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetLabelsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetlabelsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setScheduling") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setLabels") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -33503,12 +33306,12 @@ func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setScheduling" call. +// Do executes the "compute.instances.setLabels" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33540,30 +33343,29 @@ func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operatio return ret, nil } -type InstancesSetSecurityPolicyCall struct { - s *Service - project string - zone string - instance string - instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetMachineResourcesCall struct { + s *Service + project string + zone string + instance string + instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified instance. For more information, see Google Cloud Armor Overview +// SetMachineResources: Changes the number and/or type of accelerator for a +// stopped instance to the values specified in the request. // -// - instance: Name of the Instance resource to which the security policy -// should be set. The name should conform to RFC1035. -// - project: Project ID for this request. -// - zone: Name of the zone scoping this request. -func (r *InstancesService) SetSecurityPolicy(project string, zone string, instance string, instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest) *InstancesSetSecurityPolicyCall { - c := &InstancesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the instance scoping this request. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) SetMachineResources(project string, zone string, instance string, instancessetmachineresourcesrequest *InstancesSetMachineResourcesRequest) *InstancesSetMachineResourcesCall { + c := &InstancesSetMachineResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetsecuritypolicyrequest = instancessetsecuritypolicyrequest + c.instancessetmachineresourcesrequest = instancessetmachineresourcesrequest return c } @@ -33577,7 +33379,7 @@ func (r *InstancesService) SetSecurityPolicy(project string, zone string, instan // 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 *InstancesSetSecurityPolicyCall) RequestId(requestId string) *InstancesSetSecurityPolicyCall { +func (c *InstancesSetMachineResourcesCall) RequestId(requestId string) *InstancesSetMachineResourcesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -33585,36 +33387,36 @@ func (c *InstancesSetSecurityPolicyCall) RequestId(requestId string) *InstancesS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetSecurityPolicyCall { +func (c *InstancesSetMachineResourcesCall) Fields(s ...googleapi.Field) *InstancesSetMachineResourcesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetSecurityPolicyCall) Context(ctx context.Context) *InstancesSetSecurityPolicyCall { +func (c *InstancesSetMachineResourcesCall) Context(ctx context.Context) *InstancesSetMachineResourcesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetSecurityPolicyCall) Header() http.Header { +func (c *InstancesSetMachineResourcesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetMachineResourcesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetsecuritypolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachineresourcesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineResources") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -33629,12 +33431,12 @@ func (c *InstancesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setSecurityPolicy" call. +// Do executes the "compute.instances.setMachineResources" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetMachineResourcesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33666,30 +33468,29 @@ func (c *InstancesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Oper return ret, nil } -type InstancesSetServiceAccountCall struct { - s *Service - project string - zone string - instance string - instancessetserviceaccountrequest *InstancesSetServiceAccountRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetMachineTypeCall struct { + s *Service + project string + zone string + instance string + instancessetmachinetyperequest *InstancesSetMachineTypeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetServiceAccount: Sets the service account on the instance. For more -// information, read Changing the service account and access scopes for an -// instance. +// SetMachineType: Changes the machine type for a stopped instance to the +// machine type specified in the request. // -// - instance: Name of the instance resource to start. +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { - c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetMachineType(project string, zone string, instance string, instancessetmachinetyperequest *InstancesSetMachineTypeRequest) *InstancesSetMachineTypeCall { + c := &InstancesSetMachineTypeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancessetserviceaccountrequest = instancessetserviceaccountrequest + c.instancessetmachinetyperequest = instancessetmachinetyperequest return c } @@ -33703,7 +33504,7 @@ func (r *InstancesService) SetServiceAccount(project string, zone string, instan // 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 *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall { +func (c *InstancesSetMachineTypeCall) RequestId(requestId string) *InstancesSetMachineTypeCall { c.urlParams_.Set("requestId", requestId) return c } @@ -33711,36 +33512,36 @@ func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesS // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall { +func (c *InstancesSetMachineTypeCall) Fields(s ...googleapi.Field) *InstancesSetMachineTypeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall { +func (c *InstancesSetMachineTypeCall) Context(ctx context.Context) *InstancesSetMachineTypeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetServiceAccountCall) Header() http.Header { +func (c *InstancesSetMachineTypeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetMachineTypeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetserviceaccountrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmachinetyperequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMachineType") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -33755,12 +33556,12 @@ func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setServiceAccount" call. +// Do executes the "compute.instances.setMachineType" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetMachineTypeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33792,31 +33593,29 @@ func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Oper return ret, nil } -type InstancesSetShieldedInstanceIntegrityPolicyCall struct { - s *Service - project string - zone string - instance string - shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetMetadataCall struct { + s *Service + project string + zone string + instance string + metadata *Metadata + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance integrity -// policy for an instance. You can only use this method on a running instance. -// This method supports PATCH semantics and uses the JSON merge patch format -// and processing rules. +// SetMetadata: Sets metadata for the specified instance to the data included +// in the request. // -// - instance: Name or id of the instance scoping this request. +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { - c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetMetadata(project string, zone string, instance string, metadata *Metadata) *InstancesSetMetadataCall { + c := &InstancesSetMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.shieldedinstanceintegritypolicy = shieldedinstanceintegritypolicy + c.metadata = metadata return c } @@ -33830,7 +33629,7 @@ func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zo // 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 *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedInstanceIntegrityPolicyCall { +func (c *InstancesSetMetadataCall) RequestId(requestId string) *InstancesSetMetadataCall { c.urlParams_.Set("requestId", requestId) return c } @@ -33838,38 +33637,38 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedInstanceIntegrityPolicyCall { +func (c *InstancesSetMetadataCall) Fields(s ...googleapi.Field) *InstancesSetMetadataCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedInstanceIntegrityPolicyCall { +func (c *InstancesSetMetadataCall) Context(ctx context.Context) *InstancesSetMetadataCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { +func (c *InstancesSetMetadataCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetMetadataCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceintegritypolicy) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMetadata") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -33882,12 +33681,12 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setShieldedInstanceIntegrityPolicy" call. +// Do executes the "compute.instances.setMetadata" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -33919,29 +33718,30 @@ func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.C return ret, nil } -type InstancesSetTagsCall struct { - s *Service - project string - zone string - instance string - tags *Tags - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetMinCpuPlatformCall struct { + s *Service + project string + zone string + instance string + instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetTags: Sets network tags for the specified instance to the data included -// in the request. +// SetMinCpuPlatform: Changes the minimum CPU platform that this instance +// should use. This method can only be called on a stopped instance. For more +// information, read Specifying a Minimum CPU Platform. // // - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { - c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetMinCpuPlatform(project string, zone string, instance string, instancessetmincpuplatformrequest *InstancesSetMinCpuPlatformRequest) *InstancesSetMinCpuPlatformCall { + c := &InstancesSetMinCpuPlatformCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.tags = tags + c.instancessetmincpuplatformrequest = instancessetmincpuplatformrequest return c } @@ -33955,7 +33755,7 @@ func (r *InstancesService) SetTags(project string, zone string, instance string, // 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 *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall { +func (c *InstancesSetMinCpuPlatformCall) RequestId(requestId string) *InstancesSetMinCpuPlatformCall { c.urlParams_.Set("requestId", requestId) return c } @@ -33963,36 +33763,36 @@ func (c *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { +func (c *InstancesSetMinCpuPlatformCall) Fields(s ...googleapi.Field) *InstancesSetMinCpuPlatformCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall { +func (c *InstancesSetMinCpuPlatformCall) Context(ctx context.Context) *InstancesSetMinCpuPlatformCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSetTagsCall) Header() http.Header { +func (c *InstancesSetMinCpuPlatformCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetMinCpuPlatformCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetmincpuplatformrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setTags") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setMinCpuPlatform") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -34007,12 +33807,12 @@ func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.setTags" call. +// Do executes the "compute.instances.setMinCpuPlatform" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetMinCpuPlatformCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34044,27 +33844,28 @@ func (c *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, err return ret, nil } -type InstancesSimulateMaintenanceEventCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetNameCall struct { + s *Service + project string + zone string + instance string + instancessetnamerequest *InstancesSetNameRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SimulateMaintenanceEvent: Simulates a host maintenance event on a VM. For -// more information, see Simulate a host maintenance event. +// SetName: Sets name of an instance. // -// - instance: Name of the instance scoping this request. +// - instance: The instance name for this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { - c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetName(project string, zone string, instance string, instancessetnamerequest *InstancesSetNameRequest) *InstancesSetNameCall { + c := &InstancesSetNameCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.instancessetnamerequest = instancessetnamerequest return c } @@ -34078,48 +33879,44 @@ func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, // 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 *InstancesSimulateMaintenanceEventCall) RequestId(requestId string) *InstancesSimulateMaintenanceEventCall { +func (c *InstancesSetNameCall) RequestId(requestId string) *InstancesSetNameCall { c.urlParams_.Set("requestId", requestId) return c } -// WithExtendedNotifications sets the optional parameter -// "withExtendedNotifications": Determines whether the customers receive -// notifications before migration. Only applicable to SF vms. -func (c *InstancesSimulateMaintenanceEventCall) WithExtendedNotifications(withExtendedNotifications bool) *InstancesSimulateMaintenanceEventCall { - c.urlParams_.Set("withExtendedNotifications", fmt.Sprint(withExtendedNotifications)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *InstancesSimulateMaintenanceEventCall { +func (c *InstancesSetNameCall) Fields(s ...googleapi.Field) *InstancesSetNameCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSimulateMaintenanceEventCall) Context(ctx context.Context) *InstancesSimulateMaintenanceEventCall { +func (c *InstancesSetNameCall) Context(ctx context.Context) *InstancesSetNameCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { +func (c *InstancesSetNameCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InstancesSetNameCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetnamerequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setName") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -34134,12 +33931,12 @@ func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.simulateMaintenanceEvent" call. +// Do executes the "compute.instances.setName" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetNameCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34171,27 +33968,32 @@ func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) return ret, nil } -type InstancesStartCall struct { +type InstancesSetSchedulingCall struct { s *Service project string zone string instance string + scheduling *Scheduling urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Start: Starts an instance that was stopped using the instances().stop -// method. For more information, see Restart an instance. +// SetScheduling: Sets an instance's scheduling options. You can only call this +// method on a stopped instance, that is, a VM instance that is in a +// `TERMINATED` state. See Instance Life Cycle for more information on the +// possible instance states. For more information about setting scheduling +// options for a VM, see Set VM host maintenance policy. // -// - instance: Name of the instance resource to start. +// - instance: Instance name for this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { - c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetScheduling(project string, zone string, instance string, scheduling *Scheduling) *InstancesSetSchedulingCall { + c := &InstancesSetSchedulingCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance + c.scheduling = scheduling return c } @@ -34205,7 +34007,7 @@ func (r *InstancesService) Start(project string, zone string, instance string) * // 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 *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { +func (c *InstancesSetSchedulingCall) RequestId(requestId string) *InstancesSetSchedulingCall { c.urlParams_.Set("requestId", requestId) return c } @@ -34213,32 +34015,36 @@ func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { +func (c *InstancesSetSchedulingCall) Fields(s ...googleapi.Field) *InstancesSetSchedulingCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall { +func (c *InstancesSetSchedulingCall) Context(ctx context.Context) *InstancesSetSchedulingCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesStartCall) Header() http.Header { +func (c *InstancesSetSchedulingCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InstancesSetSchedulingCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.scheduling) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/start") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setScheduling") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -34253,12 +34059,12 @@ func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.start" call. +// Do executes the "compute.instances.setScheduling" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetSchedulingCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34290,29 +34096,30 @@ func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error return ret, nil } -type InstancesStartWithEncryptionKeyCall struct { - s *Service - project string - zone string - instance string - instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetSecurityPolicyCall struct { + s *Service + project string + zone string + instance string + instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// StartWithEncryptionKey: Starts an instance that was stopped using the -// instances().stop method. For more information, see Restart an instance. +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the +// specified instance. For more information, see Google Cloud Armor Overview // -// - instance: Name of the instance resource to start. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { - c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the Instance resource to which the security policy +// should be set. The name should conform to RFC1035. +// - project: Project ID for this request. +// - zone: Name of the zone scoping this request. +func (r *InstancesService) SetSecurityPolicy(project string, zone string, instance string, instancessetsecuritypolicyrequest *InstancesSetSecurityPolicyRequest) *InstancesSetSecurityPolicyCall { + c := &InstancesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest + c.instancessetsecuritypolicyrequest = instancessetsecuritypolicyrequest return c } @@ -34326,7 +34133,7 @@ func (r *InstancesService) StartWithEncryptionKey(project string, zone string, i // 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 *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall { +func (c *InstancesSetSecurityPolicyCall) RequestId(requestId string) *InstancesSetSecurityPolicyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -34334,36 +34141,36 @@ func (c *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *Insta // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall { +func (c *InstancesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetSecurityPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall { +func (c *InstancesSetSecurityPolicyCall) Context(ctx context.Context) *InstancesSetSecurityPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { +func (c *InstancesSetSecurityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesstartwithencryptionkeyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetsecuritypolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setSecurityPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -34378,12 +34185,12 @@ func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.startWithEncryptionKey" call. +// Do executes the "compute.instances.setSecurityPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34415,40 +34222,30 @@ func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type InstancesStopCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetServiceAccountCall struct { + s *Service + project string + zone string + instance string + instancessetserviceaccountrequest *InstancesSetServiceAccountRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Stop: Stops a running instance, shutting it down cleanly, and allows you to -// restart the instance at a later time. Stopped instances do not incur VM -// usage charges while they are stopped. However, resources that the VM is -// using, such as persistent disks and static IP addresses, will continue to be -// charged until they are deleted. For more information, see Stopping an +// SetServiceAccount: Sets the service account on the instance. For more +// information, read Changing the service account and access scopes for an // instance. // -// - instance: Name of the instance resource to stop. +// - instance: Name of the instance resource to start. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { - c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetServiceAccount(project string, zone string, instance string, instancessetserviceaccountrequest *InstancesSetServiceAccountRequest) *InstancesSetServiceAccountCall { + c := &InstancesSetServiceAccountCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - return c -} - -// DiscardLocalSsd sets the optional parameter "discardLocalSsd": This property -// is required if the instance has any attached Local SSD disks. If false, -// Local SSD data will be preserved when the instance is suspended. If true, -// the contents of any attached Local SSD disks will be discarded. -func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStopCall { - c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) + c.instancessetserviceaccountrequest = instancessetserviceaccountrequest return c } @@ -34462,7 +34259,7 @@ func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStop // 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 *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { +func (c *InstancesSetServiceAccountCall) RequestId(requestId string) *InstancesSetServiceAccountCall { c.urlParams_.Set("requestId", requestId) return c } @@ -34470,32 +34267,36 @@ func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { +func (c *InstancesSetServiceAccountCall) Fields(s ...googleapi.Field) *InstancesSetServiceAccountCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall { +func (c *InstancesSetServiceAccountCall) Context(ctx context.Context) *InstancesSetServiceAccountCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesStopCall) Header() http.Header { +func (c *InstancesSetServiceAccountCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InstancesSetServiceAccountCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancessetserviceaccountrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/stop") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setServiceAccount") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -34510,12 +34311,12 @@ func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.stop" call. +// Do executes the "compute.instances.setServiceAccount" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetServiceAccountCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34547,41 +34348,31 @@ func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) return ret, nil } -type InstancesSuspendCall struct { - s *Service - project string - zone string - instance string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetShieldedInstanceIntegrityPolicyCall struct { + s *Service + project string + zone string + instance string + shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Suspend: This method suspends a running instance, saving its state to -// persistent storage, and allows you to resume the instance at a later time. -// Suspended instances have no compute costs (cores or RAM), and incur only -// storage charges for the saved VM memory and localSSD data. Any charged -// resources the virtual machine was using, such as persistent disks and static -// IP addresses, will continue to be charged while the instance is suspended. -// For more information, see Suspending and resuming an instance. +// SetShieldedInstanceIntegrityPolicy: Sets the Shielded Instance integrity +// policy for an instance. You can only use this method on a running instance. +// This method supports PATCH semantics and uses the JSON merge patch format +// and processing rules. // -// - instance: Name of the instance resource to suspend. +// - instance: Name or id of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Suspend(project string, zone string, instance string) *InstancesSuspendCall { - c := &InstancesSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetShieldedInstanceIntegrityPolicy(project string, zone string, instance string, shieldedinstanceintegritypolicy *ShieldedInstanceIntegrityPolicy) *InstancesSetShieldedInstanceIntegrityPolicyCall { + c := &InstancesSetShieldedInstanceIntegrityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - return c -} - -// DiscardLocalSsd sets the optional parameter "discardLocalSsd": This property -// is required if the instance has any attached Local SSD disks. If false, -// Local SSD data will be preserved when the instance is suspended. If true, -// the contents of any attached Local SSD disks will be discarded. -func (c *InstancesSuspendCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesSuspendCall { - c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) + c.shieldedinstanceintegritypolicy = shieldedinstanceintegritypolicy return c } @@ -34595,7 +34386,7 @@ func (c *InstancesSuspendCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesS // 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 *InstancesSuspendCall) RequestId(requestId string) *InstancesSuspendCall { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) RequestId(requestId string) *InstancesSetShieldedInstanceIntegrityPolicyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -34603,34 +34394,38 @@ func (c *InstancesSuspendCall) RequestId(requestId string) *InstancesSuspendCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesSuspendCall) Fields(s ...googleapi.Field) *InstancesSuspendCall { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Fields(s ...googleapi.Field) *InstancesSetShieldedInstanceIntegrityPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesSuspendCall) Context(ctx context.Context) *InstancesSuspendCall { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Context(ctx context.Context) *InstancesSetShieldedInstanceIntegrityPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesSuspendCall) Header() http.Header { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceintegritypolicy) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/suspend") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setShieldedInstanceIntegrityPolicy") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -34643,12 +34438,12 @@ func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.suspend" call. +// Do executes the "compute.instances.setShieldedInstanceIntegrityPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesSuspendCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSetShieldedInstanceIntegrityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34680,65 +34475,80 @@ func (c *InstancesSuspendCall) Do(opts ...googleapi.CallOption) (*Operation, err return ret, nil } -type InstancesTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSetTagsCall struct { + s *Service + project string + zone string + instance string + tags *Tags + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// SetTags: Sets network tags for the specified instance to the data included +// in the request. // +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall { - c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SetTags(project string, zone string, instance string, tags *Tags) *InstancesSetTagsCall { + c := &InstancesSetTagsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.instance = instance + c.tags = tags + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesSetTagsCall) RequestId(requestId string) *InstancesSetTagsCall { + 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 // details. -func (c *InstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstancesTestIamPermissionsCall { +func (c *InstancesSetTagsCall) Fields(s ...googleapi.Field) *InstancesSetTagsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesTestIamPermissionsCall) Context(ctx context.Context) *InstancesTestIamPermissionsCall { +func (c *InstancesSetTagsCall) Context(ctx context.Context) *InstancesSetTagsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesTestIamPermissionsCall) Header() http.Header { +func (c *InstancesSetTagsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesSetTagsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.tags) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/setTags") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -34748,18 +34558,17 @@ func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "resource": c.resource, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.testIamPermissions" call. +// Do executes the "compute.instances.setTags" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *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 *InstancesSetTagsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34778,7 +34587,7 @@ func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -34791,64 +34600,27 @@ func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Tes return ret, nil } -type InstancesUpdateCall struct { +type InstancesSimulateMaintenanceEventCall struct { s *Service project string zone string instance string - instance2 *Instance urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Update: Updates an instance only if the necessary resources are available. -// This method can update only a specific set of instance properties. See -// Updating a running instance for a list of updatable instance properties. +// SimulateMaintenanceEvent: Simulates a host maintenance event on a VM. For +// more information, see Simulate a host maintenance event. // -// - instance: Name of the instance resource to update. +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) Update(project string, zone string, instance string, instance2 *Instance) *InstancesUpdateCall { - c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) SimulateMaintenanceEvent(project string, zone string, instance string) *InstancesSimulateMaintenanceEventCall { + c := &InstancesSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.instance2 = instance2 - return c -} - -// MinimalAction sets the optional parameter "minimalAction": Specifies the -// action to take when updating an instance even if the updated properties do -// not require it. If not specified, then Compute Engine acts based on the -// minimum action that the updated properties require. -// -// Possible values: -// -// "INVALID" -// "NO_EFFECT" - No changes can be made to the instance. -// "REFRESH" - The instance will not restart. -// "RESTART" - The instance will restart. -func (c *InstancesUpdateCall) MinimalAction(minimalAction string) *InstancesUpdateCall { - c.urlParams_.Set("minimalAction", minimalAction) - return c -} - -// MostDisruptiveAllowedAction sets the optional parameter -// "mostDisruptiveAllowedAction": Specifies the most disruptive action that can -// be taken on the instance as part of the update. Compute Engine returns an -// error if the instance properties require a more disruptive action as part of -// the instance update. Valid options from lowest to highest are NO_EFFECT, -// REFRESH, and RESTART. -// -// Possible values: -// -// "INVALID" -// "NO_EFFECT" - No changes can be made to the instance. -// "REFRESH" - The instance will not restart. -// "RESTART" - The instance will restart. -func (c *InstancesUpdateCall) MostDisruptiveAllowedAction(mostDisruptiveAllowedAction string) *InstancesUpdateCall { - c.urlParams_.Set("mostDisruptiveAllowedAction", mostDisruptiveAllowedAction) return c } @@ -34862,46 +34634,50 @@ func (c *InstancesUpdateCall) MostDisruptiveAllowedAction(mostDisruptiveAllowedA // 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 *InstancesUpdateCall) RequestId(requestId string) *InstancesUpdateCall { +func (c *InstancesSimulateMaintenanceEventCall) RequestId(requestId string) *InstancesSimulateMaintenanceEventCall { c.urlParams_.Set("requestId", requestId) return c } +// WithExtendedNotifications sets the optional parameter +// "withExtendedNotifications": Determines whether the customers receive +// notifications before migration. Only applicable to SF vms. +func (c *InstancesSimulateMaintenanceEventCall) WithExtendedNotifications(withExtendedNotifications bool) *InstancesSimulateMaintenanceEventCall { + c.urlParams_.Set("withExtendedNotifications", fmt.Sprint(withExtendedNotifications)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall { +func (c *InstancesSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *InstancesSimulateMaintenanceEventCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall { +func (c *InstancesSimulateMaintenanceEventCall) Context(ctx context.Context) *InstancesSimulateMaintenanceEventCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesUpdateCall) Header() http.Header { +func (c *InstancesSimulateMaintenanceEventCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstancesSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance2) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/simulateMaintenanceEvent") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -34914,12 +34690,12 @@ func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.update" call. +// Do executes the "compute.instances.simulateMaintenanceEvent" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -34951,34 +34727,27 @@ func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, erro return ret, nil } -type InstancesUpdateAccessConfigCall struct { - s *Service - project string - zone string - instance string - accessconfig *AccessConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesStartCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateAccessConfig: Updates the specified access config from an instance's -// network interface with the data included in the request. This method -// supports PATCH semantics and uses the JSON merge patch format and processing -// rules. +// Start: Starts an instance that was stopped using the instances().stop +// method. For more information, see Restart an instance. // -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface where the access -// config is attached. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstancesService) UpdateAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesUpdateAccessConfigCall { - c := &InstancesUpdateAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: Name of the instance resource to start. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) Start(project string, zone string, instance string) *InstancesStartCall { + c := &InstancesStartCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.accessconfig = accessconfig return c } @@ -34992,7 +34761,7 @@ func (r *InstancesService) UpdateAccessConfig(project string, zone string, insta // 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 *InstancesUpdateAccessConfigCall) RequestId(requestId string) *InstancesUpdateAccessConfigCall { +func (c *InstancesStartCall) RequestId(requestId string) *InstancesStartCall { c.urlParams_.Set("requestId", requestId) return c } @@ -35000,36 +34769,32 @@ func (c *InstancesUpdateAccessConfigCall) RequestId(requestId string) *Instances // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesUpdateAccessConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateAccessConfigCall { +func (c *InstancesStartCall) Fields(s ...googleapi.Field) *InstancesStartCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateAccessConfigCall) Context(ctx context.Context) *InstancesUpdateAccessConfigCall { +func (c *InstancesStartCall) Context(ctx context.Context) *InstancesStartCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesUpdateAccessConfigCall) Header() http.Header { +func (c *InstancesStartCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstancesStartCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/start") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -35044,12 +34809,12 @@ func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.updateAccessConfig" call. +// Do executes the "compute.instances.start" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35081,30 +34846,29 @@ func (c *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type InstancesUpdateDisplayDeviceCall struct { - s *Service - project string - zone string - instance string - displaydevice *DisplayDevice - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesStartWithEncryptionKeyCall struct { + s *Service + project string + zone string + instance string + instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateDisplayDevice: Updates the Display config for a VM instance. You can -// only use this method on a stopped VM instance. This method supports PATCH -// semantics and uses the JSON merge patch format and processing rules. +// StartWithEncryptionKey: Starts an instance that was stopped using the +// instances().stop method. For more information, see Restart an instance. // -// - instance: Name of the instance scoping this request. +// - instance: Name of the instance resource to start. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) UpdateDisplayDevice(project string, zone string, instance string, displaydevice *DisplayDevice) *InstancesUpdateDisplayDeviceCall { - c := &InstancesUpdateDisplayDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) StartWithEncryptionKey(project string, zone string, instance string, instancesstartwithencryptionkeyrequest *InstancesStartWithEncryptionKeyRequest) *InstancesStartWithEncryptionKeyCall { + c := &InstancesStartWithEncryptionKeyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.displaydevice = displaydevice + c.instancesstartwithencryptionkeyrequest = instancesstartwithencryptionkeyrequest return c } @@ -35118,7 +34882,7 @@ func (r *InstancesService) UpdateDisplayDevice(project string, zone string, inst // 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 *InstancesUpdateDisplayDeviceCall) RequestId(requestId string) *InstancesUpdateDisplayDeviceCall { +func (c *InstancesStartWithEncryptionKeyCall) RequestId(requestId string) *InstancesStartWithEncryptionKeyCall { c.urlParams_.Set("requestId", requestId) return c } @@ -35126,38 +34890,38 @@ func (c *InstancesUpdateDisplayDeviceCall) RequestId(requestId string) *Instance // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesUpdateDisplayDeviceCall) Fields(s ...googleapi.Field) *InstancesUpdateDisplayDeviceCall { +func (c *InstancesStartWithEncryptionKeyCall) Fields(s ...googleapi.Field) *InstancesStartWithEncryptionKeyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateDisplayDeviceCall) Context(ctx context.Context) *InstancesUpdateDisplayDeviceCall { +func (c *InstancesStartWithEncryptionKeyCall) Context(ctx context.Context) *InstancesStartWithEncryptionKeyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesUpdateDisplayDeviceCall) Header() http.Header { +func (c *InstancesStartWithEncryptionKeyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesStartWithEncryptionKeyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.displaydevice) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancesstartwithencryptionkeyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/startWithEncryptionKey") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -35170,12 +34934,12 @@ func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.updateDisplayDevice" call. +// Do executes the "compute.instances.startWithEncryptionKey" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesStartWithEncryptionKeyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35207,34 +34971,40 @@ func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Op return ret, nil } -type InstancesUpdateNetworkInterfaceCall struct { - s *Service - project string - zone string - instance string - networkinterface *NetworkInterface - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesStopCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateNetworkInterface: Updates an instance's network interface. This method -// can only update an interface's alias IP range and attached network. See -// Modifying alias IP ranges for an existing instance for instructions on -// changing alias IP ranges. See Migrating a VM between networks for -// instructions on migrating an interface. This method follows PATCH semantics. +// Stop: Stops a running instance, shutting it down cleanly, and allows you to +// restart the instance at a later time. Stopped instances do not incur VM +// usage charges while they are stopped. However, resources that the VM is +// using, such as persistent disks and static IP addresses, will continue to be +// charged until they are deleted. For more information, see Stopping an +// instance. // -// - instance: The instance name for this request. -// - networkInterface: The name of the network interface to update. +// - instance: Name of the instance resource to stop. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall { - c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Stop(project string, zone string, instance string) *InstancesStopCall { + c := &InstancesStopCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.urlParams_.Set("networkInterface", networkInterface) - c.networkinterface = networkinterface + return c +} + +// DiscardLocalSsd sets the optional parameter "discardLocalSsd": This property +// is required if the instance has any attached Local SSD disks. If false, +// Local SSD data will be preserved when the instance is suspended. If true, +// the contents of any attached Local SSD disks will be discarded. +func (c *InstancesStopCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesStopCall { + c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) return c } @@ -35248,7 +35018,7 @@ func (r *InstancesService) UpdateNetworkInterface(project string, zone string, i // 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 *InstancesUpdateNetworkInterfaceCall) RequestId(requestId string) *InstancesUpdateNetworkInterfaceCall { +func (c *InstancesStopCall) RequestId(requestId string) *InstancesStopCall { c.urlParams_.Set("requestId", requestId) return c } @@ -35256,38 +35026,34 @@ func (c *InstancesUpdateNetworkInterfaceCall) RequestId(requestId string) *Insta // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesUpdateNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesUpdateNetworkInterfaceCall { +func (c *InstancesStopCall) Fields(s ...googleapi.Field) *InstancesStopCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateNetworkInterfaceCall) Context(ctx context.Context) *InstancesUpdateNetworkInterfaceCall { +func (c *InstancesStopCall) Context(ctx context.Context) *InstancesStopCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header { +func (c *InstancesStopCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstancesStopCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkinterface) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/stop") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -35300,12 +35066,12 @@ func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.updateNetworkInterface" call. +// Do executes the "compute.instances.stop" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35337,31 +35103,41 @@ func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type InstancesUpdateShieldedInstanceConfigCall struct { - s *Service - project string - zone string - instance string - shieldedinstanceconfig *ShieldedInstanceConfig - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesSuspendCall struct { + s *Service + project string + zone string + instance string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// UpdateShieldedInstanceConfig: Updates the Shielded Instance config for an -// instance. You can only use this method on a stopped instance. This method -// supports PATCH semantics and uses the JSON merge patch format and processing -// rules. +// Suspend: This method suspends a running instance, saving its state to +// persistent storage, and allows you to resume the instance at a later time. +// Suspended instances have no compute costs (cores or RAM), and incur only +// storage charges for the saved VM memory and localSSD data. Any charged +// resources the virtual machine was using, such as persistent disks and static +// IP addresses, will continue to be charged while the instance is suspended. +// For more information, see Suspending and resuming an instance. // -// - instance: Name or id of the instance scoping this request. +// - instance: Name of the instance resource to suspend. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone string, instance string, shieldedinstanceconfig *ShieldedInstanceConfig) *InstancesUpdateShieldedInstanceConfigCall { - c := &InstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Suspend(project string, zone string, instance string) *InstancesSuspendCall { + c := &InstancesSuspendCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.instance = instance - c.shieldedinstanceconfig = shieldedinstanceconfig + return c +} + +// DiscardLocalSsd sets the optional parameter "discardLocalSsd": This property +// is required if the instance has any attached Local SSD disks. If false, +// Local SSD data will be preserved when the instance is suspended. If true, +// the contents of any attached Local SSD disks will be discarded. +func (c *InstancesSuspendCall) DiscardLocalSsd(discardLocalSsd bool) *InstancesSuspendCall { + c.urlParams_.Set("discardLocalSsd", fmt.Sprint(discardLocalSsd)) return c } @@ -35375,7 +35151,7 @@ func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone str // 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 *InstancesUpdateShieldedInstanceConfigCall) RequestId(requestId string) *InstancesUpdateShieldedInstanceConfigCall { +func (c *InstancesSuspendCall) RequestId(requestId string) *InstancesSuspendCall { c.urlParams_.Set("requestId", requestId) return c } @@ -35383,38 +35159,34 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) RequestId(requestId string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstancesUpdateShieldedInstanceConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedInstanceConfigCall { +func (c *InstancesSuspendCall) Fields(s ...googleapi.Field) *InstancesSuspendCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstancesUpdateShieldedInstanceConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedInstanceConfigCall { +func (c *InstancesSuspendCall) Context(ctx context.Context) *InstancesSuspendCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstancesUpdateShieldedInstanceConfigCall) Header() http.Header { +func (c *InstancesSuspendCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstancesSuspendCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceconfig) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/suspend") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -35427,12 +35199,12 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instances.updateShieldedInstanceConfig" call. +// Do executes the "compute.instances.suspend" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesSuspendCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35464,184 +35236,86 @@ func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOpt return ret, nil } -type InstantSnapshotsAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AggregatedList: Retrieves an aggregated list of instantSnapshots. To prevent -// failure, Google recommends that you set the `returnPartialSuccess` parameter -// to `true`. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // // - project: Project ID for this request. -func (r *InstantSnapshotsService) AggregatedList(project string) *InstantSnapshotsAggregatedListCall { - c := &InstantSnapshotsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstancesTestIamPermissionsCall { + c := &InstancesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *InstantSnapshotsAggregatedListCall) Filter(filter string) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *InstantSnapshotsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InstantSnapshotsAggregatedListCall) MaxResults(maxResults int64) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *InstantSnapshotsAggregatedListCall) OrderBy(orderBy string) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *InstantSnapshotsAggregatedListCall) PageToken(pageToken string) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *InstantSnapshotsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *InstantSnapshotsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstantSnapshotsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstantSnapshotsAggregatedListCall) Fields(s ...googleapi.Field) *InstantSnapshotsAggregatedListCall { +func (c *InstancesTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstancesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstantSnapshotsAggregatedListCall) IfNoneMatch(entityTag string) *InstantSnapshotsAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsAggregatedListCall) Context(ctx context.Context) *InstantSnapshotsAggregatedListCall { +func (c *InstancesTestIamPermissionsCall) Context(ctx context.Context) *InstancesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstantSnapshotsAggregatedListCall) Header() http.Header { +func (c *InstancesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstantSnapshotsAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InstancesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instantSnapshots") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{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{ - "project": c.project, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instantSnapshots.aggregatedList" call. +// Do executes the "compute.instances.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshotAggregatedList.ServerResponse.Header or (if a response was +// *TestPermissionsResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InstantSnapshotsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotAggregatedList, error) { +func (c *InstancesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35660,7 +35334,7 @@ func (c *InstantSnapshotsAggregatedListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstantSnapshotAggregatedList{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35673,52 +35347,64 @@ func (c *InstantSnapshotsAggregatedListCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InstantSnapshotsAggregatedListCall) Pages(ctx context.Context, f func(*InstantSnapshotAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type InstantSnapshotsDeleteCall struct { - s *Service - project string - zone string - instantSnapshot string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesUpdateCall struct { + s *Service + project string + zone string + instance string + instance2 *Instance + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified InstantSnapshot resource. Keep in mind that -// deleting a single instantSnapshot might not necessarily delete all the data -// on that instantSnapshot. If any data on the instantSnapshot that is marked -// for deletion is needed for subsequent instantSnapshots, the data will be -// moved to the next corresponding instantSnapshot. For more information, see -// Deleting instantSnapshots. +// Update: Updates an instance only if the necessary resources are available. +// This method can update only a specific set of instance properties. See +// Updating a running instance for a list of updatable instance properties. // -// - instantSnapshot: Name of the InstantSnapshot resource to delete. +// - instance: Name of the instance resource to update. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) Delete(project string, zone string, instantSnapshot string) *InstantSnapshotsDeleteCall { - c := &InstantSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) Update(project string, zone string, instance string, instance2 *Instance) *InstancesUpdateCall { + c := &InstancesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instantSnapshot = instantSnapshot + c.instance = instance + c.instance2 = instance2 + return c +} + +// MinimalAction sets the optional parameter "minimalAction": Specifies the +// action to take when updating an instance even if the updated properties do +// not require it. If not specified, then Compute Engine acts based on the +// minimum action that the updated properties require. +// +// Possible values: +// +// "INVALID" +// "NO_EFFECT" - No changes can be made to the instance. +// "REFRESH" - The instance will not restart. +// "RESTART" - The instance will restart. +func (c *InstancesUpdateCall) MinimalAction(minimalAction string) *InstancesUpdateCall { + c.urlParams_.Set("minimalAction", minimalAction) + return c +} + +// MostDisruptiveAllowedAction sets the optional parameter +// "mostDisruptiveAllowedAction": Specifies the most disruptive action that can +// be taken on the instance as part of the update. Compute Engine returns an +// error if the instance properties require a more disruptive action as part of +// the instance update. Valid options from lowest to highest are NO_EFFECT, +// REFRESH, and RESTART. +// +// Possible values: +// +// "INVALID" +// "NO_EFFECT" - No changes can be made to the instance. +// "REFRESH" - The instance will not restart. +// "RESTART" - The instance will restart. +func (c *InstancesUpdateCall) MostDisruptiveAllowedAction(mostDisruptiveAllowedAction string) *InstancesUpdateCall { + c.urlParams_.Set("mostDisruptiveAllowedAction", mostDisruptiveAllowedAction) return c } @@ -35732,7 +35418,7 @@ func (r *InstantSnapshotsService) Delete(project string, zone string, instantSna // 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 *InstantSnapshotsDeleteCall) RequestId(requestId string) *InstantSnapshotsDeleteCall { +func (c *InstancesUpdateCall) RequestId(requestId string) *InstancesUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -35740,52 +35426,56 @@ func (c *InstantSnapshotsDeleteCall) RequestId(requestId string) *InstantSnapsho // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstantSnapshotsDeleteCall) Fields(s ...googleapi.Field) *InstantSnapshotsDeleteCall { +func (c *InstancesUpdateCall) Fields(s ...googleapi.Field) *InstancesUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsDeleteCall) Context(ctx context.Context) *InstantSnapshotsDeleteCall { +func (c *InstancesUpdateCall) Context(ctx context.Context) *InstancesUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstantSnapshotsDeleteCall) Header() http.Header { +func (c *InstancesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstantSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InstancesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instance2) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "instantSnapshot": c.instantSnapshot, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instantSnapshots.delete" call. +// Do executes the "compute.instances.update" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstantSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35817,91 +35507,105 @@ func (c *InstantSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio return ret, nil } -type InstantSnapshotsGetCall struct { - s *Service - project string - zone string - instantSnapshot string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesUpdateAccessConfigCall struct { + s *Service + project string + zone string + instance string + accessconfig *AccessConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified InstantSnapshot resource in the specified zone. +// UpdateAccessConfig: Updates the specified access config from an instance's +// network interface with the data included in the request. This method +// supports PATCH semantics and uses the JSON merge patch format and processing +// rules. // -// - instantSnapshot: Name of the InstantSnapshot resource to return. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) Get(project string, zone string, instantSnapshot string) *InstantSnapshotsGetCall { - c := &InstantSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instance: The instance name for this request. +// - networkInterface: The name of the network interface where the access +// config is attached. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) UpdateAccessConfig(project string, zone string, instance string, networkInterface string, accessconfig *AccessConfig) *InstancesUpdateAccessConfigCall { + c := &InstancesUpdateAccessConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instantSnapshot = instantSnapshot + c.instance = instance + c.urlParams_.Set("networkInterface", networkInterface) + c.accessconfig = accessconfig + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesUpdateAccessConfigCall) RequestId(requestId string) *InstancesUpdateAccessConfigCall { + 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 // details. -func (c *InstantSnapshotsGetCall) Fields(s ...googleapi.Field) *InstantSnapshotsGetCall { +func (c *InstancesUpdateAccessConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateAccessConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstantSnapshotsGetCall) IfNoneMatch(entityTag string) *InstantSnapshotsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsGetCall) Context(ctx context.Context) *InstantSnapshotsGetCall { +func (c *InstancesUpdateAccessConfigCall) Context(ctx context.Context) *InstancesUpdateAccessConfigCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstantSnapshotsGetCall) Header() http.Header { +func (c *InstancesUpdateAccessConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstantSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InstancesUpdateAccessConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.accessconfig) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateAccessConfig") 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{ - "project": c.project, - "zone": c.zone, - "instantSnapshot": c.instantSnapshot, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instantSnapshots.get" call. +// Do executes the "compute.instances.updateAccessConfig" call. // Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshot.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstantSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshot, error) { +// *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 *InstancesUpdateAccessConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -35920,7 +35624,7 @@ func (c *InstantSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstantSnapshot{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -35933,80 +35637,213 @@ func (c *InstantSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnap return ret, nil } -type InstantSnapshotsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstancesUpdateDisplayDeviceCall struct { + s *Service + project string + zone string + instance string + displaydevice *DisplayDevice + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// UpdateDisplayDevice: Updates the Display config for a VM instance. You can +// only use this method on a stopped VM instance. This method supports PATCH +// semantics and uses the JSON merge patch format and processing rules. // +// - instance: Name of the instance scoping this request. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) GetIamPolicy(project string, zone string, resource string) *InstantSnapshotsGetIamPolicyCall { - c := &InstantSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstancesService) UpdateDisplayDevice(project string, zone string, instance string, displaydevice *DisplayDevice) *InstancesUpdateDisplayDeviceCall { + c := &InstancesUpdateDisplayDeviceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource + c.instance = instance + c.displaydevice = displaydevice return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *InstantSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstantSnapshotsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesUpdateDisplayDeviceCall) RequestId(requestId string) *InstancesUpdateDisplayDeviceCall { + 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 // details. -func (c *InstantSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotsGetIamPolicyCall { +func (c *InstancesUpdateDisplayDeviceCall) Fields(s ...googleapi.Field) *InstancesUpdateDisplayDeviceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InstantSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *InstantSnapshotsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. +func (c *InstancesUpdateDisplayDeviceCall) Context(ctx context.Context) *InstancesUpdateDisplayDeviceCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstancesUpdateDisplayDeviceCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstancesUpdateDisplayDeviceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.displaydevice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateDisplayDevice") + 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{ + "project": c.project, + "zone": c.zone, + "instance": c.instance, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instances.updateDisplayDevice" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *InstancesUpdateDisplayDeviceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type InstancesUpdateNetworkInterfaceCall struct { + s *Service + project string + zone string + instance string + networkinterface *NetworkInterface + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// UpdateNetworkInterface: Updates an instance's network interface. This method +// can only update an interface's alias IP range and attached network. See +// Modifying alias IP ranges for an existing instance for instructions on +// changing alias IP ranges. See Migrating a VM between networks for +// instructions on migrating an interface. This method follows PATCH semantics. +// +// - instance: The instance name for this request. +// - networkInterface: The name of the network interface to update. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *InstancesService) UpdateNetworkInterface(project string, zone string, instance string, networkInterface string, networkinterface *NetworkInterface) *InstancesUpdateNetworkInterfaceCall { + c := &InstancesUpdateNetworkInterfaceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instance = instance + c.urlParams_.Set("networkInterface", networkInterface) + c.networkinterface = networkinterface + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstancesUpdateNetworkInterfaceCall) RequestId(requestId string) *InstancesUpdateNetworkInterfaceCall { + 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 +// details. +func (c *InstancesUpdateNetworkInterfaceCall) Fields(s ...googleapi.Field) *InstancesUpdateNetworkInterfaceCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsGetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotsGetIamPolicyCall { +func (c *InstancesUpdateNetworkInterfaceCall) Context(ctx context.Context) *InstancesUpdateNetworkInterfaceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstantSnapshotsGetIamPolicyCall) Header() http.Header { +func (c *InstancesUpdateNetworkInterfaceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstantSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InstancesUpdateNetworkInterfaceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkinterface) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateNetworkInterface") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -36014,17 +35851,17 @@ func (c *InstantSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response googleapi.Expand(req.URL, map[string]string{ "project": c.project, "zone": c.zone, - "resource": c.resource, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instantSnapshots.getIamPolicy" call. +// Do executes the "compute.instances.updateNetworkInterface" call. // 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 +// *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 *InstantSnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *InstancesUpdateNetworkInterfaceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36043,7 +35880,7 @@ func (c *InstantSnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po 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, @@ -36056,25 +35893,31 @@ func (c *InstantSnapshotsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po return ret, nil } -type InstantSnapshotsInsertCall struct { - s *Service - project string - zone string - instantsnapshot *InstantSnapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstancesUpdateShieldedInstanceConfigCall struct { + s *Service + project string + zone string + instance string + shieldedinstanceconfig *ShieldedInstanceConfig + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates an instant snapshot in the specified zone. +// UpdateShieldedInstanceConfig: Updates the Shielded Instance config for an +// instance. You can only use this method on a stopped instance. This method +// supports PATCH semantics and uses the JSON merge patch format and processing +// rules. // +// - instance: Name or id of the instance scoping this request. // - project: Project ID for this request. -// - zone: Name of the zone for this request. -func (r *InstantSnapshotsService) Insert(project string, zone string, instantsnapshot *InstantSnapshot) *InstantSnapshotsInsertCall { - c := &InstantSnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *InstancesService) UpdateShieldedInstanceConfig(project string, zone string, instance string, shieldedinstanceconfig *ShieldedInstanceConfig) *InstancesUpdateShieldedInstanceConfigCall { + c := &InstancesUpdateShieldedInstanceConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.instantsnapshot = instantsnapshot + c.instance = instance + c.shieldedinstanceconfig = shieldedinstanceconfig return c } @@ -36088,7 +35931,7 @@ func (r *InstantSnapshotsService) Insert(project string, zone string, instantsna // 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 *InstantSnapshotsInsertCall) RequestId(requestId string) *InstantSnapshotsInsertCall { +func (c *InstancesUpdateShieldedInstanceConfigCall) RequestId(requestId string) *InstancesUpdateShieldedInstanceConfigCall { c.urlParams_.Set("requestId", requestId) return c } @@ -36096,55 +35939,56 @@ func (c *InstantSnapshotsInsertCall) RequestId(requestId string) *InstantSnapsho // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstantSnapshotsInsertCall) Fields(s ...googleapi.Field) *InstantSnapshotsInsertCall { +func (c *InstancesUpdateShieldedInstanceConfigCall) Fields(s ...googleapi.Field) *InstancesUpdateShieldedInstanceConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsInsertCall) Context(ctx context.Context) *InstantSnapshotsInsertCall { +func (c *InstancesUpdateShieldedInstanceConfigCall) Context(ctx context.Context) *InstancesUpdateShieldedInstanceConfigCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstantSnapshotsInsertCall) Header() http.Header { +func (c *InstancesUpdateShieldedInstanceConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstantSnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *InstancesUpdateShieldedInstanceConfigCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantsnapshot) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.shieldedinstanceconfig) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instances/{instance}/updateShieldedInstanceConfig") 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{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "instance": c.instance, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instantSnapshots.insert" call. +// Do executes the "compute.instances.updateShieldedInstanceConfig" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InstantSnapshotsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstancesUpdateShieldedInstanceConfigCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36176,25 +36020,23 @@ func (c *InstantSnapshotsInsertCall) Do(opts ...googleapi.CallOption) (*Operatio return ret, nil } -type InstantSnapshotsListCall struct { +type InstantSnapshotsAggregatedListCall struct { s *Service project string - zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of InstantSnapshot resources contained within the -// specified zone. +// AggregatedList: Retrieves an aggregated list of instantSnapshots. To prevent +// failure, Google recommends that you set the `returnPartialSuccess` parameter +// to `true`. // // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) List(project string, zone string) *InstantSnapshotsListCall { - c := &InstantSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) AggregatedList(project string) *InstantSnapshotsAggregatedListCall { + c := &InstantSnapshotsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone return c } @@ -36230,17 +36072,30 @@ func (r *InstantSnapshotsService) List(project string, zone string) *InstantSnap // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *InstantSnapshotsListCall) Filter(filter string) *InstantSnapshotsListCall { +func (c *InstantSnapshotsAggregatedListCall) Filter(filter string) *InstantSnapshotsAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *InstantSnapshotsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InstantSnapshotsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InstantSnapshotsListCall) MaxResults(maxResults int64) *InstantSnapshotsListCall { +func (c *InstantSnapshotsAggregatedListCall) MaxResults(maxResults int64) *InstantSnapshotsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -36253,7 +36108,7 @@ func (c *InstantSnapshotsListCall) MaxResults(maxResults int64) *InstantSnapshot // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *InstantSnapshotsListCall) OrderBy(orderBy string) *InstantSnapshotsListCall { +func (c *InstantSnapshotsAggregatedListCall) OrderBy(orderBy string) *InstantSnapshotsAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -36261,7 +36116,7 @@ func (c *InstantSnapshotsListCall) OrderBy(orderBy string) *InstantSnapshotsList // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *InstantSnapshotsListCall) PageToken(pageToken string) *InstantSnapshotsListCall { +func (c *InstantSnapshotsAggregatedListCall) PageToken(pageToken string) *InstantSnapshotsAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -36271,15 +36126,23 @@ func (c *InstantSnapshotsListCall) PageToken(pageToken string) *InstantSnapshots // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *InstantSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotsListCall { +func (c *InstantSnapshotsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotsAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *InstantSnapshotsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InstantSnapshotsAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstantSnapshotsListCall) Fields(s ...googleapi.Field) *InstantSnapshotsListCall { +func (c *InstantSnapshotsAggregatedListCall) Fields(s ...googleapi.Field) *InstantSnapshotsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36287,27 +36150,27 @@ func (c *InstantSnapshotsListCall) Fields(s ...googleapi.Field) *InstantSnapshot // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InstantSnapshotsListCall) IfNoneMatch(entityTag string) *InstantSnapshotsListCall { +func (c *InstantSnapshotsAggregatedListCall) IfNoneMatch(entityTag string) *InstantSnapshotsAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsListCall) Context(ctx context.Context) *InstantSnapshotsListCall { +func (c *InstantSnapshotsAggregatedListCall) Context(ctx context.Context) *InstantSnapshotsAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstantSnapshotsListCall) Header() http.Header { +func (c *InstantSnapshotsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstantSnapshotsListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -36315,7 +36178,7 @@ func (c *InstantSnapshotsListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/instantSnapshots") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -36324,18 +36187,17 @@ func (c *InstantSnapshotsListCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instantSnapshots.list" call. +// Do executes the "compute.instantSnapshots.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *InstantSnapshotList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InstantSnapshotsListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotList, error) { +// *InstantSnapshotAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstantSnapshotsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36354,7 +36216,7 @@ func (c *InstantSnapshotsListCall) Do(opts ...googleapi.CallOption) (*InstantSna if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstantSnapshotList{ + ret := &InstantSnapshotAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36370,7 +36232,7 @@ func (c *InstantSnapshotsListCall) Do(opts ...googleapi.CallOption) (*InstantSna // 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 *InstantSnapshotsListCall) Pages(ctx context.Context, f func(*InstantSnapshotList) error) error { +func (c *InstantSnapshotsAggregatedListCall) Pages(ctx context.Context, f func(*InstantSnapshotAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -36388,85 +36250,98 @@ func (c *InstantSnapshotsListCall) Pages(ctx context.Context, f func(*InstantSna } } -type InstantSnapshotsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsDeleteCall struct { + s *Service + project string + zone string + instantSnapshot string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. +// Delete: Deletes the specified InstantSnapshot resource. Keep in mind that +// deleting a single instantSnapshot might not necessarily delete all the data +// on that instantSnapshot. If any data on the instantSnapshot that is marked +// for deletion is needed for subsequent instantSnapshots, the data will be +// moved to the next corresponding instantSnapshot. For more information, see +// Deleting instantSnapshots. // +// - instantSnapshot: Name of the InstantSnapshot resource to delete. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstantSnapshotsSetIamPolicyCall { - c := &InstantSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) Delete(project string, zone string, instantSnapshot string) *InstantSnapshotsDeleteCall { + c := &InstantSnapshotsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest + c.instantSnapshot = instantSnapshot + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstantSnapshotsDeleteCall) RequestId(requestId string) *InstantSnapshotsDeleteCall { + 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 // details. -func (c *InstantSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotsSetIamPolicyCall { +func (c *InstantSnapshotsDeleteCall) Fields(s ...googleapi.Field) *InstantSnapshotsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsSetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotsSetIamPolicyCall { +func (c *InstantSnapshotsDeleteCall) Context(ctx context.Context) *InstantSnapshotsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstantSnapshotsSetIamPolicyCall) Header() http.Header { +func (c *InstantSnapshotsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstantSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InstantSnapshotsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}") 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "instantSnapshot": c.instantSnapshot, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instantSnapshots.setIamPolicy" call. +// Do executes the "compute.instantSnapshots.delete" call. // 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 +// *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 *InstantSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *InstantSnapshotsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36485,7 +36360,7 @@ func (c *InstantSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po 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, @@ -36498,100 +36373,91 @@ func (c *InstantSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Po return ret, nil } -type InstantSnapshotsSetLabelsCall struct { - s *Service - project string - zone string - resource string - zonesetlabelsrequest *ZoneSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsGetCall struct { + s *Service + project string + zone string + instantSnapshot string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on a instantSnapshot in the given zone. To learn -// more about labels, read the Labeling Resources documentation. +// Get: Returns the specified InstantSnapshot resource in the specified zone. // +// - instantSnapshot: Name of the InstantSnapshot resource to return. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *InstantSnapshotsSetLabelsCall { - c := &InstantSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) Get(project string, zone string, instantSnapshot string) *InstantSnapshotsGetCall { + c := &InstantSnapshotsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - c.zonesetlabelsrequest = zonesetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstantSnapshotsSetLabelsCall) RequestId(requestId string) *InstantSnapshotsSetLabelsCall { - c.urlParams_.Set("requestId", requestId) + c.instantSnapshot = instantSnapshot return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InstantSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *InstantSnapshotsSetLabelsCall { +func (c *InstantSnapshotsGetCall) Fields(s ...googleapi.Field) *InstantSnapshotsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InstantSnapshotsGetCall) IfNoneMatch(entityTag string) *InstantSnapshotsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsSetLabelsCall) Context(ctx context.Context) *InstantSnapshotsSetLabelsCall { +func (c *InstantSnapshotsGetCall) Context(ctx context.Context) *InstantSnapshotsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstantSnapshotsSetLabelsCall) Header() http.Header { +func (c *InstantSnapshotsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstantSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetlabelsrequest) - if err != nil { - return nil, err +func (c *InstantSnapshotsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{instantSnapshot}") 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "instantSnapshot": c.instantSnapshot, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instantSnapshots.setLabels" call. +// Do executes the "compute.instantSnapshots.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InstantSnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *InstantSnapshot.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InstantSnapshotsGetCall) Do(opts ...googleapi.CallOption) (*InstantSnapshot, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36610,7 +36476,7 @@ func (c *InstantSnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InstantSnapshot{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36623,65 +36489,199 @@ func (c *InstantSnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Opera return ret, nil } -type InstantSnapshotsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsGetIamPolicyCall struct { + s *Service + project string + zone string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *InstantSnapshotsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstantSnapshotsTestIamPermissionsCall { - c := &InstantSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InstantSnapshotsService) GetIamPolicy(project string, zone string, resource string) *InstantSnapshotsGetIamPolicyCall { + c := &InstantSnapshotsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *InstantSnapshotsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *InstantSnapshotsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 // details. -func (c *InstantSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstantSnapshotsTestIamPermissionsCall { +func (c *InstantSnapshotsGetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. -func (c *InstantSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *InstantSnapshotsTestIamPermissionsCall { - c.ctx_ = ctx +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InstantSnapshotsGetIamPolicyCall) IfNoneMatch(entityTag string) *InstantSnapshotsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstantSnapshotsGetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotsGetIamPolicyCall { + c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InstantSnapshotsTestIamPermissionsCall) Header() http.Header { +func (c *InstantSnapshotsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{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{ + "project": c.project, + "zone": c.zone, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.instantSnapshots.getIamPolicy" call. +// 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 *InstantSnapshotsGetIamPolicyCall) 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 +} + +type InstantSnapshotsInsertCall struct { + s *Service + project string + zone string + instantsnapshot *InstantSnapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates an instant snapshot in the specified zone. +// +// - project: Project ID for this request. +// - zone: Name of the zone for this request. +func (r *InstantSnapshotsService) Insert(project string, zone string, instantsnapshot *InstantSnapshot) *InstantSnapshotsInsertCall { + c := &InstantSnapshotsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.instantsnapshot = instantsnapshot + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstantSnapshotsInsertCall) RequestId(requestId string) *InstantSnapshotsInsertCall { + 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 +// details. +func (c *InstantSnapshotsInsertCall) Fields(s ...googleapi.Field) *InstantSnapshotsInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InstantSnapshotsInsertCall) Context(ctx context.Context) *InstantSnapshotsInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InstantSnapshotsInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *InstantSnapshotsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantsnapshot) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -36689,20 +36689,18 @@ func (c *InstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Re } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.instantSnapshots.testIamPermissions" call. +// Do executes the "compute.instantSnapshots.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *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 *InstantSnapshotsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36721,7 +36719,7 @@ func (c *InstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36734,23 +36732,25 @@ func (c *InstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption return ret, nil } -type InterconnectAttachmentsAggregatedListCall struct { +type InstantSnapshotsListCall struct { s *Service project string + zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of interconnect attachments. To -// prevent failure, Google recommends that you set the `returnPartialSuccess` -// parameter to `true`. +// List: Retrieves the list of InstantSnapshot resources contained within the +// specified zone. // // - project: Project ID for this request. -func (r *InterconnectAttachmentsService) AggregatedList(project string) *InterconnectAttachmentsAggregatedListCall { - c := &InterconnectAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *InstantSnapshotsService) List(project string, zone string) *InstantSnapshotsListCall { + c := &InstantSnapshotsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone return c } @@ -36786,30 +36786,17 @@ func (r *InterconnectAttachmentsService) AggregatedList(project string) *Interco // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *InterconnectAttachmentsAggregatedListCall) Filter(filter string) *InterconnectAttachmentsAggregatedListCall { +func (c *InstantSnapshotsListCall) Filter(filter string) *InstantSnapshotsListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *InterconnectAttachmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectAttachmentsAggregatedListCall) MaxResults(maxResults int64) *InterconnectAttachmentsAggregatedListCall { +func (c *InstantSnapshotsListCall) MaxResults(maxResults int64) *InstantSnapshotsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -36822,7 +36809,7 @@ func (c *InterconnectAttachmentsAggregatedListCall) MaxResults(maxResults int64) // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *InterconnectAttachmentsAggregatedListCall) OrderBy(orderBy string) *InterconnectAttachmentsAggregatedListCall { +func (c *InstantSnapshotsListCall) OrderBy(orderBy string) *InstantSnapshotsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -36830,7 +36817,7 @@ func (c *InterconnectAttachmentsAggregatedListCall) OrderBy(orderBy string) *Int // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *InterconnectAttachmentsAggregatedListCall) PageToken(pageToken string) *InterconnectAttachmentsAggregatedListCall { +func (c *InstantSnapshotsListCall) PageToken(pageToken string) *InstantSnapshotsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -36840,23 +36827,15 @@ func (c *InterconnectAttachmentsAggregatedListCall) PageToken(pageToken string) // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *InterconnectAttachmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectAttachmentsAggregatedListCall { +func (c *InstantSnapshotsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InstantSnapshotsListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *InterconnectAttachmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InterconnectAttachmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsAggregatedListCall { +func (c *InstantSnapshotsListCall) Fields(s ...googleapi.Field) *InstantSnapshotsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -36864,27 +36843,27 @@ func (c *InterconnectAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InterconnectAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsAggregatedListCall { +func (c *InstantSnapshotsListCall) IfNoneMatch(entityTag string) *InstantSnapshotsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsAggregatedListCall) Context(ctx context.Context) *InterconnectAttachmentsAggregatedListCall { +func (c *InstantSnapshotsListCall) Context(ctx context.Context) *InstantSnapshotsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectAttachmentsAggregatedListCall) Header() http.Header { +func (c *InstantSnapshotsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -36892,7 +36871,7 @@ func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/interconnectAttachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -36901,17 +36880,18 @@ func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnectAttachments.aggregatedList" call. +// Do executes the "compute.instantSnapshots.list" call. // Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentAggregatedList, error) { +// *InstantSnapshotList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InstantSnapshotsListCall) Do(opts ...googleapi.CallOption) (*InstantSnapshotList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -36930,7 +36910,7 @@ func (c *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InterconnectAttachmentAggregatedList{ + ret := &InstantSnapshotList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -36946,7 +36926,7 @@ func (c *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOpt // 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 *InterconnectAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentAggregatedList) error) error { +func (c *InstantSnapshotsListCall) Pages(ctx context.Context, f func(*InstantSnapshotList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -36964,93 +36944,85 @@ func (c *InterconnectAttachmentsAggregatedListCall) Pages(ctx context.Context, f } } -type InterconnectAttachmentsDeleteCall struct { - s *Service - project string - region string - interconnectAttachment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InstantSnapshotsSetIamPolicyCall struct { + s *Service + project string + zone string + resource string + zonesetpolicyrequest *ZoneSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified interconnect attachment. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. // -// - interconnectAttachment: Name of the interconnect attachment to delete. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) Delete(project string, region string, interconnectAttachment string) *InterconnectAttachmentsDeleteCall { - c := &InterconnectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *InstantSnapshotsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *InstantSnapshotsSetIamPolicyCall { + c := &InstantSnapshotsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.interconnectAttachment = interconnectAttachment - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InterconnectAttachmentsDeleteCall) RequestId(requestId string) *InterconnectAttachmentsDeleteCall { - c.urlParams_.Set("requestId", requestId) + c.zone = zone + c.resource = resource + c.zonesetpolicyrequest = zonesetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsDeleteCall { +func (c *InstantSnapshotsSetIamPolicyCall) Fields(s ...googleapi.Field) *InstantSnapshotsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsDeleteCall) Context(ctx context.Context) *InterconnectAttachmentsDeleteCall { +func (c *InstantSnapshotsSetIamPolicyCall) Context(ctx context.Context) *InstantSnapshotsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectAttachmentsDeleteCall) Header() http.Header { +func (c *InstantSnapshotsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InstantSnapshotsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{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{ - "project": c.project, - "region": c.region, - "interconnectAttachment": c.interconnectAttachment, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnectAttachments.delete" call. +// Do executes the "compute.instantSnapshots.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InstantSnapshotsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37069,7 +37041,7 @@ func (c *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*O 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, @@ -37082,91 +37054,100 @@ func (c *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type InterconnectAttachmentsGetCall struct { - s *Service - project string - region string - interconnectAttachment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InstantSnapshotsSetLabelsCall struct { + s *Service + project string + zone string + resource string + zonesetlabelsrequest *ZoneSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified interconnect attachment. +// SetLabels: Sets the labels on a instantSnapshot in the given zone. To learn +// more about labels, read the Labeling Resources documentation. // -// - interconnectAttachment: Name of the interconnect attachment to return. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) Get(project string, region string, interconnectAttachment string) *InterconnectAttachmentsGetCall { - c := &InterconnectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *InstantSnapshotsService) SetLabels(project string, zone string, resource string, zonesetlabelsrequest *ZoneSetLabelsRequest) *InstantSnapshotsSetLabelsCall { + c := &InstantSnapshotsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.interconnectAttachment = interconnectAttachment + c.zone = zone + c.resource = resource + c.zonesetlabelsrequest = zonesetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InstantSnapshotsSetLabelsCall) RequestId(requestId string) *InstantSnapshotsSetLabelsCall { + 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 // details. -func (c *InterconnectAttachmentsGetCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsGetCall { +func (c *InstantSnapshotsSetLabelsCall) Fields(s ...googleapi.Field) *InstantSnapshotsSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InterconnectAttachmentsGetCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsGetCall) Context(ctx context.Context) *InterconnectAttachmentsGetCall { +func (c *InstantSnapshotsSetLabelsCall) Context(ctx context.Context) *InstantSnapshotsSetLabelsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectAttachmentsGetCall) Header() http.Header { +func (c *InstantSnapshotsSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InstantSnapshotsSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetlabelsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/setLabels") 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{ - "project": c.project, - "region": c.region, - "interconnectAttachment": c.interconnectAttachment, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnectAttachments.get" call. +// Do executes the "compute.instantSnapshots.setLabels" call. // Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachment.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachment, error) { +// *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 *InstantSnapshotsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37185,7 +37166,7 @@ func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Inte if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InterconnectAttachment{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37198,84 +37179,65 @@ func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*Inte return ret, nil } -type InterconnectAttachmentsInsertCall struct { +type InstantSnapshotsTestIamPermissionsCall struct { s *Service project string - region string - interconnectattachment *InterconnectAttachment + zone string + resource string + testpermissionsrequest *TestPermissionsRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Creates an InterconnectAttachment in the specified project using the -// data included in the request. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) Insert(project string, region string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsInsertCall { - c := &InterconnectAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *InstantSnapshotsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *InstantSnapshotsTestIamPermissionsCall { + c := &InstantSnapshotsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.interconnectattachment = interconnectattachment - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InterconnectAttachmentsInsertCall) RequestId(requestId string) *InterconnectAttachmentsInsertCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *InterconnectAttachmentsInsertCall) ValidateOnly(validateOnly bool) *InterconnectAttachmentsInsertCall { - c.urlParams_.Set("validateOnly", fmt.Sprint(validateOnly)) + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectAttachmentsInsertCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsInsertCall { +func (c *InstantSnapshotsTestIamPermissionsCall) Fields(s ...googleapi.Field) *InstantSnapshotsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsInsertCall) Context(ctx context.Context) *InterconnectAttachmentsInsertCall { +func (c *InstantSnapshotsTestIamPermissionsCall) Context(ctx context.Context) *InstantSnapshotsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectAttachmentsInsertCall) Header() http.Header { +func (c *InstantSnapshotsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *InstantSnapshotsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnectattachment) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/instantSnapshots/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -37283,18 +37245,20 @@ func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnectAttachments.insert" call. +// Do executes the "compute.instantSnapshots.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InstantSnapshotsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37313,7 +37277,7 @@ func (c *InterconnectAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37326,25 +37290,23 @@ func (c *InterconnectAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type InterconnectAttachmentsListCall struct { +type InterconnectAttachmentsAggregatedListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of interconnect attachments contained within the -// specified region. +// AggregatedList: Retrieves an aggregated list of interconnect attachments. To +// prevent failure, Google recommends that you set the `returnPartialSuccess` +// parameter to `true`. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *InterconnectAttachmentsService) List(project string, region string) *InterconnectAttachmentsListCall { - c := &InterconnectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InterconnectAttachmentsService) AggregatedList(project string) *InterconnectAttachmentsAggregatedListCall { + c := &InterconnectAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -37380,17 +37342,30 @@ func (r *InterconnectAttachmentsService) List(project string, region string) *In // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *InterconnectAttachmentsListCall) Filter(filter string) *InterconnectAttachmentsListCall { +func (c *InterconnectAttachmentsAggregatedListCall) Filter(filter string) *InterconnectAttachmentsAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *InterconnectAttachmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *InterconnectAttachmentsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectAttachmentsListCall) MaxResults(maxResults int64) *InterconnectAttachmentsListCall { +func (c *InterconnectAttachmentsAggregatedListCall) MaxResults(maxResults int64) *InterconnectAttachmentsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -37403,7 +37378,7 @@ func (c *InterconnectAttachmentsListCall) MaxResults(maxResults int64) *Intercon // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *InterconnectAttachmentsListCall) OrderBy(orderBy string) *InterconnectAttachmentsListCall { +func (c *InterconnectAttachmentsAggregatedListCall) OrderBy(orderBy string) *InterconnectAttachmentsAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -37411,7 +37386,7 @@ func (c *InterconnectAttachmentsListCall) OrderBy(orderBy string) *InterconnectA // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *InterconnectAttachmentsListCall) PageToken(pageToken string) *InterconnectAttachmentsListCall { +func (c *InterconnectAttachmentsAggregatedListCall) PageToken(pageToken string) *InterconnectAttachmentsAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -37421,15 +37396,23 @@ func (c *InterconnectAttachmentsListCall) PageToken(pageToken string) *Interconn // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *InterconnectAttachmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectAttachmentsListCall { +func (c *InterconnectAttachmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectAttachmentsAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *InterconnectAttachmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *InterconnectAttachmentsAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectAttachmentsListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsListCall { +func (c *InterconnectAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -37437,27 +37420,27 @@ func (c *InterconnectAttachmentsListCall) Fields(s ...googleapi.Field) *Intercon // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InterconnectAttachmentsListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsListCall { +func (c *InterconnectAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsListCall) Context(ctx context.Context) *InterconnectAttachmentsListCall { +func (c *InterconnectAttachmentsAggregatedListCall) Context(ctx context.Context) *InterconnectAttachmentsAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectAttachmentsListCall) Header() http.Header { +func (c *InterconnectAttachmentsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *InterconnectAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -37465,7 +37448,7 @@ func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/interconnectAttachments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -37474,18 +37457,17 @@ func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnectAttachments.list" call. +// Do executes the "compute.interconnectAttachments.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *InterconnectAttachmentList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *InterconnectAttachmentAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentList, error) { +func (c *InterconnectAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37504,7 +37486,7 @@ func (c *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*Int if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InterconnectAttachmentList{ + ret := &InterconnectAttachmentAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37520,7 +37502,7 @@ func (c *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*Int // 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 *InterconnectAttachmentsListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentList) error) error { +func (c *InterconnectAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -37538,30 +37520,26 @@ func (c *InterconnectAttachmentsListCall) Pages(ctx context.Context, f func(*Int } } -type InterconnectAttachmentsPatchCall struct { +type InterconnectAttachmentsDeleteCall struct { s *Service project string region string interconnectAttachment string - interconnectattachment *InterconnectAttachment urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Updates the specified interconnect attachment with the data included -// in the request. This method supports PATCH semantics and uses the JSON merge -// patch format and processing rules. +// Delete: Deletes the specified interconnect attachment. // -// - interconnectAttachment: Name of the interconnect attachment to patch. +// - interconnectAttachment: Name of the interconnect attachment to delete. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *InterconnectAttachmentsService) Patch(project string, region string, interconnectAttachment string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsPatchCall { - c := &InterconnectAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *InterconnectAttachmentsService) Delete(project string, region string, interconnectAttachment string) *InterconnectAttachmentsDeleteCall { + c := &InterconnectAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.interconnectAttachment = interconnectAttachment - c.interconnectattachment = interconnectattachment return c } @@ -37575,7 +37553,7 @@ func (r *InterconnectAttachmentsService) Patch(project string, region string, in // 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 *InterconnectAttachmentsPatchCall) RequestId(requestId string) *InterconnectAttachmentsPatchCall { +func (c *InterconnectAttachmentsDeleteCall) RequestId(requestId string) *InterconnectAttachmentsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -37583,38 +37561,34 @@ func (c *InterconnectAttachmentsPatchCall) RequestId(requestId string) *Intercon // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectAttachmentsPatchCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsPatchCall { +func (c *InterconnectAttachmentsDeleteCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsPatchCall) Context(ctx context.Context) *InterconnectAttachmentsPatchCall { +func (c *InterconnectAttachmentsDeleteCall) Context(ctx context.Context) *InterconnectAttachmentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectAttachmentsPatchCall) Header() http.Header { +func (c *InterconnectAttachmentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InterconnectAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnectattachment) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -37627,12 +37601,12 @@ func (c *InterconnectAttachmentsPatchCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnectAttachments.patch" call. +// Do executes the "compute.interconnectAttachments.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InterconnectAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37664,100 +37638,91 @@ func (c *InterconnectAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Op return ret, nil } -type InterconnectAttachmentsSetLabelsCall struct { +type InterconnectAttachmentsGetCall struct { s *Service project string region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest + interconnectAttachment string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// SetLabels: Sets the labels on an InterconnectAttachment. To learn more about -// labels, read the Labeling Resources documentation. +// Get: Returns the specified interconnect attachment. // +// - interconnectAttachment: Name of the interconnect attachment to return. // - project: Project ID for this request. -// - region: The region for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectAttachmentsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *InterconnectAttachmentsSetLabelsCall { - c := &InterconnectAttachmentsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *InterconnectAttachmentsService) Get(project string, region string, interconnectAttachment string) *InterconnectAttachmentsGetCall { + c := &InterconnectAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InterconnectAttachmentsSetLabelsCall) RequestId(requestId string) *InterconnectAttachmentsSetLabelsCall { - c.urlParams_.Set("requestId", requestId) + c.interconnectAttachment = interconnectAttachment return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectAttachmentsSetLabelsCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsSetLabelsCall { +func (c *InterconnectAttachmentsGetCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InterconnectAttachmentsGetCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *InterconnectAttachmentsSetLabelsCall) Context(ctx context.Context) *InterconnectAttachmentsSetLabelsCall { +func (c *InterconnectAttachmentsGetCall) Context(ctx context.Context) *InterconnectAttachmentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectAttachmentsSetLabelsCall) Header() http.Header { +func (c *InterconnectAttachmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectAttachmentsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) - if err != nil { - return nil, err +func (c *InterconnectAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "interconnectAttachment": c.interconnectAttachment, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnectAttachments.setLabels" call. +// Do executes the "compute.interconnectAttachments.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectAttachmentsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *InterconnectAttachment.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InterconnectAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37776,7 +37741,7 @@ func (c *InterconnectAttachmentsSetLabelsCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &InterconnectAttachment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37789,88 +37754,103 @@ func (c *InterconnectAttachmentsSetLabelsCall) Do(opts ...googleapi.CallOption) return ret, nil } -type InterconnectLocationsGetCall struct { - s *Service - project string - interconnectLocation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InterconnectAttachmentsInsertCall struct { + s *Service + project string + region string + interconnectattachment *InterconnectAttachment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the details for the specified interconnect location. Gets a -// list of available interconnect locations by making a list() request. +// Insert: Creates an InterconnectAttachment in the specified project using the +// data included in the request. // -// - interconnectLocation: Name of the interconnect location to return. // - project: Project ID for this request. -func (r *InterconnectLocationsService) Get(project string, interconnectLocation string) *InterconnectLocationsGetCall { - c := &InterconnectLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *InterconnectAttachmentsService) Insert(project string, region string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsInsertCall { + c := &InterconnectAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.interconnectLocation = interconnectLocation + c.region = region + c.interconnectattachment = interconnectattachment + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InterconnectAttachmentsInsertCall) RequestId(requestId string) *InterconnectAttachmentsInsertCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// ValidateOnly sets the optional parameter "validateOnly": If true, the +// request will not be committed. +func (c *InterconnectAttachmentsInsertCall) ValidateOnly(validateOnly bool) *InterconnectAttachmentsInsertCall { + 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 // details. -func (c *InterconnectLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectLocationsGetCall { +func (c *InterconnectAttachmentsInsertCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InterconnectLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InterconnectLocationsGetCall) Context(ctx context.Context) *InterconnectLocationsGetCall { +func (c *InterconnectAttachmentsInsertCall) Context(ctx context.Context) *InterconnectAttachmentsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectLocationsGetCall) Header() http.Header { +func (c *InterconnectAttachmentsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InterconnectAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnectattachment) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectLocations/{interconnectLocation}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments") 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{ - "project": c.project, - "interconnectLocation": c.interconnectLocation, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnectLocations.get" call. +// Do executes the "compute.interconnectAttachments.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *InterconnectLocation.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectLocation, error) { +// *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 *InterconnectAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -37889,7 +37869,7 @@ func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*Interc if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InterconnectLocation{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -37902,22 +37882,25 @@ func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*Interc return ret, nil } -type InterconnectLocationsListCall struct { +type InterconnectAttachmentsListCall struct { s *Service project string + region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of interconnect locations available to the -// specified project. +// List: Retrieves the list of interconnect attachments contained within the +// specified region. // // - project: Project ID for this request. -func (r *InterconnectLocationsService) List(project string) *InterconnectLocationsListCall { - c := &InterconnectLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *InterconnectAttachmentsService) List(project string, region string) *InterconnectAttachmentsListCall { + c := &InterconnectAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region return c } @@ -37953,7 +37936,7 @@ func (r *InterconnectLocationsService) List(project string) *InterconnectLocatio // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *InterconnectLocationsListCall) Filter(filter string) *InterconnectLocationsListCall { +func (c *InterconnectAttachmentsListCall) Filter(filter string) *InterconnectAttachmentsListCall { c.urlParams_.Set("filter", filter) return c } @@ -37963,7 +37946,7 @@ func (c *InterconnectLocationsListCall) Filter(filter string) *InterconnectLocat // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectLocationsListCall) MaxResults(maxResults int64) *InterconnectLocationsListCall { +func (c *InterconnectAttachmentsListCall) MaxResults(maxResults int64) *InterconnectAttachmentsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -37976,7 +37959,7 @@ func (c *InterconnectLocationsListCall) MaxResults(maxResults int64) *Interconne // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *InterconnectLocationsListCall) OrderBy(orderBy string) *InterconnectLocationsListCall { +func (c *InterconnectAttachmentsListCall) OrderBy(orderBy string) *InterconnectAttachmentsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -37984,7 +37967,7 @@ func (c *InterconnectLocationsListCall) OrderBy(orderBy string) *InterconnectLoc // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *InterconnectLocationsListCall) PageToken(pageToken string) *InterconnectLocationsListCall { +func (c *InterconnectAttachmentsListCall) PageToken(pageToken string) *InterconnectAttachmentsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -37994,7 +37977,7 @@ func (c *InterconnectLocationsListCall) PageToken(pageToken string) *Interconnec // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *InterconnectLocationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectLocationsListCall { +func (c *InterconnectAttachmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectAttachmentsListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -38002,7 +37985,7 @@ func (c *InterconnectLocationsListCall) ReturnPartialSuccess(returnPartialSucces // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectLocationsListCall) Fields(s ...googleapi.Field) *InterconnectLocationsListCall { +func (c *InterconnectAttachmentsListCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38010,27 +37993,27 @@ func (c *InterconnectLocationsListCall) Fields(s ...googleapi.Field) *Interconne // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InterconnectLocationsListCall) IfNoneMatch(entityTag string) *InterconnectLocationsListCall { +func (c *InterconnectAttachmentsListCall) IfNoneMatch(entityTag string) *InterconnectAttachmentsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InterconnectLocationsListCall) Context(ctx context.Context) *InterconnectLocationsListCall { +func (c *InterconnectAttachmentsListCall) Context(ctx context.Context) *InterconnectAttachmentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectLocationsListCall) Header() http.Header { +func (c *InterconnectAttachmentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, error) { +func (c *InterconnectAttachmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -38038,7 +38021,7 @@ func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectLocations") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -38047,17 +38030,18 @@ func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, e req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnectLocations.list" call. +// Do executes the "compute.interconnectAttachments.list" call. // Any non-2xx status code is an error. Response headers are in either -// *InterconnectLocationList.ServerResponse.Header or (if a response was +// *InterconnectAttachmentList.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectLocationList, error) { +func (c *InterconnectAttachmentsListCall) Do(opts ...googleapi.CallOption) (*InterconnectAttachmentList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38076,7 +38060,7 @@ func (c *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*Inter if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InterconnectLocationList{ + ret := &InterconnectAttachmentList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38092,7 +38076,7 @@ func (c *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*Inter // 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 *InterconnectLocationsListCall) Pages(ctx context.Context, f func(*InterconnectLocationList) error) error { +func (c *InterconnectAttachmentsListCall) Pages(ctx context.Context, f func(*InterconnectAttachmentList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -38110,90 +38094,101 @@ func (c *InterconnectLocationsListCall) Pages(ctx context.Context, f func(*Inter } } -type InterconnectRemoteLocationsGetCall struct { - s *Service - project string - interconnectRemoteLocation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InterconnectAttachmentsPatchCall struct { + s *Service + project string + region string + interconnectAttachment string + interconnectattachment *InterconnectAttachment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the details for the specified interconnect remote location. -// Gets a list of available interconnect remote locations by making a list() -// request. +// Patch: Updates the specified interconnect attachment with the data included +// in the request. This method supports PATCH semantics and uses the JSON merge +// patch format and processing rules. // -// - interconnectRemoteLocation: Name of the interconnect remote location to -// return. -// - project: Project ID for this request. -func (r *InterconnectRemoteLocationsService) Get(project string, interconnectRemoteLocation string) *InterconnectRemoteLocationsGetCall { - c := &InterconnectRemoteLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - interconnectAttachment: Name of the interconnect attachment to patch. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *InterconnectAttachmentsService) Patch(project string, region string, interconnectAttachment string, interconnectattachment *InterconnectAttachment) *InterconnectAttachmentsPatchCall { + c := &InterconnectAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.interconnectRemoteLocation = interconnectRemoteLocation + c.region = region + c.interconnectAttachment = interconnectAttachment + c.interconnectattachment = interconnectattachment + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InterconnectAttachmentsPatchCall) RequestId(requestId string) *InterconnectAttachmentsPatchCall { + 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 // details. -func (c *InterconnectRemoteLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsGetCall { +func (c *InterconnectAttachmentsPatchCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InterconnectRemoteLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *InterconnectRemoteLocationsGetCall) Context(ctx context.Context) *InterconnectRemoteLocationsGetCall { +func (c *InterconnectAttachmentsPatchCall) Context(ctx context.Context) *InterconnectAttachmentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectRemoteLocationsGetCall) Header() http.Header { +func (c *InterconnectAttachmentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectRemoteLocationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InterconnectAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnectattachment) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{interconnectAttachment}") 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{ - "project": c.project, - "interconnectRemoteLocation": c.interconnectRemoteLocation, + "project": c.project, + "region": c.region, + "interconnectAttachment": c.interconnectAttachment, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnectRemoteLocations.get" call. +// Do executes the "compute.interconnectAttachments.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *InterconnectRemoteLocation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InterconnectRemoteLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocation, error) { +// *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 *InterconnectAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38212,7 +38207,7 @@ func (c *InterconnectRemoteLocationsGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InterconnectRemoteLocation{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38225,297 +38220,100 @@ func (c *InterconnectRemoteLocationsGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type InterconnectRemoteLocationsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InterconnectAttachmentsSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of interconnect remote locations available to the -// specified project. +// SetLabels: Sets the labels on an InterconnectAttachment. To learn more about +// labels, read the Labeling Resources documentation. // // - project: Project ID for this request. -func (r *InterconnectRemoteLocationsService) List(project string) *InterconnectRemoteLocationsListCall { - c := &InterconnectRemoteLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *InterconnectAttachmentsService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *InterconnectAttachmentsSetLabelsCall { + c := &InterconnectAttachmentsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *InterconnectRemoteLocationsListCall) Filter(filter string) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("filter", filter) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *InterconnectAttachmentsSetLabelsCall) RequestId(requestId string) *InterconnectAttachmentsSetLabelsCall { + c.urlParams_.Set("requestId", requestId) return c } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectRemoteLocationsListCall) MaxResults(maxResults int64) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *InterconnectAttachmentsSetLabelsCall) Fields(s ...googleapi.Field) *InterconnectAttachmentsSetLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *InterconnectRemoteLocationsListCall) OrderBy(orderBy string) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("orderBy", orderBy) +// Context sets the context to be used in this call's Do method. +func (c *InterconnectAttachmentsSetLabelsCall) Context(ctx context.Context) *InterconnectAttachmentsSetLabelsCall { + c.ctx_ = ctx return c } -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *InterconnectRemoteLocationsListCall) PageToken(pageToken string) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *InterconnectAttachmentsSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *InterconnectRemoteLocationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *InterconnectRemoteLocationsListCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *InterconnectRemoteLocationsListCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectRemoteLocationsListCall) Context(ctx context.Context) *InterconnectRemoteLocationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectRemoteLocationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectRemoteLocationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InterconnectAttachmentsSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectRemoteLocations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnectRemoteLocations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *InterconnectRemoteLocationList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *InterconnectRemoteLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocationList, 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, - }) - } + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) if err != nil { return nil, err } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &InterconnectRemoteLocationList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *InterconnectRemoteLocationsListCall) Pages(ctx context.Context, f func(*InterconnectRemoteLocationList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type InterconnectsDeleteCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes the specified Interconnect. -// -// - interconnect: Name of the interconnect to delete. -// - project: Project ID for this request. -func (r *InterconnectsService) Delete(project string, interconnect string) *InterconnectsDeleteCall { - c := &InterconnectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.interconnect = interconnect - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InterconnectsDeleteCall) RequestId(requestId string) *InterconnectsDeleteCall { - 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 -// details. -func (c *InterconnectsDeleteCall) Fields(s ...googleapi.Field) *InterconnectsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsDeleteCall) Context(ctx context.Context) *InterconnectsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/interconnectAttachments/{resource}/setLabels") 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{ - "project": c.project, - "interconnect": c.interconnect, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnects.delete" call. +// Do executes the "compute.interconnectAttachments.setLabels" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InterconnectAttachmentsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38547,32 +38345,32 @@ func (c *InterconnectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type InterconnectsGetCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InterconnectLocationsGetCall struct { + s *Service + project string + interconnectLocation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified Interconnect. Get a list of available -// Interconnects by making a list() request. +// Get: Returns the details for the specified interconnect location. Gets a +// list of available interconnect locations by making a list() request. // -// - interconnect: Name of the interconnect to return. +// - interconnectLocation: Name of the interconnect location to return. // - project: Project ID for this request. -func (r *InterconnectsService) Get(project string, interconnect string) *InterconnectsGetCall { - c := &InterconnectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InterconnectLocationsService) Get(project string, interconnectLocation string) *InterconnectLocationsGetCall { + c := &InterconnectLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.interconnect = interconnect + c.interconnectLocation = interconnectLocation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectsGetCall) Fields(s ...googleapi.Field) *InterconnectsGetCall { +func (c *InterconnectLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectLocationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38580,27 +38378,27 @@ func (c *InterconnectsGetCall) Fields(s ...googleapi.Field) *InterconnectsGetCal // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InterconnectsGetCall) IfNoneMatch(entityTag string) *InterconnectsGetCall { +func (c *InterconnectLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectLocationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InterconnectsGetCall) Context(ctx context.Context) *InterconnectsGetCall { +func (c *InterconnectLocationsGetCall) Context(ctx context.Context) *InterconnectLocationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectsGetCall) Header() http.Header { +func (c *InterconnectLocationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *InterconnectLocationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -38608,7 +38406,7 @@ func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectLocations/{interconnectLocation}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -38616,18 +38414,19 @@ func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, + "project": c.project, + "interconnectLocation": c.interconnectLocation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnects.get" call. +// Do executes the "compute.interconnectLocations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Interconnect.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, error) { +// *InterconnectLocation.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InterconnectLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectLocation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38646,7 +38445,7 @@ func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Interconnect{ + ret := &InterconnectLocation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38659,35 +38458,107 @@ func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, return ret, nil } -type InterconnectsGetDiagnosticsCall struct { +type InterconnectLocationsListCall struct { s *Service project string - interconnect string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetDiagnostics: Returns the interconnectDiagnostics for the specified -// Interconnect. In the event of a global outage, do not use this API to make -// decisions about where to redirect your network traffic. Unlike a VLAN -// attachment, which is regional, a Cloud Interconnect connection is a global -// resource. A global outage can prevent this API from functioning properly. +// List: Retrieves the list of interconnect locations available to the +// specified project. // -// - interconnect: Name of the interconnect resource to query. // - project: Project ID for this request. -func (r *InterconnectsService) GetDiagnostics(project string, interconnect string) *InterconnectsGetDiagnosticsCall { - c := &InterconnectsGetDiagnosticsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InterconnectLocationsService) List(project string) *InterconnectLocationsListCall { + c := &InterconnectLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.interconnect = interconnect + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *InterconnectLocationsListCall) Filter(filter string) *InterconnectLocationsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *InterconnectLocationsListCall) MaxResults(maxResults int64) *InterconnectLocationsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *InterconnectLocationsListCall) OrderBy(orderBy string) *InterconnectLocationsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *InterconnectLocationsListCall) PageToken(pageToken string) *InterconnectLocationsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *InterconnectLocationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectLocationsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectsGetDiagnosticsCall) Fields(s ...googleapi.Field) *InterconnectsGetDiagnosticsCall { +func (c *InterconnectLocationsListCall) Fields(s ...googleapi.Field) *InterconnectLocationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38695,27 +38566,27 @@ func (c *InterconnectsGetDiagnosticsCall) Fields(s ...googleapi.Field) *Intercon // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InterconnectsGetDiagnosticsCall) IfNoneMatch(entityTag string) *InterconnectsGetDiagnosticsCall { +func (c *InterconnectLocationsListCall) IfNoneMatch(entityTag string) *InterconnectLocationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InterconnectsGetDiagnosticsCall) Context(ctx context.Context) *InterconnectsGetDiagnosticsCall { +func (c *InterconnectLocationsListCall) Context(ctx context.Context) *InterconnectLocationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectsGetDiagnosticsCall) Header() http.Header { +func (c *InterconnectLocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectsGetDiagnosticsCall) doRequest(alt string) (*http.Response, error) { +func (c *InterconnectLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -38723,7 +38594,7 @@ func (c *InterconnectsGetDiagnosticsCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}/getDiagnostics") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectLocations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -38731,19 +38602,18 @@ func (c *InterconnectsGetDiagnosticsCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnects.getDiagnostics" call. +// Do executes the "compute.interconnectLocations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *InterconnectsGetDiagnosticsResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *InterconnectLocationList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*InterconnectsGetDiagnosticsResponse, error) { +func (c *InterconnectLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectLocationList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38762,7 +38632,7 @@ func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*Int if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InterconnectsGetDiagnosticsResponse{ + ret := &InterconnectLocationList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38775,32 +38645,55 @@ func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*Int return ret, nil } -type InterconnectsGetMacsecConfigCall struct { - s *Service - project string - interconnect string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *InterconnectLocationsListCall) Pages(ctx context.Context, f func(*InterconnectLocationList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// GetMacsecConfig: Returns the interconnectMacsecConfig for the specified -// Interconnect. +type InterconnectRemoteLocationsGetCall struct { + s *Service + project string + interconnectRemoteLocation string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the details for the specified interconnect remote location. +// Gets a list of available interconnect remote locations by making a list() +// request. // -// - interconnect: Name of the interconnect resource to query. -// - project: Project ID for this request. -func (r *InterconnectsService) GetMacsecConfig(project string, interconnect string) *InterconnectsGetMacsecConfigCall { - c := &InterconnectsGetMacsecConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - interconnectRemoteLocation: Name of the interconnect remote location to +// return. +// - project: Project ID for this request. +func (r *InterconnectRemoteLocationsService) Get(project string, interconnectRemoteLocation string) *InterconnectRemoteLocationsGetCall { + c := &InterconnectRemoteLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.interconnect = interconnect + c.interconnectRemoteLocation = interconnectRemoteLocation return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectsGetMacsecConfigCall) Fields(s ...googleapi.Field) *InterconnectsGetMacsecConfigCall { +func (c *InterconnectRemoteLocationsGetCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -38808,27 +38701,27 @@ func (c *InterconnectsGetMacsecConfigCall) Fields(s ...googleapi.Field) *Interco // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InterconnectsGetMacsecConfigCall) IfNoneMatch(entityTag string) *InterconnectsGetMacsecConfigCall { +func (c *InterconnectRemoteLocationsGetCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InterconnectsGetMacsecConfigCall) Context(ctx context.Context) *InterconnectsGetMacsecConfigCall { +func (c *InterconnectRemoteLocationsGetCall) Context(ctx context.Context) *InterconnectRemoteLocationsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectsGetMacsecConfigCall) Header() http.Header { +func (c *InterconnectRemoteLocationsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectsGetMacsecConfigCall) doRequest(alt string) (*http.Response, error) { +func (c *InterconnectRemoteLocationsGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -38836,7 +38729,7 @@ func (c *InterconnectsGetMacsecConfigCall) doRequest(alt string) (*http.Response var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}/getMacsecConfig") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectRemoteLocations/{interconnectRemoteLocation}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -38844,19 +38737,19 @@ func (c *InterconnectsGetMacsecConfigCall) doRequest(alt string) (*http.Response } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "interconnect": c.interconnect, + "project": c.project, + "interconnectRemoteLocation": c.interconnectRemoteLocation, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnects.getMacsecConfig" call. +// Do executes the "compute.interconnectRemoteLocations.get" call. // Any non-2xx status code is an error. Response headers are in either -// *InterconnectsGetMacsecConfigResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *InterconnectRemoteLocation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *InterconnectsGetMacsecConfigCall) Do(opts ...googleapi.CallOption) (*InterconnectsGetMacsecConfigResponse, error) { +func (c *InterconnectRemoteLocationsGetCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -38875,7 +38768,7 @@ func (c *InterconnectsGetMacsecConfigCall) Do(opts ...googleapi.CallOption) (*In if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InterconnectsGetMacsecConfigResponse{ + ret := &InterconnectRemoteLocation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -38888,176 +38781,59 @@ func (c *InterconnectsGetMacsecConfigCall) Do(opts ...googleapi.CallOption) (*In return ret, nil } -type InterconnectsInsertCall struct { +type InterconnectRemoteLocationsListCall struct { s *Service project string - interconnect *Interconnect urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Insert: Creates an Interconnect in the specified project using the data -// included in the request. +// List: Retrieves the list of interconnect remote locations available to the +// specified project. // // - project: Project ID for this request. -func (r *InterconnectsService) Insert(project string, interconnect *Interconnect) *InterconnectsInsertCall { - c := &InterconnectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InterconnectRemoteLocationsService) List(project string) *InterconnectRemoteLocationsListCall { + c := &InterconnectRemoteLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.interconnect = interconnect return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *InterconnectsInsertCall) RequestId(requestId string) *InterconnectsInsertCall { - 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 -// details. -func (c *InterconnectsInsertCall) Fields(s ...googleapi.Field) *InterconnectsInsertCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsInsertCall) Context(ctx context.Context) *InterconnectsInsertCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *InterconnectsInsertCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *InterconnectsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnect) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects") - 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{ - "project": c.project, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.interconnects.insert" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type InterconnectsListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Retrieves the list of Interconnects available to the specified -// project. -// -// - project: Project ID for this request. -func (r *InterconnectsService) List(project string) *InterconnectsListCall { - c := &InterconnectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *InterconnectsListCall) Filter(filter string) *InterconnectsListCall { - c.urlParams_.Set("filter", filter) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *InterconnectRemoteLocationsListCall) Filter(filter string) *InterconnectRemoteLocationsListCall { + c.urlParams_.Set("filter", filter) return c } @@ -39066,7 +38842,7 @@ func (c *InterconnectsListCall) Filter(filter string) *InterconnectsListCall { // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *InterconnectsListCall) MaxResults(maxResults int64) *InterconnectsListCall { +func (c *InterconnectRemoteLocationsListCall) MaxResults(maxResults int64) *InterconnectRemoteLocationsListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -39079,7 +38855,7 @@ func (c *InterconnectsListCall) MaxResults(maxResults int64) *InterconnectsListC // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *InterconnectsListCall) OrderBy(orderBy string) *InterconnectsListCall { +func (c *InterconnectRemoteLocationsListCall) OrderBy(orderBy string) *InterconnectRemoteLocationsListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -39087,7 +38863,7 @@ func (c *InterconnectsListCall) OrderBy(orderBy string) *InterconnectsListCall { // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *InterconnectsListCall) PageToken(pageToken string) *InterconnectsListCall { +func (c *InterconnectRemoteLocationsListCall) PageToken(pageToken string) *InterconnectRemoteLocationsListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -39097,7 +38873,7 @@ func (c *InterconnectsListCall) PageToken(pageToken string) *InterconnectsListCa // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *InterconnectsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectsListCall { +func (c *InterconnectRemoteLocationsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectRemoteLocationsListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -39105,7 +38881,7 @@ func (c *InterconnectsListCall) ReturnPartialSuccess(returnPartialSuccess bool) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectsListCall) Fields(s ...googleapi.Field) *InterconnectsListCall { +func (c *InterconnectRemoteLocationsListCall) Fields(s ...googleapi.Field) *InterconnectRemoteLocationsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39113,27 +38889,27 @@ func (c *InterconnectsListCall) Fields(s ...googleapi.Field) *InterconnectsListC // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *InterconnectsListCall) IfNoneMatch(entityTag string) *InterconnectsListCall { +func (c *InterconnectRemoteLocationsListCall) IfNoneMatch(entityTag string) *InterconnectRemoteLocationsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *InterconnectsListCall) Context(ctx context.Context) *InterconnectsListCall { +func (c *InterconnectRemoteLocationsListCall) Context(ctx context.Context) *InterconnectRemoteLocationsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectsListCall) Header() http.Header { +func (c *InterconnectRemoteLocationsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) { +func (c *InterconnectRemoteLocationsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -39141,7 +38917,7 @@ func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnectRemoteLocations") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -39154,13 +38930,13 @@ func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnects.list" call. +// Do executes the "compute.interconnectRemoteLocations.list" call. // Any non-2xx status code is an error. Response headers are in either -// *InterconnectList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectList, error) { +// *InterconnectRemoteLocationList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InterconnectRemoteLocationsListCall) Do(opts ...googleapi.CallOption) (*InterconnectRemoteLocationList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39179,7 +38955,7 @@ func (c *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectL if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InterconnectList{ + ret := &InterconnectRemoteLocationList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39195,7 +38971,7 @@ func (c *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectL // 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 *InterconnectsListCall) Pages(ctx context.Context, f func(*InterconnectList) error) error { +func (c *InterconnectRemoteLocationsListCall) Pages(ctx context.Context, f func(*InterconnectRemoteLocationList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -39213,27 +38989,23 @@ func (c *InterconnectsListCall) Pages(ctx context.Context, f func(*InterconnectL } } -type InterconnectsPatchCall struct { - s *Service - project string - interconnect string - interconnect2 *Interconnect - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InterconnectsDeleteCall struct { + s *Service + project string + interconnect string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified Interconnect with the data included in the -// request. This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. +// Delete: Deletes the specified Interconnect. // -// - interconnect: Name of the interconnect to update. +// - interconnect: Name of the interconnect to delete. // - project: Project ID for this request. -func (r *InterconnectsService) Patch(project string, interconnect string, interconnect2 *Interconnect) *InterconnectsPatchCall { - c := &InterconnectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InterconnectsService) Delete(project string, interconnect string) *InterconnectsDeleteCall { + c := &InterconnectsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.interconnect = interconnect - c.interconnect2 = interconnect2 return c } @@ -39247,7 +39019,7 @@ func (r *InterconnectsService) Patch(project string, interconnect string, interc // 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 *InterconnectsPatchCall) RequestId(requestId string) *InterconnectsPatchCall { +func (c *InterconnectsDeleteCall) RequestId(requestId string) *InterconnectsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -39255,38 +39027,34 @@ func (c *InterconnectsPatchCall) RequestId(requestId string) *InterconnectsPatch // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectsPatchCall) Fields(s ...googleapi.Field) *InterconnectsPatchCall { +func (c *InterconnectsDeleteCall) Fields(s ...googleapi.Field) *InterconnectsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *InterconnectsPatchCall) Context(ctx context.Context) *InterconnectsPatchCall { +func (c *InterconnectsDeleteCall) Context(ctx context.Context) *InterconnectsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectsPatchCall) Header() http.Header { +func (c *InterconnectsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *InterconnectsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnect2) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -39298,12 +39066,12 @@ func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnects.patch" call. +// Do executes the "compute.interconnects.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InterconnectsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39335,81 +39103,87 @@ func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, e return ret, nil } -type InterconnectsSetLabelsCall struct { - s *Service - project string - resource string - globalsetlabelsrequest *GlobalSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InterconnectsGetCall struct { + s *Service + project string + interconnect string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on an Interconnect. To learn more about labels, -// read the Labeling Resources documentation. +// Get: Returns the specified Interconnect. Get a list of available +// Interconnects by making a list() request. // +// - interconnect: Name of the interconnect to return. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *InterconnectsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *InterconnectsSetLabelsCall { - c := &InterconnectsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InterconnectsService) Get(project string, interconnect string) *InterconnectsGetCall { + c := &InterconnectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetlabelsrequest = globalsetlabelsrequest + c.interconnect = interconnect return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *InterconnectsSetLabelsCall) Fields(s ...googleapi.Field) *InterconnectsSetLabelsCall { +func (c *InterconnectsGetCall) Fields(s ...googleapi.Field) *InterconnectsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. -func (c *InterconnectsSetLabelsCall) Context(ctx context.Context) *InterconnectsSetLabelsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InterconnectsGetCall) IfNoneMatch(entityTag string) *InterconnectsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *InterconnectsGetCall) Context(ctx context.Context) *InterconnectsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *InterconnectsSetLabelsCall) Header() http.Header { +func (c *InterconnectsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *InterconnectsSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) - if err != nil { - return nil, err +func (c *InterconnectsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "interconnect": c.interconnect, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.interconnects.setLabels" call. +// Do executes the "compute.interconnects.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *Interconnect.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *InterconnectsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InterconnectsGetCall) Do(opts ...googleapi.CallOption) (*Interconnect, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39428,7 +39202,7 @@ func (c *InterconnectsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operatio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Interconnect{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39441,34 +39215,35 @@ func (c *InterconnectsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operatio return ret, nil } -type LicenseCodesGetCall struct { +type InterconnectsGetDiagnosticsCall struct { s *Service project string - licenseCode string + interconnect string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Return a specified license code. License codes are mirrored across all -// projects that have permissions to read the License Code. *Caution* This -// resource is intended for use only by third-party partners who are creating -// Cloud Marketplace images. +// GetDiagnostics: Returns the interconnectDiagnostics for the specified +// Interconnect. In the event of a global outage, do not use this API to make +// decisions about where to redirect your network traffic. Unlike a VLAN +// attachment, which is regional, a Cloud Interconnect connection is a global +// resource. A global outage can prevent this API from functioning properly. // -// - licenseCode: Number corresponding to the License code resource to return. +// - interconnect: Name of the interconnect resource to query. // - project: Project ID for this request. -func (r *LicenseCodesService) Get(project string, licenseCode string) *LicenseCodesGetCall { - c := &LicenseCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InterconnectsService) GetDiagnostics(project string, interconnect string) *InterconnectsGetDiagnosticsCall { + c := &InterconnectsGetDiagnosticsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.licenseCode = licenseCode + c.interconnect = interconnect return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LicenseCodesGetCall) Fields(s ...googleapi.Field) *LicenseCodesGetCall { +func (c *InterconnectsGetDiagnosticsCall) Fields(s ...googleapi.Field) *InterconnectsGetDiagnosticsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39476,27 +39251,27 @@ func (c *LicenseCodesGetCall) Fields(s ...googleapi.Field) *LicenseCodesGetCall // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *LicenseCodesGetCall) IfNoneMatch(entityTag string) *LicenseCodesGetCall { +func (c *InterconnectsGetDiagnosticsCall) IfNoneMatch(entityTag string) *InterconnectsGetDiagnosticsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LicenseCodesGetCall) Context(ctx context.Context) *LicenseCodesGetCall { +func (c *InterconnectsGetDiagnosticsCall) Context(ctx context.Context) *InterconnectsGetDiagnosticsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LicenseCodesGetCall) Header() http.Header { +func (c *InterconnectsGetDiagnosticsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LicenseCodesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *InterconnectsGetDiagnosticsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -39504,7 +39279,7 @@ func (c *LicenseCodesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenseCodes/{licenseCode}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}/getDiagnostics") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -39512,18 +39287,19 @@ func (c *LicenseCodesGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "licenseCode": c.licenseCode, + "project": c.project, + "interconnect": c.interconnect, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.licenseCodes.get" call. +// Do executes the "compute.interconnects.getDiagnostics" call. // Any non-2xx status code is an error. Response headers are in either -// *LicenseCode.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LicenseCodesGetCall) Do(opts ...googleapi.CallOption) (*LicenseCode, error) { +// *InterconnectsGetDiagnosticsResponse.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *InterconnectsGetDiagnosticsCall) Do(opts ...googleapi.CallOption) (*InterconnectsGetDiagnosticsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39542,7 +39318,7 @@ func (c *LicenseCodesGetCall) Do(opts ...googleapi.CallOption) (*LicenseCode, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LicenseCode{ + ret := &InterconnectsGetDiagnosticsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39555,83 +39331,88 @@ func (c *LicenseCodesGetCall) Do(opts ...googleapi.CallOption) (*LicenseCode, er return ret, nil } -type LicenseCodesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InterconnectsGetMacsecConfigCall struct { + s *Service + project string + interconnect string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. *Caution* This resource is intended for use only by third-party -// partners who are creating Cloud Marketplace images. +// GetMacsecConfig: Returns the interconnectMacsecConfig for the specified +// Interconnect. // +// - interconnect: Name of the interconnect resource to query. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicenseCodesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicenseCodesTestIamPermissionsCall { - c := &LicenseCodesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InterconnectsService) GetMacsecConfig(project string, interconnect string) *InterconnectsGetMacsecConfigCall { + c := &InterconnectsGetMacsecConfigCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.interconnect = interconnect return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LicenseCodesTestIamPermissionsCall) Fields(s ...googleapi.Field) *LicenseCodesTestIamPermissionsCall { +func (c *InterconnectsGetMacsecConfigCall) Fields(s ...googleapi.Field) *InterconnectsGetMacsecConfigCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *InterconnectsGetMacsecConfigCall) IfNoneMatch(entityTag string) *InterconnectsGetMacsecConfigCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LicenseCodesTestIamPermissionsCall) Context(ctx context.Context) *LicenseCodesTestIamPermissionsCall { +func (c *InterconnectsGetMacsecConfigCall) Context(ctx context.Context) *InterconnectsGetMacsecConfigCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LicenseCodesTestIamPermissionsCall) Header() http.Header { +func (c *InterconnectsGetMacsecConfigCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LicenseCodesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err +func (c *InterconnectsGetMacsecConfigCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenseCodes/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}/getMacsecConfig") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "interconnect": c.interconnect, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.licenseCodes.testIamPermissions" call. +// Do executes the "compute.interconnects.getMacsecConfig" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *InterconnectsGetMacsecConfigResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *LicenseCodesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *InterconnectsGetMacsecConfigCall) Do(opts ...googleapi.CallOption) (*InterconnectsGetMacsecConfigResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39650,7 +39431,7 @@ func (c *LicenseCodesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &InterconnectsGetMacsecConfigResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -39663,25 +39444,23 @@ func (c *LicenseCodesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type LicensesDeleteCall struct { - s *Service - project string - license string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type InterconnectsInsertCall struct { + s *Service + project string + interconnect *Interconnect + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified license. *Caution* This resource is intended -// for use only by third-party partners who are creating Cloud Marketplace -// images. +// Insert: Creates an Interconnect in the specified project using the data +// included in the request. // -// - license: Name of the license resource to delete. // - project: Project ID for this request. -func (r *LicensesService) Delete(project string, license string) *LicensesDeleteCall { - c := &LicensesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InterconnectsService) Insert(project string, interconnect *Interconnect) *InterconnectsInsertCall { + c := &InterconnectsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.license = license + c.interconnect = interconnect return c } @@ -39695,7 +39474,7 @@ func (r *LicensesService) Delete(project string, license string) *LicensesDelete // 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 *LicensesDeleteCall) RequestId(requestId string) *LicensesDeleteCall { +func (c *InterconnectsInsertCall) RequestId(requestId string) *InterconnectsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -39703,51 +39482,54 @@ func (c *LicensesDeleteCall) RequestId(requestId string) *LicensesDeleteCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LicensesDeleteCall) Fields(s ...googleapi.Field) *LicensesDeleteCall { +func (c *InterconnectsInsertCall) Fields(s ...googleapi.Field) *InterconnectsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LicensesDeleteCall) Context(ctx context.Context) *LicensesDeleteCall { +func (c *InterconnectsInsertCall) Context(ctx context.Context) *InterconnectsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LicensesDeleteCall) Header() http.Header { +func (c *InterconnectsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LicensesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *InterconnectsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnect) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{license}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects") 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{ "project": c.project, - "license": c.license, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.licenses.delete" call. +// Do executes the "compute.interconnects.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *LicensesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InterconnectsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39779,153 +39561,107 @@ func (c *LicensesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error return ret, nil } -type LicensesGetCall struct { +type InterconnectsListCall struct { s *Service project string - license string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified License resource. *Caution* This resource is -// intended for use only by third-party partners who are creating Cloud -// Marketplace images. +// List: Retrieves the list of Interconnects available to the specified +// project. // -// - license: Name of the License resource to return. // - project: Project ID for this request. -func (r *LicensesService) Get(project string, license string) *LicensesGetCall { - c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InterconnectsService) List(project string) *InterconnectsListCall { + c := &InterconnectsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.license = license - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LicensesGetCall) IfNoneMatch(entityTag string) *LicensesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall { - c.ctx_ = ctx return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *LicensesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{license}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "license": c.license, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *InterconnectsListCall) Filter(filter string) *InterconnectsListCall { + c.urlParams_.Set("filter", filter) + return c } -// Do executes the "compute.licenses.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *License.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, 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 := &License{ - 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 +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *InterconnectsListCall) MaxResults(maxResults int64) *InterconnectsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c } -type LicensesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *InterconnectsListCall) OrderBy(orderBy string) *InterconnectsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. *Caution* This resource is intended for -// use only by third-party partners who are creating Cloud Marketplace images. -// -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicensesService) GetIamPolicy(project string, resource string) *LicensesGetIamPolicyCall { - c := &LicensesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.resource = resource +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *InterconnectsListCall) PageToken(pageToken string) *InterconnectsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *LicensesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *LicensesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *InterconnectsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *InterconnectsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LicensesGetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesGetIamPolicyCall { +func (c *InterconnectsListCall) Fields(s ...googleapi.Field) *InterconnectsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -39933,27 +39669,27 @@ func (c *LicensesGetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesGetIamP // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *LicensesGetIamPolicyCall) IfNoneMatch(entityTag string) *LicensesGetIamPolicyCall { +func (c *InterconnectsListCall) IfNoneMatch(entityTag string) *InterconnectsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *LicensesGetIamPolicyCall) Context(ctx context.Context) *LicensesGetIamPolicyCall { +func (c *InterconnectsListCall) Context(ctx context.Context) *InterconnectsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LicensesGetIamPolicyCall) Header() http.Header { +func (c *InterconnectsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *InterconnectsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -39961,7 +39697,7 @@ func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -39969,18 +39705,18 @@ func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.licenses.getIamPolicy" call. +// Do executes the "compute.interconnects.list" call. // 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 *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *InterconnectList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *InterconnectsListCall) Do(opts ...googleapi.CallOption) (*InterconnectList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -39999,7 +39735,7 @@ func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &InterconnectList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40012,24 +39748,48 @@ func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er return ret, nil } -type LicensesInsertCall struct { - s *Service - project string - license *License - 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 *InterconnectsListCall) Pages(ctx context.Context, f func(*InterconnectList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Insert: Create a License resource in the specified project. *Caution* This -// resource is intended for use only by third-party partners who are creating -// Cloud Marketplace images. +type InterconnectsPatchCall struct { + s *Service + project string + interconnect string + interconnect2 *Interconnect + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified Interconnect with the data included in the +// request. This method supports PATCH semantics and uses the JSON merge patch +// format and processing rules. // +// - interconnect: Name of the interconnect to update. // - project: Project ID for this request. -func (r *LicensesService) Insert(project string, license *License) *LicensesInsertCall { - c := &LicensesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *InterconnectsService) Patch(project string, interconnect string, interconnect2 *Interconnect) *InterconnectsPatchCall { + c := &InterconnectsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.license = license + c.interconnect = interconnect + c.interconnect2 = interconnect2 return c } @@ -40043,7 +39803,7 @@ func (r *LicensesService) Insert(project string, license *License) *LicensesInse // 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 *LicensesInsertCall) RequestId(requestId string) *LicensesInsertCall { +func (c *InterconnectsPatchCall) RequestId(requestId string) *InterconnectsPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -40051,54 +39811,55 @@ func (c *LicensesInsertCall) RequestId(requestId string) *LicensesInsertCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LicensesInsertCall) Fields(s ...googleapi.Field) *LicensesInsertCall { +func (c *InterconnectsPatchCall) Fields(s ...googleapi.Field) *InterconnectsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LicensesInsertCall) Context(ctx context.Context) *LicensesInsertCall { +func (c *InterconnectsPatchCall) Context(ctx context.Context) *InterconnectsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LicensesInsertCall) Header() http.Header { +func (c *InterconnectsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LicensesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *InterconnectsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.license) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.interconnect2) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{interconnect}") 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{ - "project": c.project, + "project": c.project, + "interconnect": c.interconnect, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.licenses.insert" call. +// Do executes the "compute.interconnects.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *LicensesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *InterconnectsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40130,167 +39891,81 @@ func (c *LicensesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error return ret, nil } -type LicensesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type InterconnectsSetLabelsCall struct { + s *Service + project string + resource string + globalsetlabelsrequest *GlobalSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of licenses available in the specified project. -// This method does not get any licenses that belong to other projects, -// including licenses attached to publicly-available images, like Debian 9. If -// you want to get a list of publicly-available licenses, use this method to -// make a request to the respective image project, such as debian-cloud or -// windows-cloud. *Caution* This resource is intended for use only by -// third-party partners who are creating Cloud Marketplace images. +// SetLabels: Sets the labels on an Interconnect. To learn more about labels, +// read the Labeling Resources documentation. // // - project: Project ID for this request. -func (r *LicensesService) List(project string) *LicensesListCall { - c := &LicensesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *InterconnectsService) SetLabels(project string, resource string, globalsetlabelsrequest *GlobalSetLabelsRequest) *InterconnectsSetLabelsCall { + c := &InterconnectsSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *LicensesListCall) Filter(filter string) *LicensesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *LicensesListCall) MaxResults(maxResults int64) *LicensesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *LicensesListCall) OrderBy(orderBy string) *LicensesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *LicensesListCall) PageToken(pageToken string) *LicensesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *LicensesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *LicensesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.resource = resource + c.globalsetlabelsrequest = globalsetlabelsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LicensesListCall) Fields(s ...googleapi.Field) *LicensesListCall { +func (c *InterconnectsSetLabelsCall) Fields(s ...googleapi.Field) *InterconnectsSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *LicensesListCall) IfNoneMatch(entityTag string) *LicensesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *LicensesListCall) Context(ctx context.Context) *LicensesListCall { +func (c *InterconnectsSetLabelsCall) Context(ctx context.Context) *InterconnectsSetLabelsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LicensesListCall) Header() http.Header { +func (c *InterconnectsSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LicensesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *InterconnectsSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetlabelsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/interconnects/{resource}/setLabels") 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{ - "project": c.project, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.licenses.list" call. +// Do executes the "compute.interconnects.setLabels" call. // Any non-2xx status code is an error. Response headers are in either -// *LicensesListResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *LicensesListCall) Do(opts ...googleapi.CallOption) (*LicensesListResponse, error) { +// *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 *InterconnectsSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40309,7 +39984,7 @@ func (c *LicensesListCall) Do(opts ...googleapi.CallOption) (*LicensesListRespon if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &LicensesListResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40322,103 +39997,89 @@ func (c *LicensesListCall) Do(opts ...googleapi.CallOption) (*LicensesListRespon return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *LicensesListCall) Pages(ctx context.Context, f func(*LicensesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type LicensesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LicenseCodesGetCall struct { + s *Service + project string + licenseCode 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. *Caution* This resource is intended for use -// only by third-party partners who are creating Cloud Marketplace images. +// Get: Return a specified license code. License codes are mirrored across all +// projects that have permissions to read the License Code. *Caution* This +// resource is intended for use only by third-party partners who are creating +// Cloud Marketplace images. // +// - licenseCode: Number corresponding to the License code resource to return. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *LicensesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *LicensesSetIamPolicyCall { - c := &LicensesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LicenseCodesService) Get(project string, licenseCode string) *LicenseCodesGetCall { + c := &LicenseCodesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest + c.licenseCode = licenseCode return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LicensesSetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesSetIamPolicyCall { +func (c *LicenseCodesGetCall) Fields(s ...googleapi.Field) *LicenseCodesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *LicenseCodesGetCall) IfNoneMatch(entityTag string) *LicenseCodesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *LicensesSetIamPolicyCall) Context(ctx context.Context) *LicensesSetIamPolicyCall { +func (c *LicenseCodesGetCall) Context(ctx context.Context) *LicenseCodesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LicensesSetIamPolicyCall) Header() http.Header { +func (c *LicenseCodesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LicensesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) - if err != nil { - return nil, err +func (c *LicenseCodesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenseCodes/{licenseCode}") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "licenseCode": c.licenseCode, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.licenses.setIamPolicy" call. +// Do executes the "compute.licenseCodes.get" call. // 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 +// *LicenseCode.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *LicenseCodesGetCall) Do(opts ...googleapi.CallOption) (*LicenseCode, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40437,7 +40098,7 @@ func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &LicenseCode{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40450,7 +40111,7 @@ func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, er return ret, nil } -type LicensesTestIamPermissionsCall struct { +type LicenseCodesTestIamPermissionsCall struct { s *Service project string resource string @@ -40466,8 +40127,8 @@ type LicensesTestIamPermissionsCall struct { // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. -func (r *LicensesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicensesTestIamPermissionsCall { - c := &LicensesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LicenseCodesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicenseCodesTestIamPermissionsCall { + c := &LicenseCodesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.resource = resource c.testpermissionsrequest = testpermissionsrequest @@ -40477,27 +40138,27 @@ func (r *LicensesService) TestIamPermissions(project string, resource string, te // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *LicensesTestIamPermissionsCall) Fields(s ...googleapi.Field) *LicensesTestIamPermissionsCall { +func (c *LicenseCodesTestIamPermissionsCall) Fields(s ...googleapi.Field) *LicenseCodesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *LicensesTestIamPermissionsCall) Context(ctx context.Context) *LicensesTestIamPermissionsCall { +func (c *LicenseCodesTestIamPermissionsCall) Context(ctx context.Context) *LicenseCodesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *LicensesTestIamPermissionsCall) Header() http.Header { +func (c *LicenseCodesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *LicensesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *LicenseCodesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) @@ -40506,7 +40167,7 @@ func (c *LicensesTestIamPermissionsCall) doRequest(alt string) (*http.Response, } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenseCodes/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -40520,13 +40181,13 @@ func (c *LicensesTestIamPermissionsCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.licenses.testIamPermissions" call. +// Do executes the "compute.licenseCodes.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either // *TestPermissionsResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *LicensesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *LicenseCodesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40558,24 +40219,25 @@ func (c *LicensesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Test return ret, nil } -type MachineImagesDeleteCall struct { - s *Service - project string - machineImage string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LicensesDeleteCall struct { + s *Service + project string + license string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified machine image. Deleting a machine image is -// permanent and cannot be undone. +// Delete: Deletes the specified license. *Caution* This resource is intended +// for use only by third-party partners who are creating Cloud Marketplace +// images. // -// - machineImage: The name of the machine image to delete. +// - license: Name of the license resource to delete. // - project: Project ID for this request. -func (r *MachineImagesService) Delete(project string, machineImage string) *MachineImagesDeleteCall { - c := &MachineImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LicensesService) Delete(project string, license string) *LicensesDeleteCall { + c := &LicensesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.machineImage = machineImage + c.license = license return c } @@ -40589,7 +40251,7 @@ func (r *MachineImagesService) Delete(project string, machineImage string) *Mach // 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 *MachineImagesDeleteCall) RequestId(requestId string) *MachineImagesDeleteCall { +func (c *LicensesDeleteCall) RequestId(requestId string) *LicensesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -40597,32 +40259,32 @@ func (c *MachineImagesDeleteCall) RequestId(requestId string) *MachineImagesDele // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MachineImagesDeleteCall) Fields(s ...googleapi.Field) *MachineImagesDeleteCall { +func (c *LicensesDeleteCall) Fields(s ...googleapi.Field) *LicensesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *MachineImagesDeleteCall) Context(ctx context.Context) *MachineImagesDeleteCall { +func (c *LicensesDeleteCall) Context(ctx context.Context) *LicensesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MachineImagesDeleteCall) Header() http.Header { +func (c *LicensesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MachineImagesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *LicensesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{machineImage}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{license}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -40630,18 +40292,18 @@ func (c *MachineImagesDeleteCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "machineImage": c.machineImage, + "project": c.project, + "license": c.license, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.machineImages.delete" call. +// Do executes the "compute.licenses.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *MachineImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *LicensesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40673,31 +40335,33 @@ func (c *MachineImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type MachineImagesGetCall struct { +type LicensesGetCall struct { s *Service project string - machineImage string + license string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified machine image. +// Get: Returns the specified License resource. *Caution* This resource is +// intended for use only by third-party partners who are creating Cloud +// Marketplace images. // -// - machineImage: The name of the machine image. +// - license: Name of the License resource to return. // - project: Project ID for this request. -func (r *MachineImagesService) Get(project string, machineImage string) *MachineImagesGetCall { - c := &MachineImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LicensesService) Get(project string, license string) *LicensesGetCall { + c := &LicensesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.machineImage = machineImage + c.license = license return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MachineImagesGetCall) Fields(s ...googleapi.Field) *MachineImagesGetCall { +func (c *LicensesGetCall) Fields(s ...googleapi.Field) *LicensesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40705,27 +40369,27 @@ func (c *MachineImagesGetCall) Fields(s ...googleapi.Field) *MachineImagesGetCal // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *MachineImagesGetCall) IfNoneMatch(entityTag string) *MachineImagesGetCall { +func (c *LicensesGetCall) IfNoneMatch(entityTag string) *LicensesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *MachineImagesGetCall) Context(ctx context.Context) *MachineImagesGetCall { +func (c *LicensesGetCall) Context(ctx context.Context) *LicensesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MachineImagesGetCall) Header() http.Header { +func (c *LicensesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MachineImagesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *LicensesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -40733,7 +40397,7 @@ func (c *MachineImagesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{machineImage}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{license}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -40741,18 +40405,18 @@ func (c *MachineImagesGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "machineImage": c.machineImage, + "project": c.project, + "license": c.license, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.machineImages.get" call. +// Do executes the "compute.licenses.get" call. // Any non-2xx status code is an error. Response headers are in either -// *MachineImage.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *License.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *MachineImagesGetCall) Do(opts ...googleapi.CallOption) (*MachineImage, error) { +func (c *LicensesGetCall) Do(opts ...googleapi.CallOption) (*License, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40771,7 +40435,7 @@ func (c *MachineImagesGetCall) Do(opts ...googleapi.CallOption) (*MachineImage, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &MachineImage{ + ret := &License{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -40784,7 +40448,7 @@ func (c *MachineImagesGetCall) Do(opts ...googleapi.CallOption) (*MachineImage, return ret, nil } -type MachineImagesGetIamPolicyCall struct { +type LicensesGetIamPolicyCall struct { s *Service project string resource string @@ -40795,12 +40459,13 @@ type MachineImagesGetIamPolicyCall struct { } // GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// no such policy or resource exists. *Caution* This resource is intended for +// use only by third-party partners who are creating Cloud Marketplace images. // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. -func (r *MachineImagesService) GetIamPolicy(project string, resource string) *MachineImagesGetIamPolicyCall { - c := &MachineImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LicensesService) GetIamPolicy(project string, resource string) *LicensesGetIamPolicyCall { + c := &LicensesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.resource = resource return c @@ -40808,7 +40473,7 @@ func (r *MachineImagesService) GetIamPolicy(project string, resource string) *Ma // OptionsRequestedPolicyVersion sets the optional parameter // "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *MachineImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *MachineImagesGetIamPolicyCall { +func (c *LicensesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *LicensesGetIamPolicyCall { c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) return c } @@ -40816,7 +40481,7 @@ func (c *MachineImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsReq // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MachineImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *MachineImagesGetIamPolicyCall { +func (c *LicensesGetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -40824,27 +40489,27 @@ func (c *MachineImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *MachineIma // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *MachineImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *MachineImagesGetIamPolicyCall { +func (c *LicensesGetIamPolicyCall) IfNoneMatch(entityTag string) *LicensesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *MachineImagesGetIamPolicyCall) Context(ctx context.Context) *MachineImagesGetIamPolicyCall { +func (c *LicensesGetIamPolicyCall) Context(ctx context.Context) *LicensesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MachineImagesGetIamPolicyCall) Header() http.Header { +func (c *LicensesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MachineImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *LicensesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -40852,7 +40517,7 @@ func (c *MachineImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -40866,12 +40531,12 @@ func (c *MachineImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.machineImages.getIamPolicy" call. +// Do executes the "compute.licenses.getIamPolicy" call. // 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 *MachineImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *LicensesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -40903,25 +40568,24 @@ func (c *MachineImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic return ret, nil } -type MachineImagesInsertCall struct { - s *Service - project string - machineimage *MachineImage - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type LicensesInsertCall struct { + s *Service + project string + license *License + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a machine image in the specified project using the data that -// is included in the request. If you are creating a new machine image to -// update an existing instance, your new machine image should use the same -// network or, if applicable, the same subnetwork as the original instance. +// Insert: Create a License resource in the specified project. *Caution* This +// resource is intended for use only by third-party partners who are creating +// Cloud Marketplace images. // // - project: Project ID for this request. -func (r *MachineImagesService) Insert(project string, machineimage *MachineImage) *MachineImagesInsertCall { - c := &MachineImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LicensesService) Insert(project string, license *License) *LicensesInsertCall { + c := &LicensesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.machineimage = machineimage + c.license = license return c } @@ -40935,51 +40599,44 @@ func (r *MachineImagesService) Insert(project string, machineimage *MachineImage // 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 *MachineImagesInsertCall) RequestId(requestId string) *MachineImagesInsertCall { +func (c *LicensesInsertCall) RequestId(requestId string) *LicensesInsertCall { c.urlParams_.Set("requestId", requestId) return c } -// SourceInstance sets the optional parameter "sourceInstance": Required. -// Source instance that is used to create the machine image from. -func (c *MachineImagesInsertCall) SourceInstance(sourceInstance string) *MachineImagesInsertCall { - c.urlParams_.Set("sourceInstance", sourceInstance) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MachineImagesInsertCall) Fields(s ...googleapi.Field) *MachineImagesInsertCall { +func (c *LicensesInsertCall) Fields(s ...googleapi.Field) *LicensesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *MachineImagesInsertCall) Context(ctx context.Context) *MachineImagesInsertCall { +func (c *LicensesInsertCall) Context(ctx context.Context) *LicensesInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MachineImagesInsertCall) Header() http.Header { +func (c *LicensesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MachineImagesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *LicensesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.machineimage) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.license) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -40992,12 +40649,12 @@ func (c *MachineImagesInsertCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.machineImages.insert" call. +// Do executes the "compute.licenses.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *MachineImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *LicensesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41029,7 +40686,7 @@ func (c *MachineImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type MachineImagesListCall struct { +type LicensesListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -41038,12 +40695,17 @@ type MachineImagesListCall struct { header_ http.Header } -// List: Retrieves a list of machine images that are contained within the -// specified project. +// List: Retrieves the list of licenses available in the specified project. +// This method does not get any licenses that belong to other projects, +// including licenses attached to publicly-available images, like Debian 9. If +// you want to get a list of publicly-available licenses, use this method to +// make a request to the respective image project, such as debian-cloud or +// windows-cloud. *Caution* This resource is intended for use only by +// third-party partners who are creating Cloud Marketplace images. // // - project: Project ID for this request. -func (r *MachineImagesService) List(project string) *MachineImagesListCall { - c := &MachineImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LicensesService) List(project string) *LicensesListCall { + c := &LicensesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -41080,7 +40742,7 @@ func (r *MachineImagesService) List(project string) *MachineImagesListCall { // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *MachineImagesListCall) Filter(filter string) *MachineImagesListCall { +func (c *LicensesListCall) Filter(filter string) *LicensesListCall { c.urlParams_.Set("filter", filter) return c } @@ -41090,7 +40752,7 @@ func (c *MachineImagesListCall) Filter(filter string) *MachineImagesListCall { // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *MachineImagesListCall) MaxResults(maxResults int64) *MachineImagesListCall { +func (c *LicensesListCall) MaxResults(maxResults int64) *LicensesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -41103,7 +40765,7 @@ func (c *MachineImagesListCall) MaxResults(maxResults int64) *MachineImagesListC // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *MachineImagesListCall) OrderBy(orderBy string) *MachineImagesListCall { +func (c *LicensesListCall) OrderBy(orderBy string) *LicensesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -41111,7 +40773,7 @@ func (c *MachineImagesListCall) OrderBy(orderBy string) *MachineImagesListCall { // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *MachineImagesListCall) PageToken(pageToken string) *MachineImagesListCall { +func (c *LicensesListCall) PageToken(pageToken string) *LicensesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -41121,7 +40783,7 @@ func (c *MachineImagesListCall) PageToken(pageToken string) *MachineImagesListCa // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *MachineImagesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineImagesListCall { +func (c *LicensesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *LicensesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -41129,7 +40791,7 @@ func (c *MachineImagesListCall) ReturnPartialSuccess(returnPartialSuccess bool) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MachineImagesListCall) Fields(s ...googleapi.Field) *MachineImagesListCall { +func (c *LicensesListCall) Fields(s ...googleapi.Field) *LicensesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -41137,27 +40799,27 @@ func (c *MachineImagesListCall) Fields(s ...googleapi.Field) *MachineImagesListC // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *MachineImagesListCall) IfNoneMatch(entityTag string) *MachineImagesListCall { +func (c *LicensesListCall) IfNoneMatch(entityTag string) *LicensesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *MachineImagesListCall) Context(ctx context.Context) *MachineImagesListCall { +func (c *LicensesListCall) Context(ctx context.Context) *LicensesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MachineImagesListCall) Header() http.Header { +func (c *LicensesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MachineImagesListCall) doRequest(alt string) (*http.Response, error) { +func (c *LicensesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -41165,7 +40827,7 @@ func (c *MachineImagesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -41178,13 +40840,13 @@ func (c *MachineImagesListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.machineImages.list" call. +// Do executes the "compute.licenses.list" call. // Any non-2xx status code is an error. Response headers are in either -// *MachineImageList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *LicensesListResponse.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *MachineImagesListCall) Do(opts ...googleapi.CallOption) (*MachineImageList, error) { +func (c *LicensesListCall) Do(opts ...googleapi.CallOption) (*LicensesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41203,7 +40865,7 @@ func (c *MachineImagesListCall) Do(opts ...googleapi.CallOption) (*MachineImageL if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &MachineImageList{ + ret := &LicensesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41219,7 +40881,7 @@ func (c *MachineImagesListCall) Do(opts ...googleapi.CallOption) (*MachineImageL // 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 *MachineImagesListCall) Pages(ctx context.Context, f func(*MachineImageList) error) error { +func (c *LicensesListCall) Pages(ctx context.Context, f func(*LicensesListResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -41237,7 +40899,7 @@ func (c *MachineImagesListCall) Pages(ctx context.Context, f func(*MachineImageL } } -type MachineImagesSetIamPolicyCall struct { +type LicensesSetIamPolicyCall struct { s *Service project string resource string @@ -41248,12 +40910,13 @@ type MachineImagesSetIamPolicyCall struct { } // SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. +// Replaces any existing policy. *Caution* This resource is intended for use +// only by third-party partners who are creating Cloud Marketplace images. // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. -func (r *MachineImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *MachineImagesSetIamPolicyCall { - c := &MachineImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LicensesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *LicensesSetIamPolicyCall { + c := &LicensesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.resource = resource c.globalsetpolicyrequest = globalsetpolicyrequest @@ -41263,27 +40926,27 @@ func (r *MachineImagesService) SetIamPolicy(project string, resource string, glo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MachineImagesSetIamPolicyCall) Fields(s ...googleapi.Field) *MachineImagesSetIamPolicyCall { +func (c *LicensesSetIamPolicyCall) Fields(s ...googleapi.Field) *LicensesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *MachineImagesSetIamPolicyCall) Context(ctx context.Context) *MachineImagesSetIamPolicyCall { +func (c *LicensesSetIamPolicyCall) Context(ctx context.Context) *LicensesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MachineImagesSetIamPolicyCall) Header() http.Header { +func (c *LicensesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MachineImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *LicensesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) @@ -41292,7 +40955,7 @@ func (c *MachineImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, e } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{resource}/setIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -41306,12 +40969,12 @@ func (c *MachineImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.machineImages.setIamPolicy" call. +// Do executes the "compute.licenses.setIamPolicy" call. // 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 *MachineImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *LicensesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41343,7 +41006,7 @@ func (c *MachineImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic return ret, nil } -type MachineImagesTestIamPermissionsCall struct { +type LicensesTestIamPermissionsCall struct { s *Service project string resource string @@ -41354,12 +41017,13 @@ type MachineImagesTestIamPermissionsCall struct { } // TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// resource. *Caution* This resource is intended for use only by third-party +// partners who are creating Cloud Marketplace images. // // - project: Project ID for this request. // - resource: Name or id of the resource for this request. -func (r *MachineImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *MachineImagesTestIamPermissionsCall { - c := &MachineImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *LicensesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *LicensesTestIamPermissionsCall { + c := &LicensesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.resource = resource c.testpermissionsrequest = testpermissionsrequest @@ -41369,27 +41033,27 @@ func (r *MachineImagesService) TestIamPermissions(project string, resource strin // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MachineImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *MachineImagesTestIamPermissionsCall { +func (c *LicensesTestIamPermissionsCall) Fields(s ...googleapi.Field) *LicensesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *MachineImagesTestIamPermissionsCall) Context(ctx context.Context) *MachineImagesTestIamPermissionsCall { +func (c *LicensesTestIamPermissionsCall) Context(ctx context.Context) *LicensesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MachineImagesTestIamPermissionsCall) Header() http.Header { +func (c *LicensesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MachineImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *LicensesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) @@ -41398,7 +41062,7 @@ func (c *MachineImagesTestIamPermissionsCall) doRequest(alt string) (*http.Respo } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/licenses/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -41412,13 +41076,13 @@ func (c *MachineImagesTestIamPermissionsCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.machineImages.testIamPermissions" call. +// Do executes the "compute.licenses.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either // *TestPermissionsResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *MachineImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *LicensesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41450,184 +41114,90 @@ func (c *MachineImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type MachineTypesAggregatedListCall struct { +type MachineImagesDeleteCall struct { s *Service project string + machineImage string urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of machine types. To prevent -// failure, Google recommends that you set the `returnPartialSuccess` parameter -// to `true`. +// Delete: Deletes the specified machine image. Deleting a machine image is +// permanent and cannot be undone. // +// - machineImage: The name of the machine image to delete. // - project: Project ID for this request. -func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { - c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *MachineImagesService) Delete(project string, machineImage string) *MachineImagesDeleteCall { + c := &MachineImagesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.machineImage = machineImage return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *MachineTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *MachineTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *MachineTypesAggregatedListCall) OrderBy(orderBy string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *MachineTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *MachineTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *MachineTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *MachineImagesDeleteCall) RequestId(requestId string) *MachineImagesDeleteCall { + 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 // details. -func (c *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall { +func (c *MachineImagesDeleteCall) Fields(s ...googleapi.Field) *MachineImagesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *MachineTypesAggregatedListCall) IfNoneMatch(entityTag string) *MachineTypesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall { +func (c *MachineImagesDeleteCall) Context(ctx context.Context) *MachineImagesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MachineTypesAggregatedListCall) Header() http.Header { +func (c *MachineImagesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *MachineImagesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/machineTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{machineImage}") 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{ - "project": c.project, + "project": c.project, + "machineImage": c.machineImage, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.machineTypes.aggregatedList" call. +// Do executes the "compute.machineImages.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *MachineTypeAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*MachineTypeAggregatedList, error) { +// *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 *MachineImagesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41646,7 +41216,7 @@ func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Mach if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &MachineTypeAggregatedList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41659,55 +41229,31 @@ func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Mach return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *MachineTypesAggregatedListCall) Pages(ctx context.Context, f func(*MachineTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type MachineTypesGetCall struct { +type MachineImagesGetCall struct { s *Service project string - zone string - machineType string + machineImage string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified machine type. +// Get: Returns the specified machine image. // -// - machineType: Name of the machine type to return. +// - machineImage: The name of the machine image. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { - c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *MachineImagesService) Get(project string, machineImage string) *MachineImagesGetCall { + c := &MachineImagesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.machineType = machineType + c.machineImage = machineImage return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall { +func (c *MachineImagesGetCall) Fields(s ...googleapi.Field) *MachineImagesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -41715,27 +41261,27 @@ func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *MachineTypesGetCall) IfNoneMatch(entityTag string) *MachineTypesGetCall { +func (c *MachineImagesGetCall) IfNoneMatch(entityTag string) *MachineImagesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall { +func (c *MachineImagesGetCall) Context(ctx context.Context) *MachineImagesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MachineTypesGetCall) Header() http.Header { +func (c *MachineImagesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *MachineImagesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -41743,7 +41289,7 @@ func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/machineTypes/{machineType}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{machineImage}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -41751,19 +41297,18 @@ func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "machineType": c.machineType, + "project": c.project, + "machineImage": c.machineImage, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.machineTypes.get" call. +// Do executes the "compute.machineImages.get" call. // Any non-2xx status code is an error. Response headers are in either -// *MachineType.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *MachineImage.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, error) { +func (c *MachineImagesGetCall) Do(opts ...googleapi.CallOption) (*MachineImage, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41782,7 +41327,7 @@ func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &MachineType{ + ret := &MachineImage{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41795,109 +41340,39 @@ func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, er return ret, nil } -type MachineTypesListCall struct { +type MachineImagesGetIamPolicyCall struct { s *Service project string - zone string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of machine types available to the specified project. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. // // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { - c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *MachineImagesService) GetIamPolicy(project string, resource string) *MachineImagesGetIamPolicyCall { + c := &MachineImagesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *MachineTypesListCall) OrderBy(orderBy string) *MachineTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall { - c.urlParams_.Set("pageToken", pageToken) + c.resource = resource return c } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *MachineTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *MachineImagesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *MachineImagesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 // details. -func (c *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall { +func (c *MachineImagesGetIamPolicyCall) Fields(s ...googleapi.Field) *MachineImagesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -41905,27 +41380,27 @@ func (c *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCal // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *MachineTypesListCall) IfNoneMatch(entityTag string) *MachineTypesListCall { +func (c *MachineImagesGetIamPolicyCall) IfNoneMatch(entityTag string) *MachineImagesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall { +func (c *MachineImagesGetIamPolicyCall) Context(ctx context.Context) *MachineImagesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *MachineTypesListCall) Header() http.Header { +func (c *MachineImagesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *MachineImagesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -41933,7 +41408,7 @@ func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/machineTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -41941,19 +41416,18 @@ func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.machineTypes.list" call. +// Do executes the "compute.machineImages.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *MachineTypeList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeList, error) { +// *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 *MachineImagesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -41972,7 +41446,7 @@ func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeLis if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &MachineTypeList{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -41985,151 +41459,233 @@ func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeLis return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type NetworkAttachmentsAggregatedListCall struct { +type MachineImagesInsertCall struct { s *Service project string + machineimage *MachineImage urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves the list of all NetworkAttachment resources, -// regional and global, available to the specified project. To prevent failure, -// Google recommends that you set the `returnPartialSuccess` parameter to -// `true`. +// Insert: Creates a machine image in the specified project using the data that +// is included in the request. If you are creating a new machine image to +// update an existing instance, your new machine image should use the same +// network or, if applicable, the same subnetwork as the original instance. // // - project: Project ID for this request. -func (r *NetworkAttachmentsService) AggregatedList(project string) *NetworkAttachmentsAggregatedListCall { - c := &NetworkAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *MachineImagesService) Insert(project string, machineimage *MachineImage) *MachineImagesInsertCall { + c := &MachineImagesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.machineimage = machineimage return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *NetworkAttachmentsAggregatedListCall) Filter(filter string) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *NetworkAttachmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *MachineImagesInsertCall) RequestId(requestId string) *MachineImagesInsertCall { + c.urlParams_.Set("requestId", requestId) return c } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkAttachmentsAggregatedListCall) MaxResults(maxResults int64) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// SourceInstance sets the optional parameter "sourceInstance": Required. +// Source instance that is used to create the machine image from. +func (c *MachineImagesInsertCall) SourceInstance(sourceInstance string) *MachineImagesInsertCall { + c.urlParams_.Set("sourceInstance", sourceInstance) return c } -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *NetworkAttachmentsAggregatedListCall) OrderBy(orderBy string) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *MachineImagesInsertCall) Fields(s ...googleapi.Field) *MachineImagesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *NetworkAttachmentsAggregatedListCall) PageToken(pageToken string) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) +// Context sets the context to be used in this call's Do method. +func (c *MachineImagesInsertCall) Context(ctx context.Context) *MachineImagesInsertCall { + c.ctx_ = ctx return c } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *NetworkAttachmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *MachineImagesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *NetworkAttachmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkAttachmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) +func (c *MachineImagesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.machineimage) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages") + 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{ + "project": c.project, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.machineImages.insert" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *MachineImagesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type MachineImagesListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of machine images that are contained within the +// specified project. +// +// - project: Project ID for this request. +func (r *MachineImagesService) List(project string) *MachineImagesListCall { + c := &MachineImagesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *MachineImagesListCall) Filter(filter string) *MachineImagesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *MachineImagesListCall) MaxResults(maxResults int64) *MachineImagesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *MachineImagesListCall) OrderBy(orderBy string) *MachineImagesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *MachineImagesListCall) PageToken(pageToken string) *MachineImagesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *MachineImagesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineImagesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkAttachmentsAggregatedListCall { +func (c *MachineImagesListCall) Fields(s ...googleapi.Field) *MachineImagesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42137,27 +41693,27 @@ func (c *NetworkAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *Net // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NetworkAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkAttachmentsAggregatedListCall { +func (c *MachineImagesListCall) IfNoneMatch(entityTag string) *MachineImagesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsAggregatedListCall) Context(ctx context.Context) *NetworkAttachmentsAggregatedListCall { +func (c *MachineImagesListCall) Context(ctx context.Context) *MachineImagesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkAttachmentsAggregatedListCall) Header() http.Header { +func (c *MachineImagesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *MachineImagesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -42165,7 +41721,7 @@ func (c *NetworkAttachmentsAggregatedListCall) doRequest(alt string) (*http.Resp var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkAttachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -42178,13 +41734,13 @@ func (c *NetworkAttachmentsAggregatedListCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkAttachments.aggregatedList" call. +// Do executes the "compute.machineImages.list" call. // Any non-2xx status code is an error. Response headers are in either -// *NetworkAttachmentAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworkAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkAttachmentAggregatedList, error) { +// *MachineImageList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *MachineImagesListCall) Do(opts ...googleapi.CallOption) (*MachineImageList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42203,7 +41759,7 @@ func (c *NetworkAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkAttachmentAggregatedList{ + ret := &MachineImageList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42219,7 +41775,7 @@ func (c *NetworkAttachmentsAggregatedListCall) 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 *NetworkAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkAttachmentAggregatedList) error) error { +func (c *MachineImagesListCall) Pages(ctx context.Context, f func(*MachineImageList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -42237,94 +41793,81 @@ func (c *NetworkAttachmentsAggregatedListCall) Pages(ctx context.Context, f func } } -type NetworkAttachmentsDeleteCall struct { - s *Service - project string - region string - networkAttachment string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type MachineImagesSetIamPolicyCall struct { + s *Service + project string + resource string + globalsetpolicyrequest *GlobalSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified NetworkAttachment in the given scope +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. // -// - networkAttachment: Name of the NetworkAttachment resource to delete. // - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) Delete(project string, region string, networkAttachment string) *NetworkAttachmentsDeleteCall { - c := &NetworkAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *MachineImagesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *MachineImagesSetIamPolicyCall { + c := &MachineImagesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.networkAttachment = networkAttachment - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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). end_interface: -// MixerMutationRequestBuilder -func (c *NetworkAttachmentsDeleteCall) RequestId(requestId string) *NetworkAttachmentsDeleteCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.globalsetpolicyrequest = globalsetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkAttachmentsDeleteCall) Fields(s ...googleapi.Field) *NetworkAttachmentsDeleteCall { +func (c *MachineImagesSetIamPolicyCall) Fields(s ...googleapi.Field) *MachineImagesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsDeleteCall) Context(ctx context.Context) *NetworkAttachmentsDeleteCall { +func (c *MachineImagesSetIamPolicyCall) Context(ctx context.Context) *MachineImagesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkAttachmentsDeleteCall) Header() http.Header { +func (c *MachineImagesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *MachineImagesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{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{ - "project": c.project, - "region": c.region, - "networkAttachment": c.networkAttachment, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkAttachments.delete" call. +// Do executes the "compute.machineImages.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *NetworkAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *MachineImagesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42343,7 +41886,7 @@ func (c *NetworkAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operat 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, @@ -42356,91 +41899,82 @@ func (c *NetworkAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operat return ret, nil } -type NetworkAttachmentsGetCall struct { - s *Service - project string - region string - networkAttachment string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type MachineImagesTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified NetworkAttachment resource in the given scope. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // -// - networkAttachment: Name of the NetworkAttachment resource to return. // - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) Get(project string, region string, networkAttachment string) *NetworkAttachmentsGetCall { - c := &NetworkAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *MachineImagesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *MachineImagesTestIamPermissionsCall { + c := &MachineImagesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.networkAttachment = networkAttachment + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkAttachmentsGetCall) Fields(s ...googleapi.Field) *NetworkAttachmentsGetCall { +func (c *MachineImagesTestIamPermissionsCall) Fields(s ...googleapi.Field) *MachineImagesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NetworkAttachmentsGetCall) IfNoneMatch(entityTag string) *NetworkAttachmentsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsGetCall) Context(ctx context.Context) *NetworkAttachmentsGetCall { +func (c *MachineImagesTestIamPermissionsCall) Context(ctx context.Context) *MachineImagesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkAttachmentsGetCall) Header() http.Header { +func (c *MachineImagesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *MachineImagesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/machineImages/{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{ - "project": c.project, - "region": c.region, - "networkAttachment": c.networkAttachment, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkAttachments.get" call. +// Do executes the "compute.machineImages.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *NetworkAttachment.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *NetworkAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*NetworkAttachment, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *MachineImagesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42459,7 +41993,7 @@ func (c *NetworkAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*NetworkAt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkAttachment{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42472,42 +42006,129 @@ func (c *NetworkAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*NetworkAt return ret, nil } -type NetworkAttachmentsGetIamPolicyCall struct { +type MachineTypesAggregatedListCall struct { s *Service project string - region string - resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// AggregatedList: Retrieves an aggregated list of machine types. To prevent +// failure, Google recommends that you set the `returnPartialSuccess` parameter +// to `true`. // // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkAttachmentsService) GetIamPolicy(project string, region string, resource string) *NetworkAttachmentsGetIamPolicyCall { - c := &NetworkAttachmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *MachineTypesService) AggregatedList(project string) *MachineTypesAggregatedListCall { + c := &MachineTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NetworkAttachmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NetworkAttachmentsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *MachineTypesAggregatedListCall) Filter(filter string) *MachineTypesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *MachineTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *MachineTypesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *MachineTypesAggregatedListCall) MaxResults(maxResults int64) *MachineTypesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *MachineTypesAggregatedListCall) OrderBy(orderBy string) *MachineTypesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *MachineTypesAggregatedListCall) PageToken(pageToken string) *MachineTypesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *MachineTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineTypesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *MachineTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *MachineTypesAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkAttachmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkAttachmentsGetIamPolicyCall { +func (c *MachineTypesAggregatedListCall) Fields(s ...googleapi.Field) *MachineTypesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42515,27 +42136,27 @@ func (c *NetworkAttachmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *Netwo // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NetworkAttachmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *NetworkAttachmentsGetIamPolicyCall { +func (c *MachineTypesAggregatedListCall) IfNoneMatch(entityTag string) *MachineTypesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsGetIamPolicyCall) Context(ctx context.Context) *NetworkAttachmentsGetIamPolicyCall { +func (c *MachineTypesAggregatedListCall) Context(ctx context.Context) *MachineTypesAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkAttachmentsGetIamPolicyCall) Header() http.Header { +func (c *MachineTypesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkAttachmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *MachineTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -42543,7 +42164,7 @@ func (c *NetworkAttachmentsGetIamPolicyCall) 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, "projects/{project}/regions/{region}/networkAttachments/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/machineTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -42551,19 +42172,18 @@ func (c *NetworkAttachmentsGetIamPolicyCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkAttachments.getIamPolicy" call. +// Do executes the "compute.machineTypes.aggregatedList" call. // 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 *NetworkAttachmentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *MachineTypeAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *MachineTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*MachineTypeAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42582,7 +42202,7 @@ func (c *NetworkAttachmentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &MachineTypeAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42595,97 +42215,111 @@ func (c *NetworkAttachmentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type NetworkAttachmentsInsertCall struct { - s *Service - project string - region string - networkattachment *NetworkAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a NetworkAttachment in the specified project in the given -// scope using the parameters that are included in the request. -// -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) Insert(project string, region string, networkattachment *NetworkAttachment) *NetworkAttachmentsInsertCall { - c := &NetworkAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkattachment = networkattachment - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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). end_interface: -// MixerMutationRequestBuilder -func (c *NetworkAttachmentsInsertCall) RequestId(requestId string) *NetworkAttachmentsInsertCall { - c.urlParams_.Set("requestId", requestId) +// 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 *MachineTypesAggregatedListCall) Pages(ctx context.Context, f func(*MachineTypeAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type MachineTypesGetCall struct { + s *Service + project string + zone string + machineType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified machine type. +// +// - machineType: Name of the machine type to return. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *MachineTypesService) Get(project string, zone string, machineType string) *MachineTypesGetCall { + c := &MachineTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.machineType = machineType return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkAttachmentsInsertCall) Fields(s ...googleapi.Field) *NetworkAttachmentsInsertCall { +func (c *MachineTypesGetCall) Fields(s ...googleapi.Field) *MachineTypesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *MachineTypesGetCall) IfNoneMatch(entityTag string) *MachineTypesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsInsertCall) Context(ctx context.Context) *NetworkAttachmentsInsertCall { +func (c *MachineTypesGetCall) Context(ctx context.Context) *MachineTypesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkAttachmentsInsertCall) Header() http.Header { +func (c *MachineTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkattachment) - if err != nil { - return nil, err +func (c *MachineTypesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/machineTypes/{machineType}") 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{ - "project": c.project, - "region": c.region, + "project": c.project, + "zone": c.zone, + "machineType": c.machineType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkAttachments.insert" call. +// Do executes the "compute.machineTypes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *MachineType.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *MachineTypesGetCall) Do(opts ...googleapi.CallOption) (*MachineType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42704,7 +42338,7 @@ func (c *NetworkAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operat if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &MachineType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42717,24 +42351,24 @@ func (c *NetworkAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operat return ret, nil } -type NetworkAttachmentsListCall struct { +type MachineTypesListCall struct { s *Service project string - region string + zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the NetworkAttachments for a project in the given scope. +// List: Retrieves a list of machine types available to the specified project. // // - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *NetworkAttachmentsService) List(project string, region string) *NetworkAttachmentsListCall { - c := &NetworkAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *MachineTypesService) List(project string, zone string) *MachineTypesListCall { + c := &MachineTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region + c.zone = zone return c } @@ -42770,7 +42404,7 @@ func (r *NetworkAttachmentsService) List(project string, region string) *Network // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *NetworkAttachmentsListCall) Filter(filter string) *NetworkAttachmentsListCall { +func (c *MachineTypesListCall) Filter(filter string) *MachineTypesListCall { c.urlParams_.Set("filter", filter) return c } @@ -42780,7 +42414,7 @@ func (c *NetworkAttachmentsListCall) Filter(filter string) *NetworkAttachmentsLi // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkAttachmentsListCall) MaxResults(maxResults int64) *NetworkAttachmentsListCall { +func (c *MachineTypesListCall) MaxResults(maxResults int64) *MachineTypesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -42793,7 +42427,7 @@ func (c *NetworkAttachmentsListCall) MaxResults(maxResults int64) *NetworkAttach // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *NetworkAttachmentsListCall) OrderBy(orderBy string) *NetworkAttachmentsListCall { +func (c *MachineTypesListCall) OrderBy(orderBy string) *MachineTypesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -42801,7 +42435,7 @@ func (c *NetworkAttachmentsListCall) OrderBy(orderBy string) *NetworkAttachments // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *NetworkAttachmentsListCall) PageToken(pageToken string) *NetworkAttachmentsListCall { +func (c *MachineTypesListCall) PageToken(pageToken string) *MachineTypesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -42811,7 +42445,7 @@ func (c *NetworkAttachmentsListCall) PageToken(pageToken string) *NetworkAttachm // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *NetworkAttachmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkAttachmentsListCall { +func (c *MachineTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *MachineTypesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -42819,7 +42453,7 @@ func (c *NetworkAttachmentsListCall) ReturnPartialSuccess(returnPartialSuccess b // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkAttachmentsListCall) Fields(s ...googleapi.Field) *NetworkAttachmentsListCall { +func (c *MachineTypesListCall) Fields(s ...googleapi.Field) *MachineTypesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -42827,27 +42461,27 @@ func (c *NetworkAttachmentsListCall) Fields(s ...googleapi.Field) *NetworkAttach // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NetworkAttachmentsListCall) IfNoneMatch(entityTag string) *NetworkAttachmentsListCall { +func (c *MachineTypesListCall) IfNoneMatch(entityTag string) *MachineTypesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsListCall) Context(ctx context.Context) *NetworkAttachmentsListCall { +func (c *MachineTypesListCall) Context(ctx context.Context) *MachineTypesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkAttachmentsListCall) Header() http.Header { +func (c *MachineTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkAttachmentsListCall) doRequest(alt string) (*http.Response, error) { +func (c *MachineTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -42855,7 +42489,7 @@ func (c *NetworkAttachmentsListCall) doRequest(alt string) (*http.Response, erro var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/machineTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -42864,18 +42498,18 @@ func (c *NetworkAttachmentsListCall) doRequest(alt string) (*http.Response, erro req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkAttachments.list" call. +// Do executes the "compute.machineTypes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *NetworkAttachmentList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *MachineTypeList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *NetworkAttachmentsListCall) Do(opts ...googleapi.CallOption) (*NetworkAttachmentList, error) { +func (c *MachineTypesListCall) Do(opts ...googleapi.CallOption) (*MachineTypeList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -42894,7 +42528,7 @@ func (c *NetworkAttachmentsListCall) Do(opts ...googleapi.CallOption) (*NetworkA if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkAttachmentList{ + ret := &MachineTypeList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -42910,7 +42544,7 @@ func (c *NetworkAttachmentsListCall) Do(opts ...googleapi.CallOption) (*NetworkA // 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 *NetworkAttachmentsListCall) Pages(ctx context.Context, f func(*NetworkAttachmentList) error) error { +func (c *MachineTypesListCall) Pages(ctx context.Context, f func(*MachineTypeList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -42928,102 +42562,185 @@ func (c *NetworkAttachmentsListCall) Pages(ctx context.Context, f func(*NetworkA } } -type NetworkAttachmentsPatchCall struct { - s *Service - project string - region string - networkAttachment string - networkattachment *NetworkAttachment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkAttachmentsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Patch: Patches the specified NetworkAttachment resource with the data -// included in the request. This method supports PATCH semantics and uses JSON -// merge patch format and processing rules. +// AggregatedList: Retrieves the list of all NetworkAttachment resources, +// regional and global, available to the specified project. To prevent failure, +// Google recommends that you set the `returnPartialSuccess` parameter to +// `true`. // -// - networkAttachment: Name of the NetworkAttachment resource to patch. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *NetworkAttachmentsService) Patch(project string, region string, networkAttachment string, networkattachment *NetworkAttachment) *NetworkAttachmentsPatchCall { - c := &NetworkAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkAttachmentsService) AggregatedList(project string) *NetworkAttachmentsAggregatedListCall { + c := &NetworkAttachmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.networkAttachment = networkAttachment - c.networkattachment = networkattachment return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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). end_interface: -// MixerMutationRequestBuilder -func (c *NetworkAttachmentsPatchCall) RequestId(requestId string) *NetworkAttachmentsPatchCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *NetworkAttachmentsAggregatedListCall) Filter(filter string) *NetworkAttachmentsAggregatedListCall { + c.urlParams_.Set("filter", filter) return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkAttachmentsPatchCall) Fields(s ...googleapi.Field) *NetworkAttachmentsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *NetworkAttachmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkAttachmentsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) return c } -// Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsPatchCall) Context(ctx context.Context) *NetworkAttachmentsPatchCall { - c.ctx_ = ctx +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *NetworkAttachmentsAggregatedListCall) MaxResults(maxResults int64) *NetworkAttachmentsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkAttachmentsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *NetworkAttachmentsAggregatedListCall) OrderBy(orderBy string) *NetworkAttachmentsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *NetworkAttachmentsAggregatedListCall) PageToken(pageToken string) *NetworkAttachmentsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *NetworkAttachmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkAttachmentsAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *NetworkAttachmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkAttachmentsAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *NetworkAttachmentsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkAttachmentsAggregatedListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworkAttachmentsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkAttachmentsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *NetworkAttachmentsAggregatedListCall) Context(ctx context.Context) *NetworkAttachmentsAggregatedListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *NetworkAttachmentsAggregatedListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } return c.header_ } -func (c *NetworkAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkattachment) - if err != nil { - return nil, err +func (c *NetworkAttachmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkAttachments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "project": c.project, - "region": c.region, - "networkAttachment": c.networkAttachment, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkAttachments.patch" call. +// Do executes the "compute.networkAttachments.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *NetworkAttachmentAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkAttachmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkAttachmentAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43042,7 +42759,7 @@ func (c *NetworkAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Operati if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NetworkAttachmentAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43055,85 +42772,115 @@ func (c *NetworkAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Operati return ret, nil } -type NetworkAttachmentsSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - 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 *NetworkAttachmentsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkAttachmentAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. +type NetworkAttachmentsDeleteCall struct { + s *Service + project string + region string + networkAttachment string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified NetworkAttachment in the given scope // +// - networkAttachment: Name of the NetworkAttachment resource to delete. // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkAttachmentsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NetworkAttachmentsSetIamPolicyCall { - c := &NetworkAttachmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region of this request. +func (r *NetworkAttachmentsService) Delete(project string, region string, networkAttachment string) *NetworkAttachmentsDeleteCall { + c := &NetworkAttachmentsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest + c.networkAttachment = networkAttachment + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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). end_interface: +// MixerMutationRequestBuilder +func (c *NetworkAttachmentsDeleteCall) RequestId(requestId string) *NetworkAttachmentsDeleteCall { + 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 // details. -func (c *NetworkAttachmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkAttachmentsSetIamPolicyCall { +func (c *NetworkAttachmentsDeleteCall) Fields(s ...googleapi.Field) *NetworkAttachmentsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsSetIamPolicyCall) Context(ctx context.Context) *NetworkAttachmentsSetIamPolicyCall { +func (c *NetworkAttachmentsDeleteCall) Context(ctx context.Context) *NetworkAttachmentsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkAttachmentsSetIamPolicyCall) Header() http.Header { +func (c *NetworkAttachmentsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkAttachmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *NetworkAttachmentsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "networkAttachment": c.networkAttachment, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkAttachments.setIamPolicy" call. +// Do executes the "compute.networkAttachments.delete" call. // 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 +// *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 *NetworkAttachmentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *NetworkAttachmentsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43152,7 +42899,7 @@ func (c *NetworkAttachmentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (* 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, @@ -43165,86 +42912,91 @@ func (c *NetworkAttachmentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type NetworkAttachmentsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkAttachmentsGetCall struct { + s *Service + project string + region string + networkAttachment string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// Get: Returns the specified NetworkAttachment resource in the given scope. // +// - networkAttachment: Name of the NetworkAttachment resource to return. // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkAttachmentsTestIamPermissionsCall { - c := &NetworkAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region of this request. +func (r *NetworkAttachmentsService) Get(project string, region string, networkAttachment string) *NetworkAttachmentsGetCall { + c := &NetworkAttachmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.networkAttachment = networkAttachment return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkAttachmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkAttachmentsTestIamPermissionsCall { +func (c *NetworkAttachmentsGetCall) Fields(s ...googleapi.Field) *NetworkAttachmentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworkAttachmentsGetCall) IfNoneMatch(entityTag string) *NetworkAttachmentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworkAttachmentsTestIamPermissionsCall) Context(ctx context.Context) *NetworkAttachmentsTestIamPermissionsCall { +func (c *NetworkAttachmentsGetCall) Context(ctx context.Context) *NetworkAttachmentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkAttachmentsTestIamPermissionsCall) Header() http.Header { +func (c *NetworkAttachmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err +func (c *NetworkAttachmentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "networkAttachment": c.networkAttachment, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkAttachments.testIamPermissions" call. +// Do executes the "compute.networkAttachments.get" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworkAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *NetworkAttachment.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *NetworkAttachmentsGetCall) Do(opts ...googleapi.CallOption) (*NetworkAttachment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43263,7 +43015,7 @@ func (c *NetworkAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOpti if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &NetworkAttachment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43276,129 +43028,42 @@ func (c *NetworkAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOpti return ret, nil } -type NetworkEdgeSecurityServicesAggregatedListCall struct { +type NetworkAttachmentsGetIamPolicyCall struct { s *Service project string + region string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves the list of all NetworkEdgeSecurityService -// resources available to the specified project. To prevent failure, Google -// recommends that you set the `returnPartialSuccess` parameter to `true`. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. // -// - project: Name of the project scoping this request. -func (r *NetworkEdgeSecurityServicesService) AggregatedList(project string) *NetworkEdgeSecurityServicesAggregatedListCall { - c := &NetworkEdgeSecurityServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *NetworkAttachmentsService) GetIamPolicy(project string, region string, resource string) *NetworkAttachmentsGetIamPolicyCall { + c := &NetworkAttachmentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region + c.resource = resource return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Filter(filter string) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEdgeSecurityServicesAggregatedListCall) MaxResults(maxResults int64) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) OrderBy(orderBy string) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) PageToken(pageToken string) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkEdgeSecurityServicesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *NetworkAttachmentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NetworkAttachmentsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 // details. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesAggregatedListCall { +func (c *NetworkAttachmentsGetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkAttachmentsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43406,27 +43071,27 @@ func (c *NetworkEdgeSecurityServicesAggregatedListCall) Fields(s ...googleapi.Fi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesAggregatedListCall { +func (c *NetworkAttachmentsGetIamPolicyCall) IfNoneMatch(entityTag string) *NetworkAttachmentsGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesAggregatedListCall { +func (c *NetworkAttachmentsGetIamPolicyCall) Context(ctx context.Context) *NetworkAttachmentsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Header() http.Header { +func (c *NetworkAttachmentsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEdgeSecurityServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkAttachmentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -43434,7 +43099,7 @@ func (c *NetworkEdgeSecurityServicesAggregatedListCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkEdgeSecurityServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -43442,18 +43107,19 @@ func (c *NetworkEdgeSecurityServicesAggregatedListCall) doRequest(alt string) (* } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEdgeSecurityServices.aggregatedList" call. +// Do executes the "compute.networkAttachments.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *NetworkEdgeSecurityServiceAggregatedList.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityServiceAggregatedList, error) { +// *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 *NetworkAttachmentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43472,7 +43138,7 @@ func (c *NetworkEdgeSecurityServicesAggregatedListCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkEdgeSecurityServiceAggregatedList{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43485,48 +43151,26 @@ func (c *NetworkEdgeSecurityServicesAggregatedListCall) Do(opts ...googleapi.Cal return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NetworkEdgeSecurityServicesAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEdgeSecurityServiceAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type NetworkEdgeSecurityServicesDeleteCall struct { - s *Service - project string - region string - networkEdgeSecurityService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkAttachmentsInsertCall struct { + s *Service + project string + region string + networkattachment *NetworkAttachment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified service. +// Insert: Creates a NetworkAttachment in the specified project in the given +// scope using the parameters that are included in the request. // -// - networkEdgeSecurityService: Name of the network edge security service to -// delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Delete(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesDeleteCall { - c := &NetworkEdgeSecurityServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region of this request. +func (r *NetworkAttachmentsService) Insert(project string, region string, networkattachment *NetworkAttachment) *NetworkAttachmentsInsertCall { + c := &NetworkAttachmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.networkEdgeSecurityService = networkEdgeSecurityService + c.networkattachment = networkattachment return c } @@ -43539,8 +43183,9 @@ func (r *NetworkEdgeSecurityServicesService) Delete(project string, region strin // 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 *NetworkEdgeSecurityServicesDeleteCall) RequestId(requestId string) *NetworkEdgeSecurityServicesDeleteCall { +// supported ( 00000000-0000-0000-0000-000000000000). end_interface: +// MixerMutationRequestBuilder +func (c *NetworkAttachmentsInsertCall) RequestId(requestId string) *NetworkAttachmentsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -43548,52 +43193,55 @@ func (c *NetworkEdgeSecurityServicesDeleteCall) RequestId(requestId string) *Net // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkEdgeSecurityServicesDeleteCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesDeleteCall { +func (c *NetworkAttachmentsInsertCall) Fields(s ...googleapi.Field) *NetworkAttachmentsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesDeleteCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesDeleteCall { +func (c *NetworkAttachmentsInsertCall) Context(ctx context.Context) *NetworkAttachmentsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEdgeSecurityServicesDeleteCall) Header() http.Header { +func (c *NetworkAttachmentsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEdgeSecurityServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *NetworkAttachmentsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkattachment) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments") 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{ - "project": c.project, - "region": c.region, - "networkEdgeSecurityService": c.networkEdgeSecurityService, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEdgeSecurityServices.delete" call. +// Do executes the "compute.networkAttachments.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEdgeSecurityServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkAttachmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43625,35 +43273,109 @@ func (c *NetworkEdgeSecurityServicesDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type NetworkEdgeSecurityServicesGetCall struct { - s *Service - project string - region string - networkEdgeSecurityService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NetworkAttachmentsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Gets a specified NetworkEdgeSecurityService. +// List: Lists the NetworkAttachments for a project in the given scope. // -// - networkEdgeSecurityService: Name of the network edge security service to -// get. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Get(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesGetCall { - c := &NetworkEdgeSecurityServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region of this request. +func (r *NetworkAttachmentsService) List(project string, region string) *NetworkAttachmentsListCall { + c := &NetworkAttachmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.networkEdgeSecurityService = networkEdgeSecurityService + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *NetworkAttachmentsListCall) Filter(filter string) *NetworkAttachmentsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *NetworkAttachmentsListCall) MaxResults(maxResults int64) *NetworkAttachmentsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *NetworkAttachmentsListCall) OrderBy(orderBy string) *NetworkAttachmentsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *NetworkAttachmentsListCall) PageToken(pageToken string) *NetworkAttachmentsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *NetworkAttachmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkAttachmentsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkEdgeSecurityServicesGetCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesGetCall { +func (c *NetworkAttachmentsListCall) Fields(s ...googleapi.Field) *NetworkAttachmentsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -43661,27 +43383,27 @@ func (c *NetworkEdgeSecurityServicesGetCall) Fields(s ...googleapi.Field) *Netwo // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NetworkEdgeSecurityServicesGetCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesGetCall { +func (c *NetworkAttachmentsListCall) IfNoneMatch(entityTag string) *NetworkAttachmentsListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesGetCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesGetCall { +func (c *NetworkAttachmentsListCall) Context(ctx context.Context) *NetworkAttachmentsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEdgeSecurityServicesGetCall) Header() http.Header { +func (c *NetworkAttachmentsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEdgeSecurityServicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkAttachmentsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -43689,7 +43411,7 @@ func (c *NetworkEdgeSecurityServicesGetCall) 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, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -43697,20 +43419,19 @@ func (c *NetworkEdgeSecurityServicesGetCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "networkEdgeSecurityService": c.networkEdgeSecurityService, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEdgeSecurityServices.get" call. +// Do executes the "compute.networkAttachments.list" call. // Any non-2xx status code is an error. Response headers are in either -// *NetworkEdgeSecurityService.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworkEdgeSecurityServicesGetCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityService, error) { +// *NetworkAttachmentList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *NetworkAttachmentsListCall) Do(opts ...googleapi.CallOption) (*NetworkAttachmentList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43729,7 +43450,7 @@ func (c *NetworkEdgeSecurityServicesGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkEdgeSecurityService{ + ret := &NetworkAttachmentList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -43742,26 +43463,51 @@ func (c *NetworkEdgeSecurityServicesGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type NetworkEdgeSecurityServicesInsertCall struct { - s *Service - project string - region string - networkedgesecurityservice *NetworkEdgeSecurityService - 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 *NetworkAttachmentsListCall) Pages(ctx context.Context, f func(*NetworkAttachmentList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Insert: Creates a new service in the specified project using the data -// included in the request. +type NetworkAttachmentsPatchCall struct { + s *Service + project string + region string + networkAttachment string + networkattachment *NetworkAttachment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified NetworkAttachment resource with the data +// included in the request. This method supports PATCH semantics and uses JSON +// merge patch format and processing rules. // +// - networkAttachment: Name of the NetworkAttachment resource to patch. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Insert(project string, region string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesInsertCall { - c := &NetworkEdgeSecurityServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *NetworkAttachmentsService) Patch(project string, region string, networkAttachment string, networkattachment *NetworkAttachment) *NetworkAttachmentsPatchCall { + c := &NetworkAttachmentsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.networkedgesecurityservice = networkedgesecurityservice + c.networkAttachment = networkAttachment + c.networkattachment = networkattachment return c } @@ -43774,71 +43520,66 @@ func (r *NetworkEdgeSecurityServicesService) Insert(project string, region strin // 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 *NetworkEdgeSecurityServicesInsertCall) RequestId(requestId string) *NetworkEdgeSecurityServicesInsertCall { +// supported ( 00000000-0000-0000-0000-000000000000). end_interface: +// MixerMutationRequestBuilder +func (c *NetworkAttachmentsPatchCall) RequestId(requestId string) *NetworkAttachmentsPatchCall { c.urlParams_.Set("requestId", requestId) return c } -// ValidateOnly sets the optional parameter "validateOnly": If true, the -// request will not be committed. -func (c *NetworkEdgeSecurityServicesInsertCall) ValidateOnly(validateOnly bool) *NetworkEdgeSecurityServicesInsertCall { - 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 // details. -func (c *NetworkEdgeSecurityServicesInsertCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesInsertCall { +func (c *NetworkAttachmentsPatchCall) Fields(s ...googleapi.Field) *NetworkAttachmentsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesInsertCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesInsertCall { +func (c *NetworkAttachmentsPatchCall) Context(ctx context.Context) *NetworkAttachmentsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEdgeSecurityServicesInsertCall) Header() http.Header { +func (c *NetworkAttachmentsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEdgeSecurityServicesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkAttachmentsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkedgesecurityservice) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkattachment) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{networkAttachment}") 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{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "networkAttachment": c.networkAttachment, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEdgeSecurityServices.insert" call. +// Do executes the "compute.networkAttachments.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEdgeSecurityServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkAttachmentsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43870,113 +43611,196 @@ func (c *NetworkEdgeSecurityServicesInsertCall) Do(opts ...googleapi.CallOption) return ret, nil } -type NetworkEdgeSecurityServicesPatchCall struct { - s *Service - project string - region string - networkEdgeSecurityService string - networkedgesecurityservice *NetworkEdgeSecurityService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkAttachmentsSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Patches the specified policy with the data included in the request. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. // -// - networkEdgeSecurityService: Name of the network edge security service to -// update. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *NetworkEdgeSecurityServicesService) Patch(project string, region string, networkEdgeSecurityService string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesPatchCall { - c := &NetworkEdgeSecurityServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.networkEdgeSecurityService = networkEdgeSecurityService - c.networkedgesecurityservice = networkedgesecurityservice +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *NetworkAttachmentsService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NetworkAttachmentsSetIamPolicyCall { + c := &NetworkAttachmentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest return c } -// Paths sets the optional parameter "paths": -func (c *NetworkEdgeSecurityServicesPatchCall) Paths(paths ...string) *NetworkEdgeSecurityServicesPatchCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *NetworkAttachmentsSetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkAttachmentsSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkEdgeSecurityServicesPatchCall) RequestId(requestId string) *NetworkEdgeSecurityServicesPatchCall { - c.urlParams_.Set("requestId", requestId) +// Context sets the context to be used in this call's Do method. +func (c *NetworkAttachmentsSetIamPolicyCall) Context(ctx context.Context) *NetworkAttachmentsSetIamPolicyCall { + c.ctx_ = ctx return c } -// UpdateMask sets the optional parameter "updateMask": Indicates fields to be -// updated as part of this request. -func (c *NetworkEdgeSecurityServicesPatchCall) UpdateMask(updateMask string) *NetworkEdgeSecurityServicesPatchCall { - c.urlParams_.Set("updateMask", updateMask) +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *NetworkAttachmentsSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkAttachmentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{resource}/setIamPolicy") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkAttachments.setIamPolicy" call. +// 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 *NetworkAttachmentsSetIamPolicyCall) 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 +} + +type NetworkAttachmentsTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *NetworkAttachmentsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkAttachmentsTestIamPermissionsCall { + c := &NetworkAttachmentsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkEdgeSecurityServicesPatchCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesPatchCall { +func (c *NetworkAttachmentsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkAttachmentsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEdgeSecurityServicesPatchCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesPatchCall { +func (c *NetworkAttachmentsTestIamPermissionsCall) Context(ctx context.Context) *NetworkAttachmentsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEdgeSecurityServicesPatchCall) Header() http.Header { +func (c *NetworkAttachmentsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEdgeSecurityServicesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkAttachmentsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkedgesecurityservice) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkAttachments/{resource}/testIamPermissions") 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{ - "project": c.project, - "region": c.region, - "networkEdgeSecurityService": c.networkEdgeSecurityService, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEdgeSecurityServices.patch" call. +// Do executes the "compute.networkAttachments.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEdgeSecurityServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkAttachmentsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -43995,7 +43819,7 @@ func (c *NetworkEdgeSecurityServicesPatchCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44008,7 +43832,7 @@ func (c *NetworkEdgeSecurityServicesPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type NetworkEndpointGroupsAggregatedListCall struct { +type NetworkEdgeSecurityServicesAggregatedListCall struct { s *Service project string urlParams_ gensupport.URLParams @@ -44017,13 +43841,13 @@ type NetworkEndpointGroupsAggregatedListCall struct { header_ http.Header } -// AggregatedList: Retrieves the list of network endpoint groups and sorts them -// by zone. To prevent failure, Google recommends that you set the -// `returnPartialSuccess` parameter to `true`. +// AggregatedList: Retrieves the list of all NetworkEdgeSecurityService +// resources available to the specified project. To prevent failure, Google +// recommends that you set the `returnPartialSuccess` parameter to `true`. // -// - project: Project ID for this request. -func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { - c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *NetworkEdgeSecurityServicesService) AggregatedList(project string) *NetworkEdgeSecurityServicesAggregatedListCall { + c := &NetworkEdgeSecurityServicesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } @@ -44060,7 +43884,7 @@ func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEn // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Filter(filter string) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } @@ -44073,7 +43897,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *Network // which predate this field, if this flag is omitted or false, only scopes of // the scope types where the resource type is expected to be found will be // included. -func (c *NetworkEndpointGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) return c } @@ -44083,7 +43907,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) IncludeAllScopes(includeAllSco // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) MaxResults(maxResults int64) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -44096,7 +43920,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) * // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) OrderBy(orderBy string) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -44104,7 +43928,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *Netwo // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) PageToken(pageToken string) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -44114,7 +43938,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *N // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *NetworkEndpointGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -44122,7 +43946,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) ReturnPartialSuccess(returnPar // ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The // Shared VPC service project id or service project number for which aggregated // list request is invoked for subnetworks list-usable api. -func (c *NetworkEndpointGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) return c } @@ -44130,7 +43954,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) ServiceProjectNumber(servicePr // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkEndpointGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -44138,27 +43962,27 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Fields(s ...googleapi.Field) * // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NetworkEndpointGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsAggregatedListCall) Context(ctx context.Context) *NetworkEndpointGroupsAggregatedListCall { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -44166,7 +43990,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.R var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkEndpointGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkEdgeSecurityServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -44179,13 +44003,13 @@ func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.aggregatedList" call. +// Do executes the "compute.networkEdgeSecurityServices.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupAggregatedList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use +// *NetworkEdgeSecurityServiceAggregatedList.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupAggregatedList, error) { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityServiceAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44204,7 +44028,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkEndpointGroupAggregatedList{ + ret := &NetworkEdgeSecurityServiceAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44220,7 +44044,7 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOptio // 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 *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupAggregatedList) error) error { +func (c *NetworkEdgeSecurityServicesAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEdgeSecurityServiceAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -44238,31 +44062,27 @@ func (c *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f f } } -type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { - s *Service - project string - zone string - networkEndpointGroup string - networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkEdgeSecurityServicesDeleteCall struct { + s *Service + project string + region string + networkEdgeSecurityService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AttachNetworkEndpoints: Attach a list of network endpoints to the specified -// network endpoint group. +// Delete: Deletes the specified service. // -// - networkEndpointGroup: The name of the network endpoint group where you are -// attaching network endpoints to. It should comply with RFC1035. +// - networkEdgeSecurityService: Name of the network edge security service to +// delete. // - project: Project ID for this request. -// - zone: The name of the zone where the network endpoint group is located. It -// should comply with RFC1035. -func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { - c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Delete(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesDeleteCall { + c := &NetworkEdgeSecurityServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - c.networkendpointgroupsattachendpointsrequest = networkendpointgroupsattachendpointsrequest + c.region = region + c.networkEdgeSecurityService = networkEdgeSecurityService return c } @@ -44276,7 +44096,7 @@ func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zo // 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsAttachNetworkEndpointsCall { +func (c *NetworkEdgeSecurityServicesDeleteCall) RequestId(requestId string) *NetworkEdgeSecurityServicesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -44284,56 +44104,52 @@ func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId st // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAttachNetworkEndpointsCall { +func (c *NetworkEdgeSecurityServicesDeleteCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsAttachNetworkEndpointsCall { +func (c *NetworkEdgeSecurityServicesDeleteCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { +func (c *NetworkEdgeSecurityServicesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *NetworkEdgeSecurityServicesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroupsattachendpointsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") 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{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, + "project": c.project, + "region": c.region, + "networkEdgeSecurityService": c.networkEdgeSecurityService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.attachNetworkEndpoints" call. +// Do executes the "compute.networkEdgeSecurityServices.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkEdgeSecurityServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44365,98 +44181,92 @@ func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googleapi.C return ret, nil } -type NetworkEndpointGroupsDeleteCall struct { - s *Service - project string - zone string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkEdgeSecurityServicesGetCall struct { + s *Service + project string + region string + networkEdgeSecurityService string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified network endpoint group. The network endpoints -// in the NEG and the VM instances they belong to are not terminated when the -// NEG is deleted. Note that the NEG cannot be deleted if there are backend -// services referencing it. +// Get: Gets a specified NetworkEdgeSecurityService. // -// - networkEndpointGroup: The name of the network endpoint group to delete. It -// should comply with RFC1035. +// - networkEdgeSecurityService: Name of the network edge security service to +// get. // - project: Project ID for this request. -// - zone: The name of the zone where the network endpoint group is located. It -// should comply with RFC1035. -func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { - c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Get(project string, region string, networkEdgeSecurityService string) *NetworkEdgeSecurityServicesGetCall { + c := &NetworkEdgeSecurityServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEndpointGroupsDeleteCall { - c.urlParams_.Set("requestId", requestId) + c.region = region + c.networkEdgeSecurityService = networkEdgeSecurityService return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDeleteCall { +func (c *NetworkEdgeSecurityServicesGetCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworkEdgeSecurityServicesGetCall) IfNoneMatch(entityTag string) *NetworkEdgeSecurityServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *NetworkEndpointGroupsDeleteCall { +func (c *NetworkEdgeSecurityServicesGetCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEndpointGroupsDeleteCall) Header() http.Header { +func (c *NetworkEdgeSecurityServicesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkEdgeSecurityServicesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") 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{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, + "project": c.project, + "region": c.region, + "networkEdgeSecurityService": c.networkEdgeSecurityService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.delete" call. +// Do executes the "compute.networkEdgeSecurityServices.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *NetworkEdgeSecurityService.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEdgeSecurityServicesGetCall) Do(opts ...googleapi.CallOption) (*NetworkEdgeSecurityService, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44475,7 +44285,7 @@ func (c *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Ope if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NetworkEdgeSecurityService{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -44488,31 +44298,26 @@ func (c *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type NetworkEndpointGroupsDetachNetworkEndpointsCall struct { - s *Service - project string - zone string - networkEndpointGroup string - networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkEdgeSecurityServicesInsertCall struct { + s *Service + project string + region string + networkedgesecurityservice *NetworkEdgeSecurityService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DetachNetworkEndpoints: Detach a list of network endpoints from the -// specified network endpoint group. +// Insert: Creates a new service in the specified project using the data +// included in the request. // -// - networkEndpointGroup: The name of the network endpoint group where you are -// removing network endpoints. It should comply with RFC1035. -// - project: Project ID for this request. -// - zone: The name of the zone where the network endpoint group is located. It -// should comply with RFC1035. -func (r *NetworkEndpointGroupsService) DetachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest) *NetworkEndpointGroupsDetachNetworkEndpointsCall { - c := &NetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Insert(project string, region string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesInsertCall { + c := &NetworkEdgeSecurityServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup - c.networkendpointgroupsdetachendpointsrequest = networkendpointgroupsdetachendpointsrequest + c.region = region + c.networkedgesecurityservice = networkedgesecurityservice return c } @@ -44526,44 +44331,51 @@ func (r *NetworkEndpointGroupsService) DetachNetworkEndpoints(project string, zo // 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 *NetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsDetachNetworkEndpointsCall { +func (c *NetworkEdgeSecurityServicesInsertCall) RequestId(requestId string) *NetworkEdgeSecurityServicesInsertCall { c.urlParams_.Set("requestId", requestId) return c } +// ValidateOnly sets the optional parameter "validateOnly": If true, the +// request will not be committed. +func (c *NetworkEdgeSecurityServicesInsertCall) ValidateOnly(validateOnly bool) *NetworkEdgeSecurityServicesInsertCall { + 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 // details. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDetachNetworkEndpointsCall { +func (c *NetworkEdgeSecurityServicesInsertCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsDetachNetworkEndpointsCall { +func (c *NetworkEdgeSecurityServicesInsertCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { +func (c *NetworkEdgeSecurityServicesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkEdgeSecurityServicesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroupsdetachendpointsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkedgesecurityservice) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -44571,19 +44383,18 @@ func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.detachNetworkEndpoints" call. +// Do executes the "compute.networkEdgeSecurityServices.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkEdgeSecurityServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44615,215 +44426,113 @@ func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googleapi.C return ret, nil } -type NetworkEndpointGroupsGetCall struct { - s *Service - project string - zone string - networkEndpointGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NetworkEdgeSecurityServicesPatchCall struct { + s *Service + project string + region string + networkEdgeSecurityService string + networkedgesecurityservice *NetworkEdgeSecurityService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified network endpoint group. +// Patch: Patches the specified policy with the data included in the request. // -// - networkEndpointGroup: The name of the network endpoint group. It should -// comply with RFC1035. +// - networkEdgeSecurityService: Name of the network edge security service to +// update. // - project: Project ID for this request. -// - zone: The name of the zone where the network endpoint group is located. It -// should comply with RFC1035. -func (r *NetworkEndpointGroupsService) Get(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsGetCall { - c := &NetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *NetworkEdgeSecurityServicesService) Patch(project string, region string, networkEdgeSecurityService string, networkedgesecurityservice *NetworkEdgeSecurityService) *NetworkEdgeSecurityServicesPatchCall { + c := &NetworkEdgeSecurityServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.networkEndpointGroup = networkEndpointGroup + c.region = region + c.networkEdgeSecurityService = networkEdgeSecurityService + c.networkedgesecurityservice = networkedgesecurityservice return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// Paths sets the optional parameter "paths": +func (c *NetworkEdgeSecurityServicesPatchCall) Paths(paths ...string) *NetworkEdgeSecurityServicesPatchCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsGetCall { - c.ifNoneMatch_ = entityTag +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkEdgeSecurityServicesPatchCall) RequestId(requestId string) *NetworkEdgeSecurityServicesPatchCall { + c.urlParams_.Set("requestId", requestId) return c } -// Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsGetCall) Context(ctx context.Context) *NetworkEndpointGroupsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkEndpointGroupsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "networkEndpointGroup": c.networkEndpointGroup, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.networkEndpointGroups.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroup.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *NetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, 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 := &NetworkEndpointGroup{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type NetworkEndpointGroupsInsertCall struct { - s *Service - project string - zone string - networkendpointgroup *NetworkEndpointGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a network endpoint group in the specified project using the -// parameters that are included in the request. -// -// - project: Project ID for this request. -// - zone: The name of the zone where you want to create the network endpoint -// group. It should comply with RFC1035. -func (r *NetworkEndpointGroupsService) Insert(project string, zone string, networkendpointgroup *NetworkEndpointGroup) *NetworkEndpointGroupsInsertCall { - c := &NetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.networkendpointgroup = networkendpointgroup - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkEndpointGroupsInsertCall) RequestId(requestId string) *NetworkEndpointGroupsInsertCall { - c.urlParams_.Set("requestId", requestId) +// UpdateMask sets the optional parameter "updateMask": Indicates fields to be +// updated as part of this request. +func (c *NetworkEdgeSecurityServicesPatchCall) UpdateMask(updateMask string) *NetworkEdgeSecurityServicesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsInsertCall { +func (c *NetworkEdgeSecurityServicesPatchCall) Fields(s ...googleapi.Field) *NetworkEdgeSecurityServicesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsInsertCall) Context(ctx context.Context) *NetworkEndpointGroupsInsertCall { +func (c *NetworkEdgeSecurityServicesPatchCall) Context(ctx context.Context) *NetworkEdgeSecurityServicesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEndpointGroupsInsertCall) Header() http.Header { +func (c *NetworkEdgeSecurityServicesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkEdgeSecurityServicesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkedgesecurityservice) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/networkEdgeSecurityServices/{networkEdgeSecurityService}") 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{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "region": c.region, + "networkEdgeSecurityService": c.networkEdgeSecurityService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.insert" call. +// Do executes the "compute.networkEdgeSecurityServices.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkEdgeSecurityServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -44855,26 +44564,23 @@ func (c *NetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type NetworkEndpointGroupsListCall struct { +type NetworkEndpointGroupsAggregatedListCall struct { s *Service project string - zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves the list of network endpoint groups that are located in the -// specified project and zone. +// AggregatedList: Retrieves the list of network endpoint groups and sorts them +// by zone. To prevent failure, Google recommends that you set the +// `returnPartialSuccess` parameter to `true`. // -// - project: Project ID for this request. -// - zone: The name of the zone where the network endpoint group is located. It -// should comply with RFC1035. -func (r *NetworkEndpointGroupsService) List(project string, zone string) *NetworkEndpointGroupsListCall { - c := &NetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *NetworkEndpointGroupsService) AggregatedList(project string) *NetworkEndpointGroupsAggregatedListCall { + c := &NetworkEndpointGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone return c } @@ -44910,17 +44616,30 @@ func (r *NetworkEndpointGroupsService) List(project string, zone string) *Networ // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *NetworkEndpointGroupsListCall) Filter(filter string) *NetworkEndpointGroupsListCall { +func (c *NetworkEndpointGroupsAggregatedListCall) Filter(filter string) *NetworkEndpointGroupsAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *NetworkEndpointGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEndpointGroupsListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListCall { +func (c *NetworkEndpointGroupsAggregatedListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -44933,7 +44652,7 @@ func (c *NetworkEndpointGroupsListCall) MaxResults(maxResults int64) *NetworkEnd // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *NetworkEndpointGroupsListCall) OrderBy(orderBy string) *NetworkEndpointGroupsListCall { +func (c *NetworkEndpointGroupsAggregatedListCall) OrderBy(orderBy string) *NetworkEndpointGroupsAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -44941,7 +44660,7 @@ func (c *NetworkEndpointGroupsListCall) OrderBy(orderBy string) *NetworkEndpoint // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *NetworkEndpointGroupsListCall) PageToken(pageToken string) *NetworkEndpointGroupsListCall { +func (c *NetworkEndpointGroupsAggregatedListCall) PageToken(pageToken string) *NetworkEndpointGroupsAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -44951,15 +44670,23 @@ func (c *NetworkEndpointGroupsListCall) PageToken(pageToken string) *NetworkEndp // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *NetworkEndpointGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsListCall { +func (c *NetworkEndpointGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *NetworkEndpointGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NetworkEndpointGroupsAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListCall { +func (c *NetworkEndpointGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -44967,27 +44694,27 @@ func (c *NetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *NetworkEnd // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsListCall { +func (c *NetworkEndpointGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsListCall) Context(ctx context.Context) *NetworkEndpointGroupsListCall { +func (c *NetworkEndpointGroupsAggregatedListCall) Context(ctx context.Context) *NetworkEndpointGroupsAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEndpointGroupsListCall) Header() http.Header { +func (c *NetworkEndpointGroupsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkEndpointGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -44995,7 +44722,7 @@ func (c *NetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/networkEndpointGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -45004,18 +44731,17 @@ func (c *NetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, e req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.list" call. +// Do executes the "compute.networkEndpointGroups.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *NetworkEndpointGroupAggregatedList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, error) { +func (c *NetworkEndpointGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45034,7 +44760,7 @@ func (c *NetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*Netwo if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkEndpointGroupList{ + ret := &NetworkEndpointGroupAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45050,7 +44776,7 @@ func (c *NetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*Netwo // 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 *NetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) error) error { +func (c *NetworkEndpointGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -45068,146 +44794,82 @@ func (c *NetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*Netwo } } -type NetworkEndpointGroupsListNetworkEndpointsCall struct { - s *Service - project string - zone string - networkEndpointGroup string - networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkEndpointGroupsAttachNetworkEndpointsCall struct { + s *Service + project string + zone string + networkEndpointGroup string + networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListNetworkEndpoints: Lists the network endpoints in the specified network -// endpoint group. +// AttachNetworkEndpoints: Attach a list of network endpoints to the specified +// network endpoint group. // -// - networkEndpointGroup: The name of the network endpoint group from which -// you want to generate a list of included network endpoints. It should -// comply with RFC1035. +// - networkEndpointGroup: The name of the network endpoint group where you are +// attaching network endpoints to. It should comply with RFC1035. // - project: Project ID for this request. // - zone: The name of the zone where the network endpoint group is located. It // should comply with RFC1035. -func (r *NetworkEndpointGroupsService) ListNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest) *NetworkEndpointGroupsListNetworkEndpointsCall { - c := &NetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkEndpointGroupsService) AttachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsattachendpointsrequest *NetworkEndpointGroupsAttachEndpointsRequest) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + c := &NetworkEndpointGroupsAttachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.networkEndpointGroup = networkEndpointGroup - c.networkendpointgroupslistendpointsrequest = networkendpointgroupslistendpointsrequest + c.networkendpointgroupsattachendpointsrequest = networkendpointgroupsattachendpointsrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsListNetworkEndpointsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsAttachNetworkEndpointsCall { + 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 // details. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListNetworkEndpointsCall { +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsAttachNetworkEndpointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsListNetworkEndpointsCall { +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsAttachNetworkEndpointsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkEndpointGroupsAttachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroupslistendpointsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroupsattachendpointsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/attachNetworkEndpoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -45222,13 +44884,12 @@ func (c *NetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.listNetworkEndpoints" call. +// Do executes the "compute.networkEndpointGroups.attachNetworkEndpoints" call. // Any non-2xx status code is an error. Response headers are in either -// *NetworkEndpointGroupsListNetworkEndpoints.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, error) { +// *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 *NetworkEndpointGroupsAttachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45247,7 +44908,7 @@ func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkEndpointGroupsListNetworkEndpoints{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45260,107 +44921,98 @@ func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.Cal return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type NetworkEndpointGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkEndpointGroupsDeleteCall struct { + s *Service + project string + zone string + networkEndpointGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// Delete: Deletes the specified network endpoint group. The network endpoints +// in the NEG and the VM instances they belong to are not terminated when the +// NEG is deleted. Note that the NEG cannot be deleted if there are backend +// services referencing it. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *NetworkEndpointGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkEndpointGroupsTestIamPermissionsCall { - c := &NetworkEndpointGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - networkEndpointGroup: The name of the network endpoint group to delete. It +// should comply with RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the network endpoint group is located. It +// should comply with RFC1035. +func (r *NetworkEndpointGroupsService) Delete(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsDeleteCall { + c := &NetworkEndpointGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.networkEndpointGroup = networkEndpointGroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkEndpointGroupsDeleteCall) RequestId(requestId string) *NetworkEndpointGroupsDeleteCall { + 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 // details. -func (c *NetworkEndpointGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsTestIamPermissionsCall { +func (c *NetworkEndpointGroupsDeleteCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkEndpointGroupsTestIamPermissionsCall) Context(ctx context.Context) *NetworkEndpointGroupsTestIamPermissionsCall { +func (c *NetworkEndpointGroupsDeleteCall) Context(ctx context.Context) *NetworkEndpointGroupsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkEndpointGroupsTestIamPermissionsCall) Header() http.Header { +func (c *NetworkEndpointGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkEndpointGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *NetworkEndpointGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkEndpointGroups.testIamPermissions" call. +// Do executes the "compute.networkEndpointGroups.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworkEndpointGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *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 *NetworkEndpointGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45379,7 +45031,7 @@ func (c *NetworkEndpointGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45392,34 +45044,31 @@ func (c *NetworkEndpointGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallO return ret, nil } -type NetworkFirewallPoliciesAddAssociationCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyassociation *FirewallPolicyAssociation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkEndpointGroupsDetachNetworkEndpointsCall struct { + s *Service + project string + zone string + networkEndpointGroup string + networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddAssociation: Inserts an association for the specified firewall policy. +// DetachNetworkEndpoints: Detach a list of network endpoints from the +// specified network endpoint group. // -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) AddAssociation(project string, firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *NetworkFirewallPoliciesAddAssociationCall { - c := &NetworkFirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - networkEndpointGroup: The name of the network endpoint group where you are +// removing network endpoints. It should comply with RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the network endpoint group is located. It +// should comply with RFC1035. +func (r *NetworkEndpointGroupsService) DetachNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupsdetachendpointsrequest *NetworkEndpointGroupsDetachEndpointsRequest) *NetworkEndpointGroupsDetachNetworkEndpointsCall { + c := &NetworkEndpointGroupsDetachNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyassociation = firewallpolicyassociation - return c -} - -// ReplaceExistingAssociation sets the optional parameter -// "replaceExistingAssociation": Indicates whether or not to replace it if an -// association of the attachment already exists. This is false by default, in -// which case an error will be returned if an association already exists. -func (c *NetworkFirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *NetworkFirewallPoliciesAddAssociationCall { - c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + c.networkendpointgroupsdetachendpointsrequest = networkendpointgroupsdetachendpointsrequest return c } @@ -45433,7 +45082,7 @@ func (c *NetworkFirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(r // 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 *NetworkFirewallPoliciesAddAssociationCall) RequestId(requestId string) *NetworkFirewallPoliciesAddAssociationCall { +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) RequestId(requestId string) *NetworkEndpointGroupsDetachNetworkEndpointsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -45441,36 +45090,36 @@ func (c *NetworkFirewallPoliciesAddAssociationCall) RequestId(requestId string) // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkFirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAddAssociationCall { +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsDetachNetworkEndpointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesAddAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesAddAssociationCall { +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsDetachNetworkEndpointsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesAddAssociationCall) Header() http.Header { +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyassociation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroupsdetachendpointsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/addAssociation") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/detachNetworkEndpoints") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -45478,18 +45127,19 @@ func (c *NetworkFirewallPoliciesAddAssociationCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.addAssociation" call. +// Do executes the "compute.networkEndpointGroups.detachNetworkEndpoints" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkEndpointGroupsDetachNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45521,111 +45171,93 @@ func (c *NetworkFirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOpt return ret, nil } -type NetworkFirewallPoliciesAddRuleCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkEndpointGroupsGetCall struct { + s *Service + project string + zone string + networkEndpointGroup string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// AddRule: Inserts a rule into a firewall policy. +// Get: Returns the specified network endpoint group. // -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) AddRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesAddRuleCall { - c := &NetworkFirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - networkEndpointGroup: The name of the network endpoint group. It should +// comply with RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the network endpoint group is located. It +// should comply with RFC1035. +func (r *NetworkEndpointGroupsService) Get(project string, zone string, networkEndpointGroup string) *NetworkEndpointGroupsGetCall { + c := &NetworkEndpointGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// MaxPriority sets the optional parameter "maxPriority": When rule.priority is -// not specified, auto choose a unused priority between minPriority and -// maxPriority>. This field is exclusive with rule.priority. -func (c *NetworkFirewallPoliciesAddRuleCall) MaxPriority(maxPriority int64) *NetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("maxPriority", fmt.Sprint(maxPriority)) - return c -} - -// MinPriority sets the optional parameter "minPriority": When rule.priority is -// not specified, auto choose a unused priority between minPriority and -// maxPriority>. This field is exclusive with rule.priority. -func (c *NetworkFirewallPoliciesAddRuleCall) MinPriority(minPriority int64) *NetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("minPriority", fmt.Sprint(minPriority)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkFirewallPoliciesAddRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesAddRuleCall { - c.urlParams_.Set("requestId", requestId) + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkFirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAddRuleCall { +func (c *NetworkEndpointGroupsGetCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworkEndpointGroupsGetCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesAddRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesAddRuleCall { +func (c *NetworkEndpointGroupsGetCall) Context(ctx context.Context) *NetworkEndpointGroupsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesAddRuleCall) Header() http.Header { +func (c *NetworkEndpointGroupsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyrule) - if err != nil { - return nil, err +func (c *NetworkEndpointGroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/addRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}") 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.addRule" call. +// Do executes the "compute.networkEndpointGroups.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *NetworkEndpointGroup.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *NetworkEndpointGroupsGetCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroup, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45644,7 +45276,7 @@ func (c *NetworkFirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NetworkEndpointGroup{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45657,23 +45289,27 @@ func (c *NetworkFirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type NetworkFirewallPoliciesCloneRulesCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkEndpointGroupsInsertCall struct { + s *Service + project string + zone string + networkendpointgroup *NetworkEndpointGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// CloneRules: Copies rules to the specified firewall policy. +// Insert: Creates a network endpoint group in the specified project using the +// parameters that are included in the request. // -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) CloneRules(project string, firewallPolicy string) *NetworkFirewallPoliciesCloneRulesCall { - c := &NetworkFirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: The name of the zone where you want to create the network endpoint +// group. It should comply with RFC1035. +func (r *NetworkEndpointGroupsService) Insert(project string, zone string, networkendpointgroup *NetworkEndpointGroup) *NetworkEndpointGroupsInsertCall { + c := &NetworkEndpointGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewallPolicy = firewallPolicy + c.zone = zone + c.networkendpointgroup = networkendpointgroup return c } @@ -45687,47 +45323,44 @@ func (r *NetworkFirewallPoliciesService) CloneRules(project string, firewallPoli // 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 *NetworkFirewallPoliciesCloneRulesCall) RequestId(requestId string) *NetworkFirewallPoliciesCloneRulesCall { +func (c *NetworkEndpointGroupsInsertCall) RequestId(requestId string) *NetworkEndpointGroupsInsertCall { c.urlParams_.Set("requestId", requestId) return c } -// SourceFirewallPolicy sets the optional parameter "sourceFirewallPolicy": The -// firewall policy from which to copy rules. -func (c *NetworkFirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *NetworkFirewallPoliciesCloneRulesCall { - c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkFirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesCloneRulesCall { +func (c *NetworkEndpointGroupsInsertCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesCloneRulesCall) Context(ctx context.Context) *NetworkFirewallPoliciesCloneRulesCall { +func (c *NetworkEndpointGroupsInsertCall) Context(ctx context.Context) *NetworkEndpointGroupsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesCloneRulesCall) Header() http.Header { +func (c *NetworkEndpointGroupsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *NetworkEndpointGroupsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroup) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/cloneRules") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -45735,18 +45368,18 @@ func (c *NetworkFirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.cloneRules" call. +// Do executes the "compute.networkEndpointGroups.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesCloneRulesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkEndpointGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45778,89 +45411,167 @@ func (c *NetworkFirewallPoliciesCloneRulesCall) Do(opts ...googleapi.CallOption) return ret, nil } -type NetworkFirewallPoliciesDeleteCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkEndpointGroupsListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified policy. +// List: Retrieves the list of network endpoint groups that are located in the +// specified project and zone. // -// - firewallPolicy: Name of the firewall policy to delete. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Delete(project string, firewallPolicy string) *NetworkFirewallPoliciesDeleteCall { - c := &NetworkFirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - zone: The name of the zone where the network endpoint group is located. It +// should comply with RFC1035. +func (r *NetworkEndpointGroupsService) List(project string, zone string) *NetworkEndpointGroupsListCall { + c := &NetworkEndpointGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkFirewallPoliciesDeleteCall) RequestId(requestId string) *NetworkFirewallPoliciesDeleteCall { - 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 -// details. -func (c *NetworkFirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesDeleteCall) Context(ctx context.Context) *NetworkFirewallPoliciesDeleteCall { - c.ctx_ = ctx + c.zone = zone return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworkFirewallPoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *NetworkEndpointGroupsListCall) Filter(filter string) *NetworkEndpointGroupsListCall { + c.urlParams_.Set("filter", filter) + return c } -func (c *NetworkFirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *NetworkEndpointGroupsListCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *NetworkEndpointGroupsListCall) OrderBy(orderBy string) *NetworkEndpointGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *NetworkEndpointGroupsListCall) PageToken(pageToken string) *NetworkEndpointGroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *NetworkEndpointGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *NetworkEndpointGroupsListCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworkEndpointGroupsListCall) IfNoneMatch(entityTag string) *NetworkEndpointGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *NetworkEndpointGroupsListCall) Context(ctx context.Context) *NetworkEndpointGroupsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *NetworkEndpointGroupsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups") 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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.delete" call. +// Do executes the "compute.networkEndpointGroups.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *NetworkEndpointGroupList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsListCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45879,7 +45590,7 @@ func (c *NetworkFirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NetworkEndpointGroupList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -45892,86 +45603,320 @@ func (c *NetworkFirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type NetworkFirewallPoliciesGetCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *NetworkEndpointGroupsListCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Get: Returns the specified network firewall policy. +type NetworkEndpointGroupsListNetworkEndpointsCall struct { + s *Service + project string + zone string + networkEndpointGroup string + networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ListNetworkEndpoints: Lists the network endpoints in the specified network +// endpoint group. // -// - firewallPolicy: Name of the firewall policy to get. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Get(project string, firewallPolicy string) *NetworkFirewallPoliciesGetCall { - c := &NetworkFirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - networkEndpointGroup: The name of the network endpoint group from which +// you want to generate a list of included network endpoints. It should +// comply with RFC1035. +// - project: Project ID for this request. +// - zone: The name of the zone where the network endpoint group is located. It +// should comply with RFC1035. +func (r *NetworkEndpointGroupsService) ListNetworkEndpoints(project string, zone string, networkEndpointGroup string, networkendpointgroupslistendpointsrequest *NetworkEndpointGroupsListEndpointsRequest) *NetworkEndpointGroupsListNetworkEndpointsCall { + c := &NetworkEndpointGroupsListNetworkEndpointsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewallPolicy = firewallPolicy + c.zone = zone + c.networkEndpointGroup = networkEndpointGroup + c.networkendpointgroupslistendpointsrequest = networkendpointgroupslistendpointsrequest + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Filter(filter string) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) MaxResults(maxResults int64) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) OrderBy(orderBy string) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) PageToken(pageToken string) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkFirewallPoliciesGetCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetCall { +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsListNetworkEndpointsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NetworkFirewallPoliciesGetCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Context(ctx context.Context) *NetworkEndpointGroupsListNetworkEndpointsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networkendpointgroupslistendpointsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{networkEndpointGroup}/listNetworkEndpoints") + 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{ + "project": c.project, + "zone": c.zone, + "networkEndpointGroup": c.networkEndpointGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networkEndpointGroups.listNetworkEndpoints" call. +// Any non-2xx status code is an error. Response headers are in either +// *NetworkEndpointGroupsListNetworkEndpoints.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Do(opts ...googleapi.CallOption) (*NetworkEndpointGroupsListNetworkEndpoints, 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 := &NetworkEndpointGroupsListNetworkEndpoints{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *NetworkEndpointGroupsListNetworkEndpointsCall) Pages(ctx context.Context, f func(*NetworkEndpointGroupsListNetworkEndpoints) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type NetworkEndpointGroupsTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *NetworkEndpointGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkEndpointGroupsTestIamPermissionsCall { + c := &NetworkEndpointGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *NetworkEndpointGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkEndpointGroupsTestIamPermissionsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetCall { +func (c *NetworkEndpointGroupsTestIamPermissionsCall) Context(ctx context.Context) *NetworkEndpointGroupsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesGetCall) Header() http.Header { +func (c *NetworkEndpointGroupsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *NetworkEndpointGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/networkEndpointGroups/{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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.get" call. +// Do executes the "compute.networkEndpointGroups.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkEndpointGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -45990,7 +45935,7 @@ func (c *NetworkFirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*Fire if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicy{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46003,77 +45948,87 @@ func (c *NetworkFirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*Fire return ret, nil } -type NetworkFirewallPoliciesGetAssociationCall struct { - s *Service - project string - firewallPolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NetworkFirewallPoliciesAddAssociationCall struct { + s *Service + project string + firewallPolicy string + firewallpolicyassociation *FirewallPolicyAssociation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetAssociation: Gets an association with the specified name. +// AddAssociation: Inserts an association for the specified firewall policy. // -// - firewallPolicy: Name of the firewall policy to which the queried -// association belongs. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) GetAssociation(project string, firewallPolicy string) *NetworkFirewallPoliciesGetAssociationCall { - c := &NetworkFirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - firewallPolicy: Name of the firewall policy to update. +// - project: Project ID for this request. +func (r *NetworkFirewallPoliciesService) AddAssociation(project string, firewallPolicy string, firewallpolicyassociation *FirewallPolicyAssociation) *NetworkFirewallPoliciesAddAssociationCall { + c := &NetworkFirewallPoliciesAddAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.firewallPolicy = firewallPolicy + c.firewallpolicyassociation = firewallpolicyassociation return c } -// Name sets the optional parameter "name": The name of the association to get -// from the firewall policy. -func (c *NetworkFirewallPoliciesGetAssociationCall) Name(name string) *NetworkFirewallPoliciesGetAssociationCall { - c.urlParams_.Set("name", name) +// ReplaceExistingAssociation sets the optional parameter +// "replaceExistingAssociation": Indicates whether or not to replace it if an +// association of the attachment already exists. This is false by default, in +// which case an error will be returned if an association already exists. +func (c *NetworkFirewallPoliciesAddAssociationCall) ReplaceExistingAssociation(replaceExistingAssociation bool) *NetworkFirewallPoliciesAddAssociationCall { + c.urlParams_.Set("replaceExistingAssociation", fmt.Sprint(replaceExistingAssociation)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkFirewallPoliciesAddAssociationCall) RequestId(requestId string) *NetworkFirewallPoliciesAddAssociationCall { + 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 // details. -func (c *NetworkFirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetAssociationCall { +func (c *NetworkFirewallPoliciesAddAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAddAssociationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NetworkFirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetAssociationCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetAssociationCall { +func (c *NetworkFirewallPoliciesAddAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesAddAssociationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesGetAssociationCall) Header() http.Header { +func (c *NetworkFirewallPoliciesAddAssociationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *NetworkFirewallPoliciesAddAssociationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyassociation) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/getAssociation") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/addAssociation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -46085,13 +46040,12 @@ func (c *NetworkFirewallPoliciesGetAssociationCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.getAssociation" call. +// Do executes the "compute.networkFirewallPolicies.addAssociation" call. // Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyAssociation.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, error) { +// *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 *NetworkFirewallPoliciesAddAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46110,7 +46064,7 @@ func (c *NetworkFirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicyAssociation{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46123,94 +46077,111 @@ func (c *NetworkFirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOpt return ret, nil } -type NetworkFirewallPoliciesGetIamPolicyCall struct { - s *Service - project string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NetworkFirewallPoliciesAddRuleCall struct { + s *Service + project string + firewallPolicy string + firewallpolicyrule *FirewallPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// AddRule: Inserts a rule into a firewall policy. // +// - firewallPolicy: Name of the firewall policy to update. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkFirewallPoliciesService) GetIamPolicy(project string, resource string) *NetworkFirewallPoliciesGetIamPolicyCall { - c := &NetworkFirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkFirewallPoliciesService) AddRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesAddRuleCall { + c := &NetworkFirewallPoliciesAddRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource + c.firewallPolicy = firewallPolicy + c.firewallpolicyrule = firewallpolicyrule return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NetworkFirewallPoliciesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// MaxPriority sets the optional parameter "maxPriority": When rule.priority is +// not specified, auto choose a unused priority between minPriority and +// maxPriority>. This field is exclusive with rule.priority. +func (c *NetworkFirewallPoliciesAddRuleCall) MaxPriority(maxPriority int64) *NetworkFirewallPoliciesAddRuleCall { + c.urlParams_.Set("maxPriority", fmt.Sprint(maxPriority)) + return c +} + +// MinPriority sets the optional parameter "minPriority": When rule.priority is +// not specified, auto choose a unused priority between minPriority and +// maxPriority>. This field is exclusive with rule.priority. +func (c *NetworkFirewallPoliciesAddRuleCall) MinPriority(minPriority int64) *NetworkFirewallPoliciesAddRuleCall { + c.urlParams_.Set("minPriority", fmt.Sprint(minPriority)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkFirewallPoliciesAddRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesAddRuleCall { + 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 // details. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetIamPolicyCall { +func (c *NetworkFirewallPoliciesAddRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesAddRuleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetIamPolicyCall { +func (c *NetworkFirewallPoliciesAddRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesAddRuleCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesGetIamPolicyCall) Header() http.Header { +func (c *NetworkFirewallPoliciesAddRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *NetworkFirewallPoliciesAddRuleCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyrule) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/addRule") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.getIamPolicy" call. +// Do executes the "compute.networkFirewallPolicies.addRule" call. // 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 +// *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 *NetworkFirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *NetworkFirewallPoliciesAddRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46229,7 +46200,7 @@ func (c *NetworkFirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOptio 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, @@ -46242,77 +46213,79 @@ func (c *NetworkFirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOptio return ret, nil } -type NetworkFirewallPoliciesGetRuleCall struct { +type NetworkFirewallPoliciesCloneRulesCall struct { s *Service project string firewallPolicy string urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetRule: Gets a rule of the specified priority. +// CloneRules: Copies rules to the specified firewall policy. // -// - firewallPolicy: Name of the firewall policy to which the queried rule -// belongs. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) GetRule(project string, firewallPolicy string) *NetworkFirewallPoliciesGetRuleCall { - c := &NetworkFirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - firewallPolicy: Name of the firewall policy to update. +// - project: Project ID for this request. +func (r *NetworkFirewallPoliciesService) CloneRules(project string, firewallPolicy string) *NetworkFirewallPoliciesCloneRulesCall { + c := &NetworkFirewallPoliciesCloneRulesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.firewallPolicy = firewallPolicy return c } -// Priority sets the optional parameter "priority": The priority of the rule to -// get from the firewall policy. -func (c *NetworkFirewallPoliciesGetRuleCall) Priority(priority int64) *NetworkFirewallPoliciesGetRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkFirewallPoliciesCloneRulesCall) RequestId(requestId string) *NetworkFirewallPoliciesCloneRulesCall { + c.urlParams_.Set("requestId", requestId) + return c +} + +// SourceFirewallPolicy sets the optional parameter "sourceFirewallPolicy": The +// firewall policy from which to copy rules. +func (c *NetworkFirewallPoliciesCloneRulesCall) SourceFirewallPolicy(sourceFirewallPolicy string) *NetworkFirewallPoliciesCloneRulesCall { + c.urlParams_.Set("sourceFirewallPolicy", sourceFirewallPolicy) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkFirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetRuleCall { +func (c *NetworkFirewallPoliciesCloneRulesCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesCloneRulesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NetworkFirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetRuleCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesGetRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetRuleCall { +func (c *NetworkFirewallPoliciesCloneRulesCall) Context(ctx context.Context) *NetworkFirewallPoliciesCloneRulesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesGetRuleCall) Header() http.Header { +func (c *NetworkFirewallPoliciesCloneRulesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkFirewallPoliciesCloneRulesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/getRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/cloneRules") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -46324,13 +46297,12 @@ func (c *NetworkFirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.getRule" call. +// Do executes the "compute.networkFirewallPolicies.cloneRules" call. // Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyRule.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *NetworkFirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, error) { +// *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 *NetworkFirewallPoliciesCloneRulesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46349,7 +46321,7 @@ func (c *NetworkFirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicyRule{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46362,23 +46334,23 @@ func (c *NetworkFirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type NetworkFirewallPoliciesInsertCall struct { +type NetworkFirewallPoliciesDeleteCall struct { s *Service project string - firewallpolicy *FirewallPolicy + firewallPolicy string urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Insert: Creates a new policy in the specified project using the data -// included in the request. +// Delete: Deletes the specified policy. // +// - firewallPolicy: Name of the firewall policy to delete. // - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Insert(project string, firewallpolicy *FirewallPolicy) *NetworkFirewallPoliciesInsertCall { - c := &NetworkFirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkFirewallPoliciesService) Delete(project string, firewallPolicy string) *NetworkFirewallPoliciesDeleteCall { + c := &NetworkFirewallPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewallpolicy = firewallpolicy + c.firewallPolicy = firewallPolicy return c } @@ -46392,7 +46364,7 @@ func (r *NetworkFirewallPoliciesService) Insert(project string, firewallpolicy * // 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 *NetworkFirewallPoliciesInsertCall) RequestId(requestId string) *NetworkFirewallPoliciesInsertCall { +func (c *NetworkFirewallPoliciesDeleteCall) RequestId(requestId string) *NetworkFirewallPoliciesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -46400,54 +46372,51 @@ func (c *NetworkFirewallPoliciesInsertCall) RequestId(requestId string) *Network // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkFirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesInsertCall { +func (c *NetworkFirewallPoliciesDeleteCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesInsertCall) Context(ctx context.Context) *NetworkFirewallPoliciesInsertCall { +func (c *NetworkFirewallPoliciesDeleteCall) Context(ctx context.Context) *NetworkFirewallPoliciesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesInsertCall) Header() http.Header { +func (c *NetworkFirewallPoliciesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *NetworkFirewallPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicy) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") 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{ - "project": c.project, + "project": c.project, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.insert" call. +// Do executes the "compute.networkFirewallPolicies.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkFirewallPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46479,107 +46448,31 @@ func (c *NetworkFirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type NetworkFirewallPoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NetworkFirewallPoliciesGetCall struct { + s *Service + project string + firewallPolicy string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// List: Lists all the policies that have been configured for the specified -// project. +// Get: Returns the specified network firewall policy. // +// - firewallPolicy: Name of the firewall policy to get. // - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) List(project string) *NetworkFirewallPoliciesListCall { - c := &NetworkFirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkFirewallPoliciesService) Get(project string, firewallPolicy string) *NetworkFirewallPoliciesGetCall { + c := &NetworkFirewallPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *NetworkFirewallPoliciesListCall) Filter(filter string) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NetworkFirewallPoliciesListCall) MaxResults(maxResults int64) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *NetworkFirewallPoliciesListCall) OrderBy(orderBy string) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *NetworkFirewallPoliciesListCall) PageToken(pageToken string) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *NetworkFirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkFirewallPoliciesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.firewallPolicy = firewallPolicy return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkFirewallPoliciesListCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesListCall { +func (c *NetworkFirewallPoliciesGetCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -46587,27 +46480,27 @@ func (c *NetworkFirewallPoliciesListCall) Fields(s ...googleapi.Field) *NetworkF // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NetworkFirewallPoliciesListCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesListCall { +func (c *NetworkFirewallPoliciesGetCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesListCall) Context(ctx context.Context) *NetworkFirewallPoliciesListCall { +func (c *NetworkFirewallPoliciesGetCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesListCall) Header() http.Header { +func (c *NetworkFirewallPoliciesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkFirewallPoliciesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -46615,7 +46508,7 @@ func (c *NetworkFirewallPoliciesListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -46623,18 +46516,18 @@ func (c *NetworkFirewallPoliciesListCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.list" call. +// Do executes the "compute.networkFirewallPolicies.get" call. // Any non-2xx status code is an error. Response headers are in either -// *FirewallPolicyList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *NetworkFirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, error) { +// *FirewallPolicy.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *NetworkFirewallPoliciesGetCall) Do(opts ...googleapi.CallOption) (*FirewallPolicy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46653,7 +46546,7 @@ func (c *NetworkFirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*Fir if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FirewallPolicyList{ + ret := &FirewallPolicy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46666,99 +46559,77 @@ func (c *NetworkFirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*Fir return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NetworkFirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type NetworkFirewallPoliciesPatchCall struct { +type NetworkFirewallPoliciesGetAssociationCall struct { s *Service project string firewallPolicy string - firewallpolicy *FirewallPolicy urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Patch: Patches the specified policy with the data included in the request. +// GetAssociation: Gets an association with the specified name. // -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) Patch(project string, firewallPolicy string, firewallpolicy *FirewallPolicy) *NetworkFirewallPoliciesPatchCall { - c := &NetworkFirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - firewallPolicy: Name of the firewall policy to which the queried +// association belongs. +// - project: Project ID for this request. +func (r *NetworkFirewallPoliciesService) GetAssociation(project string, firewallPolicy string) *NetworkFirewallPoliciesGetAssociationCall { + c := &NetworkFirewallPoliciesGetAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.firewallPolicy = firewallPolicy - c.firewallpolicy = firewallpolicy return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkFirewallPoliciesPatchCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchCall { - c.urlParams_.Set("requestId", requestId) +// Name sets the optional parameter "name": The name of the association to get +// from the firewall policy. +func (c *NetworkFirewallPoliciesGetAssociationCall) Name(name string) *NetworkFirewallPoliciesGetAssociationCall { + c.urlParams_.Set("name", name) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkFirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchCall { +func (c *NetworkFirewallPoliciesGetAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetAssociationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworkFirewallPoliciesGetAssociationCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetAssociationCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesPatchCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchCall { +func (c *NetworkFirewallPoliciesGetAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetAssociationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesPatchCall) Header() http.Header { +func (c *NetworkFirewallPoliciesGetAssociationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicy) - if err != nil { - return nil, err +func (c *NetworkFirewallPoliciesGetAssociationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/getAssociation") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -46770,12 +46641,13 @@ func (c *NetworkFirewallPoliciesPatchCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.patch" call. +// Do executes the "compute.networkFirewallPolicies.getAssociation" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *FirewallPolicyAssociation.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkFirewallPoliciesGetAssociationCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyAssociation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46794,7 +46666,7 @@ func (c *NetworkFirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FirewallPolicyAssociation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -46807,102 +46679,94 @@ func (c *NetworkFirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Op return ret, nil } -type NetworkFirewallPoliciesPatchRuleCall struct { - s *Service - project string - firewallPolicy string - firewallpolicyrule *FirewallPolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkFirewallPoliciesGetIamPolicyCall struct { + s *Service + project string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PatchRule: Patches a rule of the specified priority. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. // -// - firewallPolicy: Name of the firewall policy to update. // - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) PatchRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesPatchRuleCall { - c := &NetworkFirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *NetworkFirewallPoliciesService) GetIamPolicy(project string, resource string) *NetworkFirewallPoliciesGetIamPolicyCall { + c := &NetworkFirewallPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewallPolicy = firewallPolicy - c.firewallpolicyrule = firewallpolicyrule - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// patch. -func (c *NetworkFirewallPoliciesPatchRuleCall) Priority(priority int64) *NetworkFirewallPoliciesPatchRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) + c.resource = resource return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkFirewallPoliciesPatchRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchRuleCall { - c.urlParams_.Set("requestId", requestId) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *NetworkFirewallPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NetworkFirewallPoliciesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 // details. -func (c *NetworkFirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchRuleCall { +func (c *NetworkFirewallPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworkFirewallPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesPatchRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchRuleCall { +func (c *NetworkFirewallPoliciesGetIamPolicyCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesPatchRuleCall) Header() http.Header { +func (c *NetworkFirewallPoliciesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyrule) - if err != nil { - return nil, err +func (c *NetworkFirewallPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{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{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.patchRule" call. +// Do executes the "compute.networkFirewallPolicies.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *NetworkFirewallPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkFirewallPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -46921,7 +46785,7 @@ func (c *NetworkFirewallPoliciesPatchRuleCall) 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, @@ -46934,79 +46798,77 @@ func (c *NetworkFirewallPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) return ret, nil } -type NetworkFirewallPoliciesRemoveAssociationCall struct { +type NetworkFirewallPoliciesGetRuleCall struct { s *Service project string firewallPolicy string urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// RemoveAssociation: Removes an association for the specified firewall policy. +// GetRule: Gets a rule of the specified priority. // -// - firewallPolicy: Name of the firewall policy to update. -// - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) RemoveAssociation(project string, firewallPolicy string) *NetworkFirewallPoliciesRemoveAssociationCall { - c := &NetworkFirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - firewallPolicy: Name of the firewall policy to which the queried rule +// belongs. +// - project: Project ID for this request. +func (r *NetworkFirewallPoliciesService) GetRule(project string, firewallPolicy string) *NetworkFirewallPoliciesGetRuleCall { + c := &NetworkFirewallPoliciesGetRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.firewallPolicy = firewallPolicy return c } -// Name sets the optional parameter "name": Name for the attachment that will -// be removed. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Name(name string) *NetworkFirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("name", name) - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkFirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *NetworkFirewallPoliciesRemoveAssociationCall { - c.urlParams_.Set("requestId", requestId) +// Priority sets the optional parameter "priority": The priority of the rule to +// get from the firewall policy. +func (c *NetworkFirewallPoliciesGetRuleCall) Priority(priority int64) *NetworkFirewallPoliciesGetRuleCall { + c.urlParams_.Set("priority", fmt.Sprint(priority)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesRemoveAssociationCall { +func (c *NetworkFirewallPoliciesGetRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesGetRuleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworkFirewallPoliciesGetRuleCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesGetRuleCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesRemoveAssociationCall { +func (c *NetworkFirewallPoliciesGetRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesGetRuleCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Header() http.Header { +func (c *NetworkFirewallPoliciesGetRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkFirewallPoliciesGetRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeAssociation") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/getRule") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -47018,12 +46880,13 @@ func (c *NetworkFirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*h return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.removeAssociation" call. +// Do executes the "compute.networkFirewallPolicies.getRule" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *FirewallPolicyRule.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *NetworkFirewallPoliciesGetRuleCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyRule, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47042,7 +46905,7 @@ func (c *NetworkFirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &FirewallPolicyRule{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47055,30 +46918,23 @@ func (c *NetworkFirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.Call return ret, nil } -type NetworkFirewallPoliciesRemoveRuleCall struct { +type NetworkFirewallPoliciesInsertCall struct { s *Service project string - firewallPolicy string + firewallpolicy *FirewallPolicy urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// RemoveRule: Deletes a rule of the specified priority. +// Insert: Creates a new policy in the specified project using the data +// included in the request. // -// - firewallPolicy: Name of the firewall policy to update. // - project: Project ID for this request. -func (r *NetworkFirewallPoliciesService) RemoveRule(project string, firewallPolicy string) *NetworkFirewallPoliciesRemoveRuleCall { - c := &NetworkFirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkFirewallPoliciesService) Insert(project string, firewallpolicy *FirewallPolicy) *NetworkFirewallPoliciesInsertCall { + c := &NetworkFirewallPoliciesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.firewallPolicy = firewallPolicy - return c -} - -// Priority sets the optional parameter "priority": The priority of the rule to -// remove from the firewall policy. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Priority(priority int64) *NetworkFirewallPoliciesRemoveRuleCall { - c.urlParams_.Set("priority", fmt.Sprint(priority)) + c.firewallpolicy = firewallpolicy return c } @@ -47092,7 +46948,7 @@ func (c *NetworkFirewallPoliciesRemoveRuleCall) Priority(priority int64) *Networ // 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 *NetworkFirewallPoliciesRemoveRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesRemoveRuleCall { +func (c *NetworkFirewallPoliciesInsertCall) RequestId(requestId string) *NetworkFirewallPoliciesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -47100,32 +46956,36 @@ func (c *NetworkFirewallPoliciesRemoveRuleCall) RequestId(requestId string) *Net // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesRemoveRuleCall { +func (c *NetworkFirewallPoliciesInsertCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesRemoveRuleCall { +func (c *NetworkFirewallPoliciesInsertCall) Context(ctx context.Context) *NetworkFirewallPoliciesInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Header() http.Header { +func (c *NetworkFirewallPoliciesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } - -func (c *NetworkFirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + +func (c *NetworkFirewallPoliciesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicy) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeRule") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -47133,18 +46993,17 @@ func (c *NetworkFirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "firewallPolicy": c.firewallPolicy, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.removeRule" call. +// Do executes the "compute.networkFirewallPolicies.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkFirewallPoliciesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47176,81 +47035,162 @@ func (c *NetworkFirewallPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) return ret, nil } -type NetworkFirewallPoliciesSetIamPolicyCall struct { - s *Service - project string - resource string - globalsetpolicyrequest *GlobalSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkFirewallPoliciesListCall struct { + s *Service + project 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. +// List: Lists all the policies that have been configured for the specified +// project. // // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkFirewallPoliciesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *NetworkFirewallPoliciesSetIamPolicyCall { - c := &NetworkFirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkFirewallPoliciesService) List(project string) *NetworkFirewallPoliciesListCall { + c := &NetworkFirewallPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.globalsetpolicyrequest = globalsetpolicyrequest + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *NetworkFirewallPoliciesListCall) Filter(filter string) *NetworkFirewallPoliciesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *NetworkFirewallPoliciesListCall) MaxResults(maxResults int64) *NetworkFirewallPoliciesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *NetworkFirewallPoliciesListCall) OrderBy(orderBy string) *NetworkFirewallPoliciesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *NetworkFirewallPoliciesListCall) PageToken(pageToken string) *NetworkFirewallPoliciesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *NetworkFirewallPoliciesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkFirewallPoliciesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworkFirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesSetIamPolicyCall { +func (c *NetworkFirewallPoliciesListCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworkFirewallPoliciesListCall) IfNoneMatch(entityTag string) *NetworkFirewallPoliciesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *NetworkFirewallPoliciesSetIamPolicyCall { +func (c *NetworkFirewallPoliciesListCall) Context(ctx context.Context) *NetworkFirewallPoliciesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesSetIamPolicyCall) Header() http.Header { +func (c *NetworkFirewallPoliciesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) - if err != nil { - return nil, err +func (c *NetworkFirewallPoliciesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.setIamPolicy" call. +// Do executes the "compute.networkFirewallPolicies.list" call. // 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 *NetworkFirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *FirewallPolicyList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *NetworkFirewallPoliciesListCall) Do(opts ...googleapi.CallOption) (*FirewallPolicyList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47269,7 +47209,7 @@ func (c *NetworkFirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &FirewallPolicyList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47282,82 +47222,116 @@ func (c *NetworkFirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOptio return ret, nil } -type NetworkFirewallPoliciesTestIamPermissionsCall struct { - s *Service - project string - resource string - testpermissionsrequest *TestPermissionsRequest - 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 *NetworkFirewallPoliciesListCall) Pages(ctx context.Context, f func(*FirewallPolicyList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +type NetworkFirewallPoliciesPatchCall struct { + s *Service + project string + firewallPolicy string + firewallpolicy *FirewallPolicy + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified policy with the data included in the request. // +// - firewallPolicy: Name of the firewall policy to update. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -func (r *NetworkFirewallPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkFirewallPoliciesTestIamPermissionsCall { - c := &NetworkFirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkFirewallPoliciesService) Patch(project string, firewallPolicy string, firewallpolicy *FirewallPolicy) *NetworkFirewallPoliciesPatchCall { + c := &NetworkFirewallPoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.firewallPolicy = firewallPolicy + c.firewallpolicy = firewallpolicy + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkFirewallPoliciesPatchCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchCall { + 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 // details. -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesTestIamPermissionsCall { +func (c *NetworkFirewallPoliciesPatchCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *NetworkFirewallPoliciesTestIamPermissionsCall { +func (c *NetworkFirewallPoliciesPatchCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Header() http.Header { +func (c *NetworkFirewallPoliciesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkFirewallPoliciesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicy) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}") 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{ - "project": c.project, - "resource": c.resource, + "project": c.project, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networkFirewallPolicies.testIamPermissions" call. +// Do executes the "compute.networkFirewallPolicies.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *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 *NetworkFirewallPoliciesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47376,7 +47350,7 @@ func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47389,25 +47363,32 @@ func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.Cal return ret, nil } -type NetworksAddPeeringCall struct { - s *Service - project string - network string - networksaddpeeringrequest *NetworksAddPeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkFirewallPoliciesPatchRuleCall struct { + s *Service + project string + firewallPolicy string + firewallpolicyrule *FirewallPolicyRule + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AddPeering: Adds a peering to the specified network. +// PatchRule: Patches a rule of the specified priority. // -// - network: Name of the network resource to add peering to. +// - firewallPolicy: Name of the firewall policy to update. // - project: Project ID for this request. -func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { - c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkFirewallPoliciesService) PatchRule(project string, firewallPolicy string, firewallpolicyrule *FirewallPolicyRule) *NetworkFirewallPoliciesPatchRuleCall { + c := &NetworkFirewallPoliciesPatchRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.network = network - c.networksaddpeeringrequest = networksaddpeeringrequest + c.firewallPolicy = firewallPolicy + c.firewallpolicyrule = firewallpolicyrule + return c +} + +// Priority sets the optional parameter "priority": The priority of the rule to +// patch. +func (c *NetworkFirewallPoliciesPatchRuleCall) Priority(priority int64) *NetworkFirewallPoliciesPatchRuleCall { + c.urlParams_.Set("priority", fmt.Sprint(priority)) return c } @@ -47421,7 +47402,7 @@ func (r *NetworksService) AddPeering(project string, network string, networksadd // 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 *NetworksAddPeeringCall) RequestId(requestId string) *NetworksAddPeeringCall { +func (c *NetworkFirewallPoliciesPatchRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesPatchRuleCall { c.urlParams_.Set("requestId", requestId) return c } @@ -47429,36 +47410,36 @@ func (c *NetworksAddPeeringCall) RequestId(requestId string) *NetworksAddPeering // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworksAddPeeringCall) Fields(s ...googleapi.Field) *NetworksAddPeeringCall { +func (c *NetworkFirewallPoliciesPatchRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesPatchRuleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworksAddPeeringCall) Context(ctx context.Context) *NetworksAddPeeringCall { +func (c *NetworkFirewallPoliciesPatchRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesPatchRuleCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworksAddPeeringCall) Header() http.Header { +func (c *NetworkFirewallPoliciesPatchRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkFirewallPoliciesPatchRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksaddpeeringrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.firewallpolicyrule) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/addPeering") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/patchRule") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -47466,18 +47447,18 @@ func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "network": c.network, + "project": c.project, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.addPeering" call. +// Do executes the "compute.networkFirewallPolicies.patchRule" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkFirewallPoliciesPatchRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47509,23 +47490,30 @@ func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, e return ret, nil } -type NetworksDeleteCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkFirewallPoliciesRemoveAssociationCall struct { + s *Service + project string + firewallPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified network. +// RemoveAssociation: Removes an association for the specified firewall policy. // -// - network: Name of the network to delete. +// - firewallPolicy: Name of the firewall policy to update. // - project: Project ID for this request. -func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { - c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkFirewallPoliciesService) RemoveAssociation(project string, firewallPolicy string) *NetworkFirewallPoliciesRemoveAssociationCall { + c := &NetworkFirewallPoliciesRemoveAssociationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.network = network + c.firewallPolicy = firewallPolicy + return c +} + +// Name sets the optional parameter "name": Name for the attachment that will +// be removed. +func (c *NetworkFirewallPoliciesRemoveAssociationCall) Name(name string) *NetworkFirewallPoliciesRemoveAssociationCall { + c.urlParams_.Set("name", name) return c } @@ -47539,7 +47527,7 @@ func (r *NetworksService) Delete(project string, network string) *NetworksDelete // 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 *NetworksDeleteCall) RequestId(requestId string) *NetworksDeleteCall { +func (c *NetworkFirewallPoliciesRemoveAssociationCall) RequestId(requestId string) *NetworkFirewallPoliciesRemoveAssociationCall { c.urlParams_.Set("requestId", requestId) return c } @@ -47547,51 +47535,51 @@ func (c *NetworksDeleteCall) RequestId(requestId string) *NetworksDeleteCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall { +func (c *NetworkFirewallPoliciesRemoveAssociationCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesRemoveAssociationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall { +func (c *NetworkFirewallPoliciesRemoveAssociationCall) Context(ctx context.Context) *NetworkFirewallPoliciesRemoveAssociationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworksDeleteCall) Header() http.Header { +func (c *NetworkFirewallPoliciesRemoveAssociationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkFirewallPoliciesRemoveAssociationCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeAssociation") 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{ - "project": c.project, - "network": c.network, + "project": c.project, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.delete" call. +// Do executes the "compute.networkFirewallPolicies.removeAssociation" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworkFirewallPoliciesRemoveAssociationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47623,86 +47611,96 @@ func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error return ret, nil } -type NetworksGetCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NetworkFirewallPoliciesRemoveRuleCall struct { + s *Service + project string + firewallPolicy string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified network. +// RemoveRule: Deletes a rule of the specified priority. // -// - network: Name of the network to return. +// - firewallPolicy: Name of the firewall policy to update. // - project: Project ID for this request. -func (r *NetworksService) Get(project string, network string) *NetworksGetCall { - c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkFirewallPoliciesService) RemoveRule(project string, firewallPolicy string) *NetworkFirewallPoliciesRemoveRuleCall { + c := &NetworkFirewallPoliciesRemoveRuleCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.network = network + c.firewallPolicy = firewallPolicy + return c +} + +// Priority sets the optional parameter "priority": The priority of the rule to +// remove from the firewall policy. +func (c *NetworkFirewallPoliciesRemoveRuleCall) Priority(priority int64) *NetworkFirewallPoliciesRemoveRuleCall { + c.urlParams_.Set("priority", fmt.Sprint(priority)) + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworkFirewallPoliciesRemoveRuleCall) RequestId(requestId string) *NetworkFirewallPoliciesRemoveRuleCall { + 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 // details. -func (c *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall { +func (c *NetworkFirewallPoliciesRemoveRuleCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesRemoveRuleCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NetworksGetCall) IfNoneMatch(entityTag string) *NetworksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall { +func (c *NetworkFirewallPoliciesRemoveRuleCall) Context(ctx context.Context) *NetworkFirewallPoliciesRemoveRuleCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworksGetCall) Header() http.Header { +func (c *NetworkFirewallPoliciesRemoveRuleCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkFirewallPoliciesRemoveRuleCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{firewallPolicy}/removeRule") 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{ - "project": c.project, - "network": c.network, + "project": c.project, + "firewallPolicy": c.firewallPolicy, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.get" call. +// Do executes the "compute.networkFirewallPolicies.removeRule" call. // Any non-2xx status code is an error. Response headers are in either -// *Network.ServerResponse.Header or (if a response was returned at all) in +// *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 *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { +func (c *NetworkFirewallPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47721,7 +47719,7 @@ func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Network{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47734,87 +47732,81 @@ func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { return ret, nil } -type NetworksGetEffectiveFirewallsCall struct { - s *Service - project string - network string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NetworkFirewallPoliciesSetIamPolicyCall struct { + s *Service + project string + resource string + globalsetpolicyrequest *GlobalSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetEffectiveFirewalls: Returns the effective firewalls on a given network. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. // -// - network: Name of the network for this request. // - project: Project ID for this request. -func (r *NetworksService) GetEffectiveFirewalls(project string, network string) *NetworksGetEffectiveFirewallsCall { - c := &NetworksGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *NetworkFirewallPoliciesService) SetIamPolicy(project string, resource string, globalsetpolicyrequest *GlobalSetPolicyRequest) *NetworkFirewallPoliciesSetIamPolicyCall { + c := &NetworkFirewallPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.network = network + c.resource = resource + c.globalsetpolicyrequest = globalsetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworksGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *NetworksGetEffectiveFirewallsCall { +func (c *NetworkFirewallPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NetworksGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *NetworksGetEffectiveFirewallsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *NetworksGetEffectiveFirewallsCall) Context(ctx context.Context) *NetworksGetEffectiveFirewallsCall { +func (c *NetworkFirewallPoliciesSetIamPolicyCall) Context(ctx context.Context) *NetworkFirewallPoliciesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworksGetEffectiveFirewallsCall) Header() http.Header { +func (c *NetworkFirewallPoliciesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *NetworkFirewallPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.globalsetpolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/getEffectiveFirewalls") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{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{ - "project": c.project, - "network": c.network, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.getEffectiveFirewalls" call. +// Do executes the "compute.networkFirewallPolicies.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *NetworksGetEffectiveFirewallsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NetworksGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*NetworksGetEffectiveFirewallsResponse, error) { +// *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 *NetworkFirewallPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47833,7 +47825,7 @@ func (c *NetworksGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*N if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworksGetEffectiveFirewallsResponse{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47846,74 +47838,62 @@ func (c *NetworksGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*N return ret, nil } -type NetworksInsertCall struct { - s *Service - project string - network *Network - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworkFirewallPoliciesTestIamPermissionsCall struct { + s *Service + project string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a network in the specified project using the data included -// in the request. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // // - project: Project ID for this request. -func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { - c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *NetworkFirewallPoliciesService) TestIamPermissions(project string, resource string, testpermissionsrequest *TestPermissionsRequest) *NetworkFirewallPoliciesTestIamPermissionsCall { + c := &NetworkFirewallPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.network = network - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworksInsertCall) RequestId(requestId string) *NetworksInsertCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall { +func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *NetworkFirewallPoliciesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall { +func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Context(ctx context.Context) *NetworkFirewallPoliciesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworksInsertCall) Header() http.Header { +func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkFirewallPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.network) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/firewallPolicies/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -47921,17 +47901,19 @@ func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.insert" call. +// Do executes the "compute.networkFirewallPolicies.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworkFirewallPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -47950,7 +47932,7 @@ func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -47963,106 +47945,31 @@ func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error return ret, nil } -type NetworksListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NetworkProfilesGetCall struct { + s *Service + project string + networkProfile string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of networks available to the specified project. +// Get: Returns the specified network profile. // +// - networkProfile: Name of the network profile to return. // - project: Project ID for this request. -func (r *NetworksService) List(project string) *NetworksListCall { - c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkProfilesService) Get(project string, networkProfile string) *NetworkProfilesGetCall { + c := &NetworkProfilesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *NetworksListCall) Filter(filter string) *NetworksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *NetworksListCall) OrderBy(orderBy string) *NetworksListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *NetworksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.networkProfile = networkProfile return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall { +func (c *NetworkProfilesGetCall) Fields(s ...googleapi.Field) *NetworkProfilesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -48070,27 +47977,27 @@ func (c *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NetworksListCall) IfNoneMatch(entityTag string) *NetworksListCall { +func (c *NetworkProfilesGetCall) IfNoneMatch(entityTag string) *NetworkProfilesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NetworksListCall) Context(ctx context.Context) *NetworksListCall { +func (c *NetworkProfilesGetCall) Context(ctx context.Context) *NetworkProfilesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworksListCall) Header() http.Header { +func (c *NetworkProfilesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkProfilesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -48098,7 +48005,7 @@ func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkProfiles/{networkProfile}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -48106,17 +48013,18 @@ func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "networkProfile": c.networkProfile, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.list" call. +// Do executes the "compute.networkProfiles.get" call. // Any non-2xx status code is an error. Response headers are in either -// *NetworkList.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *NetworkProfile.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error) { +func (c *NetworkProfilesGetCall) Do(opts ...googleapi.CallOption) (*NetworkProfile, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48135,7 +48043,7 @@ func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NetworkList{ + ret := &NetworkProfile{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -48148,58 +48056,22 @@ func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NetworksListCall) Pages(ctx context.Context, f func(*NetworkList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type NetworksListPeeringRoutesCall struct { +type NetworkProfilesListCall struct { s *Service project string - network string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// ListPeeringRoutes: Lists the peering routes exchanged over peering -// connection. +// List: Retrieves a list of network profiles available to the specified +// project. // -// - network: Name of the network for this request. // - project: Project ID for this request. -func (r *NetworksService) ListPeeringRoutes(project string, network string) *NetworksListPeeringRoutesCall { - c := &NetworksListPeeringRoutesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworkProfilesService) List(project string) *NetworkProfilesListCall { + c := &NetworkProfilesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.network = network - return c -} - -// Direction sets the optional parameter "direction": The direction of the -// exchanged routes. -// -// Possible values: -// -// "INCOMING" - For routes exported from peer network. -// "OUTGOING" - For routes exported from local network. -func (c *NetworksListPeeringRoutesCall) Direction(direction string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("direction", direction) return c } @@ -48235,7 +48107,7 @@ func (c *NetworksListPeeringRoutesCall) Direction(direction string) *NetworksLis // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *NetworksListPeeringRoutesCall) Filter(filter string) *NetworksListPeeringRoutesCall { +func (c *NetworkProfilesListCall) Filter(filter string) *NetworkProfilesListCall { c.urlParams_.Set("filter", filter) return c } @@ -48245,7 +48117,7 @@ func (c *NetworksListPeeringRoutesCall) Filter(filter string) *NetworksListPeeri // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NetworksListPeeringRoutesCall) MaxResults(maxResults int64) *NetworksListPeeringRoutesCall { +func (c *NetworkProfilesListCall) MaxResults(maxResults int64) *NetworkProfilesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -48258,31 +48130,16 @@ func (c *NetworksListPeeringRoutesCall) MaxResults(maxResults int64) *NetworksLi // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *NetworksListPeeringRoutesCall) OrderBy(orderBy string) *NetworksListPeeringRoutesCall { +func (c *NetworkProfilesListCall) OrderBy(orderBy string) *NetworkProfilesListCall { c.urlParams_.Set("orderBy", orderBy) return c } // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *NetworksListPeeringRoutesCall) PageToken(pageToken string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// PeeringName sets the optional parameter "peeringName": The response will -// show routes exchanged over the given peering connection. -func (c *NetworksListPeeringRoutesCall) PeeringName(peeringName string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("peeringName", peeringName) - return c -} - -// Region sets the optional parameter "region": The region of the request. The -// response will include all subnet routes, static routes and dynamic routes in -// the region. -func (c *NetworksListPeeringRoutesCall) Region(region string) *NetworksListPeeringRoutesCall { - c.urlParams_.Set("region", region) +// request to get the next page of results. +func (c *NetworkProfilesListCall) PageToken(pageToken string) *NetworkProfilesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } @@ -48291,7 +48148,7 @@ func (c *NetworksListPeeringRoutesCall) Region(region string) *NetworksListPeeri // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *NetworksListPeeringRoutesCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworksListPeeringRoutesCall { +func (c *NetworkProfilesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworkProfilesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -48299,7 +48156,7 @@ func (c *NetworksListPeeringRoutesCall) ReturnPartialSuccess(returnPartialSucces // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworksListPeeringRoutesCall) Fields(s ...googleapi.Field) *NetworksListPeeringRoutesCall { +func (c *NetworkProfilesListCall) Fields(s ...googleapi.Field) *NetworkProfilesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -48307,27 +48164,27 @@ func (c *NetworksListPeeringRoutesCall) Fields(s ...googleapi.Field) *NetworksLi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NetworksListPeeringRoutesCall) IfNoneMatch(entityTag string) *NetworksListPeeringRoutesCall { +func (c *NetworkProfilesListCall) IfNoneMatch(entityTag string) *NetworkProfilesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NetworksListPeeringRoutesCall) Context(ctx context.Context) *NetworksListPeeringRoutesCall { +func (c *NetworkProfilesListCall) Context(ctx context.Context) *NetworkProfilesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworksListPeeringRoutesCall) Header() http.Header { +func (c *NetworkProfilesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksListPeeringRoutesCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworkProfilesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -48335,7 +48192,7 @@ func (c *NetworksListPeeringRoutesCall) doRequest(alt string) (*http.Response, e var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/listPeeringRoutes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networkProfiles") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -48344,18 +48201,17 @@ func (c *NetworksListPeeringRoutesCall) doRequest(alt string) (*http.Response, e req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "network": c.network, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.listPeeringRoutes" call. +// Do executes the "compute.networkProfiles.list" call. // Any non-2xx status code is an error. Response headers are in either -// *ExchangedPeeringRoutesList.ServerResponse.Header or (if a response was +// *NetworkProfilesListResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *NetworksListPeeringRoutesCall) Do(opts ...googleapi.CallOption) (*ExchangedPeeringRoutesList, error) { +func (c *NetworkProfilesListCall) Do(opts ...googleapi.CallOption) (*NetworkProfilesListResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48374,7 +48230,7 @@ func (c *NetworksListPeeringRoutesCall) Do(opts ...googleapi.CallOption) (*Excha if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ExchangedPeeringRoutesList{ + ret := &NetworkProfilesListResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -48390,7 +48246,7 @@ func (c *NetworksListPeeringRoutesCall) Do(opts ...googleapi.CallOption) (*Excha // 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 *NetworksListPeeringRoutesCall) Pages(ctx context.Context, f func(*ExchangedPeeringRoutesList) error) error { +func (c *NetworkProfilesListCall) Pages(ctx context.Context, f func(*NetworkProfilesListResponse) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -48408,26 +48264,143 @@ func (c *NetworksListPeeringRoutesCall) Pages(ctx context.Context, f func(*Excha } } -type NetworksPatchCall struct { +type NetworksAddPeeringCall struct { + s *Service + project string + network string + networksaddpeeringrequest *NetworksAddPeeringRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddPeering: Adds a peering to the specified network. +// +// - network: Name of the network resource to add peering to. +// - project: Project ID for this request. +func (r *NetworksService) AddPeering(project string, network string, networksaddpeeringrequest *NetworksAddPeeringRequest) *NetworksAddPeeringCall { + c := &NetworksAddPeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.network = network + c.networksaddpeeringrequest = networksaddpeeringrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworksAddPeeringCall) RequestId(requestId string) *NetworksAddPeeringCall { + 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 +// details. +func (c *NetworksAddPeeringCall) Fields(s ...googleapi.Field) *NetworksAddPeeringCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *NetworksAddPeeringCall) Context(ctx context.Context) *NetworksAddPeeringCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *NetworksAddPeeringCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworksAddPeeringCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksaddpeeringrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/addPeering") + 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{ + "project": c.project, + "network": c.network, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networks.addPeering" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *NetworksAddPeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type NetworksDeleteCall struct { s *Service project string network string - network2 *Network urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Patch: Patches the specified network with the data included in the request. -// Only routingConfig can be modified. +// Delete: Deletes the specified network. // -// - network: Name of the network to update. +// - network: Name of the network to delete. // - project: Project ID for this request. -func (r *NetworksService) Patch(project string, network string, network2 *Network) *NetworksPatchCall { - c := &NetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworksService) Delete(project string, network string) *NetworksDeleteCall { + c := &NetworksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.network = network - c.network2 = network2 return c } @@ -48441,7 +48414,7 @@ func (r *NetworksService) Patch(project string, network string, network2 *Networ // 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 *NetworksPatchCall) RequestId(requestId string) *NetworksPatchCall { +func (c *NetworksDeleteCall) RequestId(requestId string) *NetworksDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -48449,38 +48422,145 @@ func (c *NetworksPatchCall) RequestId(requestId string) *NetworksPatchCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworksPatchCall) Fields(s ...googleapi.Field) *NetworksPatchCall { +func (c *NetworksDeleteCall) Fields(s ...googleapi.Field) *NetworksDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *NetworksDeleteCall) Context(ctx context.Context) *NetworksDeleteCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *NetworksDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NetworksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") + 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{ + "project": c.project, + "network": c.network, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.networks.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *NetworksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type NetworksGetCall struct { + s *Service + project string + network string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified network. +// +// - network: Name of the network to return. +// - project: Project ID for this request. +func (r *NetworksService) Get(project string, network string) *NetworksGetCall { + c := &NetworksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.network = network + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *NetworksGetCall) Fields(s ...googleapi.Field) *NetworksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworksGetCall) IfNoneMatch(entityTag string) *NetworksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworksPatchCall) Context(ctx context.Context) *NetworksPatchCall { +func (c *NetworksGetCall) Context(ctx context.Context) *NetworksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworksPatchCall) Header() http.Header { +func (c *NetworksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.network2) - if err != nil { - return nil, err +func (c *NetworksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -48492,12 +48572,12 @@ func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.patch" call. +// Do executes the "compute.networks.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *Network.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworksGetCall) Do(opts ...googleapi.CallOption) (*Network, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48516,7 +48596,7 @@ func (c *NetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Network{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -48529,78 +48609,69 @@ func (c *NetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) return ret, nil } -type NetworksRemovePeeringCall struct { - s *Service - project string - network string - networksremovepeeringrequest *NetworksRemovePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworksGetEffectiveFirewallsCall struct { + s *Service + project string + network string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RemovePeering: Removes a peering from the specified network. +// GetEffectiveFirewalls: Returns the effective firewalls on a given network. // -// - network: Name of the network resource to remove peering from. +// - network: Name of the network for this request. // - project: Project ID for this request. -func (r *NetworksService) RemovePeering(project string, network string, networksremovepeeringrequest *NetworksRemovePeeringRequest) *NetworksRemovePeeringCall { - c := &NetworksRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworksService) GetEffectiveFirewalls(project string, network string) *NetworksGetEffectiveFirewallsCall { + c := &NetworksGetEffectiveFirewallsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.network = network - c.networksremovepeeringrequest = networksremovepeeringrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworksRemovePeeringCall) RequestId(requestId string) *NetworksRemovePeeringCall { - 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 // details. -func (c *NetworksRemovePeeringCall) Fields(s ...googleapi.Field) *NetworksRemovePeeringCall { +func (c *NetworksGetEffectiveFirewallsCall) Fields(s ...googleapi.Field) *NetworksGetEffectiveFirewallsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworksGetEffectiveFirewallsCall) IfNoneMatch(entityTag string) *NetworksGetEffectiveFirewallsCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NetworksRemovePeeringCall) Context(ctx context.Context) *NetworksRemovePeeringCall { +func (c *NetworksGetEffectiveFirewallsCall) Context(ctx context.Context) *NetworksGetEffectiveFirewallsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworksRemovePeeringCall) Header() http.Header { +func (c *NetworksGetEffectiveFirewallsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksremovepeeringrequest) - if err != nil { - return nil, err +func (c *NetworksGetEffectiveFirewallsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/removePeering") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/getEffectiveFirewalls") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -48612,12 +48683,13 @@ func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.removePeering" call. +// Do executes the "compute.networks.getEffectiveFirewalls" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *NetworksGetEffectiveFirewallsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NetworksGetEffectiveFirewallsCall) Do(opts ...googleapi.CallOption) (*NetworksGetEffectiveFirewallsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48636,7 +48708,7 @@ func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NetworksGetEffectiveFirewallsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -48649,22 +48721,21 @@ func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation return ret, nil } -type NetworksSwitchToCustomModeCall struct { +type NetworksInsertCall struct { s *Service project string - network string + network *Network urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// SwitchToCustomMode: Switches the network mode from auto subnet mode to -// custom subnet mode. +// Insert: Creates a network in the specified project using the data included +// in the request. // -// - network: Name of the network to be updated. // - project: Project ID for this request. -func (r *NetworksService) SwitchToCustomMode(project string, network string) *NetworksSwitchToCustomModeCall { - c := &NetworksSwitchToCustomModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworksService) Insert(project string, network *Network) *NetworksInsertCall { + c := &NetworksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.network = network return c @@ -48680,7 +48751,7 @@ func (r *NetworksService) SwitchToCustomMode(project string, network string) *Ne // 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 *NetworksSwitchToCustomModeCall) RequestId(requestId string) *NetworksSwitchToCustomModeCall { +func (c *NetworksInsertCall) RequestId(requestId string) *NetworksInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -48688,32 +48759,36 @@ func (c *NetworksSwitchToCustomModeCall) RequestId(requestId string) *NetworksSw // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NetworksSwitchToCustomModeCall) Fields(s ...googleapi.Field) *NetworksSwitchToCustomModeCall { +func (c *NetworksInsertCall) Fields(s ...googleapi.Field) *NetworksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NetworksSwitchToCustomModeCall) Context(ctx context.Context) *NetworksSwitchToCustomModeCall { +func (c *NetworksInsertCall) Context(ctx context.Context) *NetworksInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NetworksSwitchToCustomModeCall) Header() http.Header { +func (c *NetworksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *NetworksInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.network) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/switchToCustomMode") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -48722,17 +48797,16 @@ func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "network": c.network, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.networks.switchToCustomMode" call. +// Do executes the "compute.networks.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48764,222 +48838,160 @@ func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Oper return ret, nil } -type NetworksUpdatePeeringCall struct { - s *Service - project string - network string - networksupdatepeeringrequest *NetworksUpdatePeeringRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NetworksListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// UpdatePeering: Updates the specified network peering with the data included -// in the request. You can only modify the NetworkPeering.export_custom_routes -// field and the NetworkPeering.import_custom_routes field. +// List: Retrieves the list of networks available to the specified project. // -// - network: Name of the network resource which the updated peering is -// belonging to. -// - project: Project ID for this request. -func (r *NetworksService) UpdatePeering(project string, network string, networksupdatepeeringrequest *NetworksUpdatePeeringRequest) *NetworksUpdatePeeringCall { - c := &NetworksUpdatePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *NetworksService) List(project string) *NetworksListCall { + c := &NetworksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.network = network - c.networksupdatepeeringrequest = networksupdatepeeringrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworksUpdatePeeringCall) RequestId(requestId string) *NetworksUpdatePeeringCall { - 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 -// details. -func (c *NetworksUpdatePeeringCall) Fields(s ...googleapi.Field) *NetworksUpdatePeeringCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NetworksUpdatePeeringCall) Context(ctx context.Context) *NetworksUpdatePeeringCall { - c.ctx_ = ctx return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NetworksUpdatePeeringCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NetworksUpdatePeeringCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksupdatepeeringrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/updatePeering") - 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{ - "project": c.project, - "network": c.network, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *NetworksListCall) Filter(filter string) *NetworksListCall { + c.urlParams_.Set("filter", filter) + return c } -// Do executes the "compute.networks.updatePeering" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NetworksUpdatePeeringCall) 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 +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *NetworksListCall) MaxResults(maxResults int64) *NetworksListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c } -type NodeGroupsAddNodesCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupsaddnodesrequest *NodeGroupsAddNodesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *NetworksListCall) OrderBy(orderBy string) *NetworksListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// AddNodes: Adds specified number of nodes to the node group. -// -// - nodeGroup: Name of the NodeGroup resource. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) AddNodes(project string, zone string, nodeGroup string, nodegroupsaddnodesrequest *NodeGroupsAddNodesRequest) *NodeGroupsAddNodesCall { - c := &NodeGroupsAddNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupsaddnodesrequest = nodegroupsaddnodesrequest +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *NetworksListCall) PageToken(pageToken string) *NetworksListCall { + c.urlParams_.Set("pageToken", pageToken) return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeGroupsAddNodesCall) RequestId(requestId string) *NodeGroupsAddNodesCall { - c.urlParams_.Set("requestId", requestId) +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *NetworksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworksListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeGroupsAddNodesCall) Fields(s ...googleapi.Field) *NodeGroupsAddNodesCall { +func (c *NetworksListCall) Fields(s ...googleapi.Field) *NetworksListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NetworksListCall) IfNoneMatch(entityTag string) *NetworksListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsAddNodesCall) Context(ctx context.Context) *NodeGroupsAddNodesCall { +func (c *NetworksListCall) Context(ctx context.Context) *NetworksListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsAddNodesCall) Header() http.Header { +func (c *NetworksListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsAddNodesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroupsaddnodesrequest) - if err != nil { - return nil, err +func (c *NetworksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks") 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.addNodes" call. +// Do executes the "compute.networks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *NetworkList.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsAddNodesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworksListCall) Do(opts ...googleapi.CallOption) (*NetworkList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -48998,7 +49010,7 @@ func (c *NodeGroupsAddNodesCall) Do(opts ...googleapi.CallOption) (*Operation, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NetworkList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49011,24 +49023,58 @@ func (c *NodeGroupsAddNodesCall) Do(opts ...googleapi.CallOption) (*Operation, e return ret, nil } -type NodeGroupsAggregatedListCall struct { +// 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 *NetworksListCall) Pages(ctx context.Context, f func(*NetworkList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type NetworksListPeeringRoutesCall struct { s *Service project string + network string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of node groups. Note: use -// nodeGroups.listNodes for more details about each group. To prevent failure, -// Google recommends that you set the `returnPartialSuccess` parameter to -// `true`. +// ListPeeringRoutes: Lists the peering routes exchanged over peering +// connection. // +// - network: Name of the network for this request. // - project: Project ID for this request. -func (r *NodeGroupsService) AggregatedList(project string) *NodeGroupsAggregatedListCall { - c := &NodeGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworksService) ListPeeringRoutes(project string, network string) *NetworksListPeeringRoutesCall { + c := &NetworksListPeeringRoutesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.network = network + return c +} + +// Direction sets the optional parameter "direction": The direction of the +// exchanged routes. +// +// Possible values: +// +// "INCOMING" - For routes exported from peer network. +// "OUTGOING" - For routes exported from local network. +func (c *NetworksListPeeringRoutesCall) Direction(direction string) *NetworksListPeeringRoutesCall { + c.urlParams_.Set("direction", direction) return c } @@ -49064,30 +49110,17 @@ func (r *NodeGroupsService) AggregatedList(project string) *NodeGroupsAggregated // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *NodeGroupsAggregatedListCall) Filter(filter string) *NodeGroupsAggregatedListCall { +func (c *NetworksListPeeringRoutesCall) Filter(filter string) *NetworksListPeeringRoutesCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *NodeGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NodeGroupsAggregatedListCall) MaxResults(maxResults int64) *NodeGroupsAggregatedListCall { +func (c *NetworksListPeeringRoutesCall) MaxResults(maxResults int64) *NetworksListPeeringRoutesCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -49100,7 +49133,7 @@ func (c *NodeGroupsAggregatedListCall) MaxResults(maxResults int64) *NodeGroupsA // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *NodeGroupsAggregatedListCall) OrderBy(orderBy string) *NodeGroupsAggregatedListCall { +func (c *NetworksListPeeringRoutesCall) OrderBy(orderBy string) *NetworksListPeeringRoutesCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -49108,33 +49141,40 @@ func (c *NodeGroupsAggregatedListCall) OrderBy(orderBy string) *NodeGroupsAggreg // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *NodeGroupsAggregatedListCall) PageToken(pageToken string) *NodeGroupsAggregatedListCall { +func (c *NetworksListPeeringRoutesCall) PageToken(pageToken string) *NetworksListPeeringRoutesCall { c.urlParams_.Set("pageToken", pageToken) return c } +// PeeringName sets the optional parameter "peeringName": The response will +// show routes exchanged over the given peering connection. +func (c *NetworksListPeeringRoutesCall) PeeringName(peeringName string) *NetworksListPeeringRoutesCall { + c.urlParams_.Set("peeringName", peeringName) + return c +} + +// Region sets the optional parameter "region": The region of the request. The +// response will include all subnet routes, static routes and dynamic routes in +// the region. +func (c *NetworksListPeeringRoutesCall) Region(region string) *NetworksListPeeringRoutesCall { + c.urlParams_.Set("region", region) + return c +} + // ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": // Opt-in for partial success behavior which provides partial results in case // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *NodeGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsAggregatedListCall { +func (c *NetworksListPeeringRoutesCall) ReturnPartialSuccess(returnPartialSuccess bool) *NetworksListPeeringRoutesCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *NodeGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeGroupsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NodeGroupsAggregatedListCall { +func (c *NetworksListPeeringRoutesCall) Fields(s ...googleapi.Field) *NetworksListPeeringRoutesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -49142,27 +49182,27 @@ func (c *NodeGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NodeGroupsA // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NodeGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NodeGroupsAggregatedListCall { +func (c *NetworksListPeeringRoutesCall) IfNoneMatch(entityTag string) *NetworksListPeeringRoutesCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsAggregatedListCall) Context(ctx context.Context) *NodeGroupsAggregatedListCall { +func (c *NetworksListPeeringRoutesCall) Context(ctx context.Context) *NetworksListPeeringRoutesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsAggregatedListCall) Header() http.Header { +func (c *NetworksListPeeringRoutesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworksListPeeringRoutesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -49170,7 +49210,7 @@ func (c *NodeGroupsAggregatedListCall) doRequest(alt string) (*http.Response, er var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/listPeeringRoutes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -49179,17 +49219,18 @@ func (c *NodeGroupsAggregatedListCall) doRequest(alt string) (*http.Response, er req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "network": c.network, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.aggregatedList" call. +// Do executes the "compute.networks.listPeeringRoutes" call. // Any non-2xx status code is an error. Response headers are in either -// *NodeGroupAggregatedList.ServerResponse.Header or (if a response was +// *ExchangedPeeringRoutesList.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *NodeGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeGroupAggregatedList, error) { +func (c *NetworksListPeeringRoutesCall) Do(opts ...googleapi.CallOption) (*ExchangedPeeringRoutesList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49208,7 +49249,7 @@ func (c *NodeGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeGr if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NodeGroupAggregatedList{ + ret := &ExchangedPeeringRoutesList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49224,7 +49265,7 @@ func (c *NodeGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeGr // 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 *NodeGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NodeGroupAggregatedList) error) error { +func (c *NetworksListPeeringRoutesCall) Pages(ctx context.Context, f func(*ExchangedPeeringRoutesList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -49242,26 +49283,26 @@ func (c *NodeGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NodeGr } } -type NodeGroupsDeleteCall struct { +type NetworksPatchCall struct { s *Service project string - zone string - nodeGroup string + network string + network2 *Network urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Delete: Deletes the specified NodeGroup resource. +// Patch: Patches the specified network with the data included in the request. +// Only routingConfig can be modified. // -// - nodeGroup: Name of the NodeGroup resource to delete. +// - network: Name of the network to update. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) Delete(project string, zone string, nodeGroup string) *NodeGroupsDeleteCall { - c := &NodeGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworksService) Patch(project string, network string, network2 *Network) *NetworksPatchCall { + c := &NetworksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.nodeGroup = nodeGroup + c.network = network + c.network2 = network2 return c } @@ -49275,7 +49316,7 @@ func (r *NodeGroupsService) Delete(project string, zone string, nodeGroup string // 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 *NodeGroupsDeleteCall) RequestId(requestId string) *NodeGroupsDeleteCall { +func (c *NetworksPatchCall) RequestId(requestId string) *NetworksPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -49283,52 +49324,55 @@ func (c *NodeGroupsDeleteCall) RequestId(requestId string) *NodeGroupsDeleteCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeGroupsDeleteCall) Fields(s ...googleapi.Field) *NodeGroupsDeleteCall { +func (c *NetworksPatchCall) Fields(s ...googleapi.Field) *NetworksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsDeleteCall) Context(ctx context.Context) *NodeGroupsDeleteCall { +func (c *NetworksPatchCall) Context(ctx context.Context) *NetworksPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsDeleteCall) Header() http.Header { +func (c *NetworksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *NetworksPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.network2) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, + "project": c.project, + "network": c.network, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.delete" call. +// Do executes the "compute.networks.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49360,28 +49404,25 @@ func (c *NodeGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, err return ret, nil } -type NodeGroupsDeleteNodesCall struct { +type NetworksRemovePeeringCall struct { s *Service project string - zone string - nodeGroup string - nodegroupsdeletenodesrequest *NodeGroupsDeleteNodesRequest + network string + networksremovepeeringrequest *NetworksRemovePeeringRequest urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// DeleteNodes: Deletes specified nodes from the node group. +// RemovePeering: Removes a peering from the specified network. // -// - nodeGroup: Name of the NodeGroup resource whose nodes will be deleted. +// - network: Name of the network resource to remove peering from. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) DeleteNodes(project string, zone string, nodeGroup string, nodegroupsdeletenodesrequest *NodeGroupsDeleteNodesRequest) *NodeGroupsDeleteNodesCall { - c := &NodeGroupsDeleteNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworksService) RemovePeering(project string, network string, networksremovepeeringrequest *NetworksRemovePeeringRequest) *NetworksRemovePeeringCall { + c := &NetworksRemovePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupsdeletenodesrequest = nodegroupsdeletenodesrequest + c.network = network + c.networksremovepeeringrequest = networksremovepeeringrequest return c } @@ -49395,7 +49436,7 @@ func (r *NodeGroupsService) DeleteNodes(project string, zone string, nodeGroup s // 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 *NodeGroupsDeleteNodesCall) RequestId(requestId string) *NodeGroupsDeleteNodesCall { +func (c *NetworksRemovePeeringCall) RequestId(requestId string) *NetworksRemovePeeringCall { c.urlParams_.Set("requestId", requestId) return c } @@ -49403,36 +49444,36 @@ func (c *NodeGroupsDeleteNodesCall) RequestId(requestId string) *NodeGroupsDelet // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeGroupsDeleteNodesCall) Fields(s ...googleapi.Field) *NodeGroupsDeleteNodesCall { +func (c *NetworksRemovePeeringCall) Fields(s ...googleapi.Field) *NetworksRemovePeeringCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsDeleteNodesCall) Context(ctx context.Context) *NodeGroupsDeleteNodesCall { +func (c *NetworksRemovePeeringCall) Context(ctx context.Context) *NetworksRemovePeeringCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsDeleteNodesCall) Header() http.Header { +func (c *NetworksRemovePeeringCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsDeleteNodesCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworksRemovePeeringCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroupsdeletenodesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksremovepeeringrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/removePeering") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -49440,19 +49481,18 @@ func (c *NodeGroupsDeleteNodesCall) doRequest(alt string) (*http.Response, error } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, + "project": c.project, + "network": c.network, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.deleteNodes" call. +// Do executes the "compute.networks.removePeering" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsDeleteNodesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NetworksRemovePeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49484,92 +49524,90 @@ func (c *NodeGroupsDeleteNodesCall) Do(opts ...googleapi.CallOption) (*Operation return ret, nil } -type NodeGroupsGetCall struct { - s *Service - project string - zone string - nodeGroup string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NetworksSwitchToCustomModeCall struct { + s *Service + project string + network string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified NodeGroup. Get a list of available NodeGroups by -// making a list() request. Note: the "nodes" field should not be used. Use -// nodeGroups.listNodes instead. +// SwitchToCustomMode: Switches the network mode from auto subnet mode to +// custom subnet mode. // -// - nodeGroup: Name of the node group to return. +// - network: Name of the network to be updated. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) Get(project string, zone string, nodeGroup string) *NodeGroupsGetCall { - c := &NodeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NetworksService) SwitchToCustomMode(project string, network string) *NetworksSwitchToCustomModeCall { + c := &NetworksSwitchToCustomModeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.nodeGroup = nodeGroup + c.network = network + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworksSwitchToCustomModeCall) RequestId(requestId string) *NetworksSwitchToCustomModeCall { + 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 // details. -func (c *NodeGroupsGetCall) Fields(s ...googleapi.Field) *NodeGroupsGetCall { +func (c *NetworksSwitchToCustomModeCall) Fields(s ...googleapi.Field) *NetworksSwitchToCustomModeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NodeGroupsGetCall) IfNoneMatch(entityTag string) *NodeGroupsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsGetCall) Context(ctx context.Context) *NodeGroupsGetCall { +func (c *NetworksSwitchToCustomModeCall) Context(ctx context.Context) *NetworksSwitchToCustomModeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsGetCall) Header() http.Header { +func (c *NetworksSwitchToCustomModeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *NetworksSwitchToCustomModeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/switchToCustomMode") 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, + "project": c.project, + "network": c.network, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.get" call. +// Do executes the "compute.networks.switchToCustomMode" call. // Any non-2xx status code is an error. Response headers are in either -// *NodeGroup.ServerResponse.Header or (if a response was returned at all) in +// *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 *NodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, error) { +func (c *NetworksSwitchToCustomModeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49588,7 +49626,7 @@ func (c *NodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, error) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NodeGroup{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -49601,98 +49639,98 @@ func (c *NodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, error) return ret, nil } -type NodeGroupsGetIamPolicyCall struct { - s *Service - project string - zone string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NetworksUpdatePeeringCall struct { + s *Service + project string + network string + networksupdatepeeringrequest *NetworksUpdatePeeringRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// UpdatePeering: Updates the specified network peering with the data included +// in the request. You can only modify the NetworkPeering.export_custom_routes +// field and the NetworkPeering.import_custom_routes field. // -// - project: Project ID for this request. -// - resource: Name or id of the resource for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) GetIamPolicy(project string, zone string, resource string) *NodeGroupsGetIamPolicyCall { - c := &NodeGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - network: Name of the network resource which the updated peering is +// belonging to. +// - project: Project ID for this request. +func (r *NetworksService) UpdatePeering(project string, network string, networksupdatepeeringrequest *NetworksUpdatePeeringRequest) *NetworksUpdatePeeringCall { + c := &NetworksUpdatePeeringCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.resource = resource - return c -} - -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NodeGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeGroupsGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + c.network = network + c.networksupdatepeeringrequest = networksupdatepeeringrequest return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *NodeGroupsGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NetworksUpdatePeeringCall) RequestId(requestId string) *NetworksUpdatePeeringCall { + c.urlParams_.Set("requestId", requestId) return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NodeGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *NodeGroupsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *NetworksUpdatePeeringCall) Fields(s ...googleapi.Field) *NetworksUpdatePeeringCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsGetIamPolicyCall) Context(ctx context.Context) *NodeGroupsGetIamPolicyCall { +func (c *NetworksUpdatePeeringCall) Context(ctx context.Context) *NetworksUpdatePeeringCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsGetIamPolicyCall) Header() http.Header { +func (c *NetworksUpdatePeeringCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *NetworksUpdatePeeringCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.networksupdatepeeringrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/networks/{network}/updatePeering") 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "network": c.network, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.getIamPolicy" call. +// Do executes the "compute.networks.updatePeering" call. // 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 +// *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 *NodeGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *NetworksUpdatePeeringCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49711,7 +49749,7 @@ func (c *NodeGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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, @@ -49724,28 +49762,28 @@ func (c *NodeGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, return ret, nil } -type NodeGroupsInsertCall struct { - s *Service - project string - zone string - nodegroup *NodeGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NodeGroupsAddNodesCall struct { + s *Service + project string + zone string + nodeGroup string + nodegroupsaddnodesrequest *NodeGroupsAddNodesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a NodeGroup resource in the specified project using the data -// included in the request. +// AddNodes: Adds specified number of nodes to the node group. // -// - initialNodeCount: Initial count of nodes in the node group. +// - nodeGroup: Name of the NodeGroup resource. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *NodeGroupsService) Insert(project string, zone string, initialNodeCount int64, nodegroup *NodeGroup) *NodeGroupsInsertCall { - c := &NodeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NodeGroupsService) AddNodes(project string, zone string, nodeGroup string, nodegroupsaddnodesrequest *NodeGroupsAddNodesRequest) *NodeGroupsAddNodesCall { + c := &NodeGroupsAddNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.urlParams_.Set("initialNodeCount", fmt.Sprint(initialNodeCount)) - c.nodegroup = nodegroup + c.nodeGroup = nodeGroup + c.nodegroupsaddnodesrequest = nodegroupsaddnodesrequest return c } @@ -49759,7 +49797,7 @@ func (r *NodeGroupsService) Insert(project string, zone string, initialNodeCount // 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 *NodeGroupsInsertCall) RequestId(requestId string) *NodeGroupsInsertCall { +func (c *NodeGroupsAddNodesCall) RequestId(requestId string) *NodeGroupsAddNodesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -49767,36 +49805,36 @@ func (c *NodeGroupsInsertCall) RequestId(requestId string) *NodeGroupsInsertCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeGroupsInsertCall) Fields(s ...googleapi.Field) *NodeGroupsInsertCall { +func (c *NodeGroupsAddNodesCall) Fields(s ...googleapi.Field) *NodeGroupsAddNodesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsInsertCall) Context(ctx context.Context) *NodeGroupsInsertCall { +func (c *NodeGroupsAddNodesCall) Context(ctx context.Context) *NodeGroupsAddNodesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsInsertCall) Header() http.Header { +func (c *NodeGroupsAddNodesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *NodeGroupsAddNodesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroupsaddnodesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/addNodes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -49804,18 +49842,19 @@ func (c *NodeGroupsInsertCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, + "project": c.project, + "zone": c.zone, + "nodeGroup": c.nodeGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.insert" call. +// Do executes the "compute.nodeGroups.addNodes" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NodeGroupsAddNodesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -49847,25 +49886,24 @@ func (c *NodeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, err return ret, nil } -type NodeGroupsListCall struct { +type NodeGroupsAggregatedListCall struct { s *Service project string - zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of node groups available to the specified project. -// Note: use nodeGroups.listNodes for more details about each group. +// AggregatedList: Retrieves an aggregated list of node groups. Note: use +// nodeGroups.listNodes for more details about each group. To prevent failure, +// Google recommends that you set the `returnPartialSuccess` parameter to +// `true`. // // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) List(project string, zone string) *NodeGroupsListCall { - c := &NodeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NodeGroupsService) AggregatedList(project string) *NodeGroupsAggregatedListCall { + c := &NodeGroupsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone return c } @@ -49901,17 +49939,30 @@ func (r *NodeGroupsService) List(project string, zone string) *NodeGroupsListCal // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *NodeGroupsListCall) Filter(filter string) *NodeGroupsListCall { +func (c *NodeGroupsAggregatedListCall) Filter(filter string) *NodeGroupsAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *NodeGroupsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeGroupsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NodeGroupsListCall) MaxResults(maxResults int64) *NodeGroupsListCall { +func (c *NodeGroupsAggregatedListCall) MaxResults(maxResults int64) *NodeGroupsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -49924,7 +49975,7 @@ func (c *NodeGroupsListCall) MaxResults(maxResults int64) *NodeGroupsListCall { // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *NodeGroupsListCall) OrderBy(orderBy string) *NodeGroupsListCall { +func (c *NodeGroupsAggregatedListCall) OrderBy(orderBy string) *NodeGroupsAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -49932,7 +49983,7 @@ func (c *NodeGroupsListCall) OrderBy(orderBy string) *NodeGroupsListCall { // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *NodeGroupsListCall) PageToken(pageToken string) *NodeGroupsListCall { +func (c *NodeGroupsAggregatedListCall) PageToken(pageToken string) *NodeGroupsAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -49942,15 +49993,23 @@ func (c *NodeGroupsListCall) PageToken(pageToken string) *NodeGroupsListCall { // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *NodeGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsListCall { +func (c *NodeGroupsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *NodeGroupsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeGroupsAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeGroupsListCall) Fields(s ...googleapi.Field) *NodeGroupsListCall { +func (c *NodeGroupsAggregatedListCall) Fields(s ...googleapi.Field) *NodeGroupsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -49958,27 +50017,27 @@ func (c *NodeGroupsListCall) Fields(s ...googleapi.Field) *NodeGroupsListCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NodeGroupsListCall) IfNoneMatch(entityTag string) *NodeGroupsListCall { +func (c *NodeGroupsAggregatedListCall) IfNoneMatch(entityTag string) *NodeGroupsAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsListCall) Context(ctx context.Context) *NodeGroupsListCall { +func (c *NodeGroupsAggregatedListCall) Context(ctx context.Context) *NodeGroupsAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsListCall) Header() http.Header { +func (c *NodeGroupsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsListCall) doRequest(alt string) (*http.Response, error) { +func (c *NodeGroupsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -49986,7 +50045,7 @@ func (c *NodeGroupsListCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -49995,17 +50054,17 @@ func (c *NodeGroupsListCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.list" call. +// Do executes the "compute.nodeGroups.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *NodeGroupList.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsListCall) Do(opts ...googleapi.CallOption) (*NodeGroupList, error) { +// *NodeGroupAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NodeGroupsAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeGroupAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50024,7 +50083,7 @@ func (c *NodeGroupsListCall) Do(opts ...googleapi.CallOption) (*NodeGroupList, e if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NodeGroupList{ + ret := &NodeGroupAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50040,7 +50099,7 @@ func (c *NodeGroupsListCall) Do(opts ...googleapi.CallOption) (*NodeGroupList, e // 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 *NodeGroupsListCall) Pages(ctx context.Context, f func(*NodeGroupList) error) error { +func (c *NodeGroupsAggregatedListCall) Pages(ctx context.Context, f func(*NodeGroupAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -50058,7 +50117,7 @@ func (c *NodeGroupsListCall) Pages(ctx context.Context, f func(*NodeGroupList) e } } -type NodeGroupsListNodesCall struct { +type NodeGroupsDeleteCall struct { s *Service project string zone string @@ -50068,128 +50127,65 @@ type NodeGroupsListNodesCall struct { header_ http.Header } -// ListNodes: Lists nodes in the node group. +// Delete: Deletes the specified NodeGroup resource. // -// - nodeGroup: Name of the NodeGroup resource whose nodes you want to list. +// - nodeGroup: Name of the NodeGroup resource to delete. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *NodeGroupsService) ListNodes(project string, zone string, nodeGroup string) *NodeGroupsListNodesCall { - c := &NodeGroupsListNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NodeGroupsService) Delete(project string, zone string, nodeGroup string) *NodeGroupsDeleteCall { + c := &NodeGroupsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.nodeGroup = nodeGroup return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *NodeGroupsListNodesCall) Filter(filter string) *NodeGroupsListNodesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NodeGroupsListNodesCall) MaxResults(maxResults int64) *NodeGroupsListNodesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *NodeGroupsListNodesCall) OrderBy(orderBy string) *NodeGroupsListNodesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *NodeGroupsListNodesCall) PageToken(pageToken string) *NodeGroupsListNodesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *NodeGroupsListNodesCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsListNodesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeGroupsDeleteCall) RequestId(requestId string) *NodeGroupsDeleteCall { + 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 // details. -func (c *NodeGroupsListNodesCall) Fields(s ...googleapi.Field) *NodeGroupsListNodesCall { +func (c *NodeGroupsDeleteCall) Fields(s ...googleapi.Field) *NodeGroupsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsListNodesCall) Context(ctx context.Context) *NodeGroupsListNodesCall { +func (c *NodeGroupsDeleteCall) Context(ctx context.Context) *NodeGroupsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsListNodesCall) Header() http.Header { +func (c *NodeGroupsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsListNodesCall) doRequest(alt string) (*http.Response, error) { +func (c *NodeGroupsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -50202,13 +50198,12 @@ func (c *NodeGroupsListNodesCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.listNodes" call. +// Do executes the "compute.nodeGroups.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *NodeGroupsListNodes.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *NodeGroupsListNodesCall) Do(opts ...googleapi.CallOption) (*NodeGroupsListNodes, error) { +// *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 *NodeGroupsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50227,7 +50222,7 @@ func (c *NodeGroupsListNodesCall) Do(opts ...googleapi.CallOption) (*NodeGroupsL if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NodeGroupsListNodes{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50240,49 +50235,28 @@ func (c *NodeGroupsListNodesCall) Do(opts ...googleapi.CallOption) (*NodeGroupsL return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NodeGroupsListNodesCall) Pages(ctx context.Context, f func(*NodeGroupsListNodes) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type NodeGroupsPatchCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroup *NodeGroup - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NodeGroupsDeleteNodesCall struct { + s *Service + project string + zone string + nodeGroup string + nodegroupsdeletenodesrequest *NodeGroupsDeleteNodesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified node group. +// DeleteNodes: Deletes specified nodes from the node group. // -// - nodeGroup: Name of the NodeGroup resource to update. +// - nodeGroup: Name of the NodeGroup resource whose nodes will be deleted. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *NodeGroupsService) Patch(project string, zone string, nodeGroup string, nodegroup *NodeGroup) *NodeGroupsPatchCall { - c := &NodeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NodeGroupsService) DeleteNodes(project string, zone string, nodeGroup string, nodegroupsdeletenodesrequest *NodeGroupsDeleteNodesRequest) *NodeGroupsDeleteNodesCall { + c := &NodeGroupsDeleteNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.nodeGroup = nodeGroup - c.nodegroup = nodegroup + c.nodegroupsdeletenodesrequest = nodegroupsdeletenodesrequest return c } @@ -50296,7 +50270,7 @@ func (r *NodeGroupsService) Patch(project string, zone string, nodeGroup string, // 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 *NodeGroupsPatchCall) RequestId(requestId string) *NodeGroupsPatchCall { +func (c *NodeGroupsDeleteNodesCall) RequestId(requestId string) *NodeGroupsDeleteNodesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -50304,38 +50278,38 @@ func (c *NodeGroupsPatchCall) RequestId(requestId string) *NodeGroupsPatchCall { // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeGroupsPatchCall) Fields(s ...googleapi.Field) *NodeGroupsPatchCall { +func (c *NodeGroupsDeleteNodesCall) Fields(s ...googleapi.Field) *NodeGroupsDeleteNodesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsPatchCall) Context(ctx context.Context) *NodeGroupsPatchCall { +func (c *NodeGroupsDeleteNodesCall) Context(ctx context.Context) *NodeGroupsDeleteNodesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsPatchCall) Header() http.Header { +func (c *NodeGroupsDeleteNodesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *NodeGroupsDeleteNodesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroup) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroupsdeletenodesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/deleteNodes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -50348,12 +50322,12 @@ func (c *NodeGroupsPatchCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.patch" call. +// Do executes the "compute.nodeGroups.deleteNodes" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NodeGroupsDeleteNodesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50385,100 +50359,215 @@ func (c *NodeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, erro return ret, nil } -type NodeGroupsPerformMaintenanceCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupsperformmaintenancerequest *NodeGroupsPerformMaintenanceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NodeGroupsGetCall struct { + s *Service + project string + zone string + nodeGroup string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// PerformMaintenance: Perform maintenance on a subset of nodes in the node -// group. +// Get: Returns the specified NodeGroup. Get a list of available NodeGroups by +// making a list() request. Note: the "nodes" field should not be used. Use +// nodeGroups.listNodes instead. // -// - nodeGroup: Name of the node group scoping this request. +// - nodeGroup: Name of the node group to return. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *NodeGroupsService) PerformMaintenance(project string, zone string, nodeGroup string, nodegroupsperformmaintenancerequest *NodeGroupsPerformMaintenanceRequest) *NodeGroupsPerformMaintenanceCall { - c := &NodeGroupsPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NodeGroupsService) Get(project string, zone string, nodeGroup string) *NodeGroupsGetCall { + c := &NodeGroupsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.nodeGroup = nodeGroup - c.nodegroupsperformmaintenancerequest = nodegroupsperformmaintenancerequest return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeGroupsPerformMaintenanceCall) RequestId(requestId string) *NodeGroupsPerformMaintenanceCall { - c.urlParams_.Set("requestId", requestId) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *NodeGroupsGetCall) Fields(s ...googleapi.Field) *NodeGroupsGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NodeGroupsGetCall) IfNoneMatch(entityTag string) *NodeGroupsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *NodeGroupsGetCall) Context(ctx context.Context) *NodeGroupsGetCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *NodeGroupsGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NodeGroupsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "zone": c.zone, + "nodeGroup": c.nodeGroup, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.nodeGroups.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *NodeGroup.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *NodeGroupsGetCall) Do(opts ...googleapi.CallOption) (*NodeGroup, 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 := &NodeGroup{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type NodeGroupsGetIamPolicyCall struct { + s *Service + project string + zone string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. +// +// - project: Project ID for this request. +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *NodeGroupsService) GetIamPolicy(project string, zone string, resource string) *NodeGroupsGetIamPolicyCall { + c := &NodeGroupsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.zone = zone + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *NodeGroupsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeGroupsGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 // details. -func (c *NodeGroupsPerformMaintenanceCall) Fields(s ...googleapi.Field) *NodeGroupsPerformMaintenanceCall { +func (c *NodeGroupsGetIamPolicyCall) Fields(s ...googleapi.Field) *NodeGroupsGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NodeGroupsGetIamPolicyCall) IfNoneMatch(entityTag string) *NodeGroupsGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsPerformMaintenanceCall) Context(ctx context.Context) *NodeGroupsPerformMaintenanceCall { +func (c *NodeGroupsGetIamPolicyCall) Context(ctx context.Context) *NodeGroupsGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsPerformMaintenanceCall) Header() http.Header { +func (c *NodeGroupsGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroupsperformmaintenancerequest) - if err != nil { - return nil, err +func (c *NodeGroupsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/performMaintenance") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.performMaintenance" call. +// Do executes the "compute.nodeGroups.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *NodeGroupsPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NodeGroupsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50497,7 +50586,7 @@ func (c *NodeGroupsPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Op 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, @@ -50510,65 +50599,79 @@ func (c *NodeGroupsPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Op return ret, nil } -type NodeGroupsSetIamPolicyCall struct { - s *Service - project string - zone string - resource string - zonesetpolicyrequest *ZoneSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NodeGroupsInsertCall struct { + s *Service + project string + zone string + nodegroup *NodeGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. +// Insert: Creates a NodeGroup resource in the specified project using the data +// included in the request. // +// - initialNodeCount: Initial count of nodes in the node group. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *NodeGroupsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *NodeGroupsSetIamPolicyCall { - c := &NodeGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NodeGroupsService) Insert(project string, zone string, initialNodeCount int64, nodegroup *NodeGroup) *NodeGroupsInsertCall { + c := &NodeGroupsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - c.zonesetpolicyrequest = zonesetpolicyrequest + c.urlParams_.Set("initialNodeCount", fmt.Sprint(initialNodeCount)) + c.nodegroup = nodegroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeGroupsInsertCall) RequestId(requestId string) *NodeGroupsInsertCall { + 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 // details. -func (c *NodeGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *NodeGroupsSetIamPolicyCall { +func (c *NodeGroupsInsertCall) Fields(s ...googleapi.Field) *NodeGroupsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsSetIamPolicyCall) Context(ctx context.Context) *NodeGroupsSetIamPolicyCall { +func (c *NodeGroupsInsertCall) Context(ctx context.Context) *NodeGroupsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsSetIamPolicyCall) Header() http.Header { +func (c *NodeGroupsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *NodeGroupsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroup) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -50576,19 +50679,18 @@ func (c *NodeGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, erro } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.setIamPolicy" call. +// Do executes the "compute.nodeGroups.insert" call. // 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 +// *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 *NodeGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *NodeGroupsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50607,7 +50709,7 @@ func (c *NodeGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, 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, @@ -50620,99 +50722,165 @@ func (c *NodeGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, return ret, nil } -type NodeGroupsSetNodeTemplateCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupssetnodetemplaterequest *NodeGroupsSetNodeTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NodeGroupsListCall struct { + s *Service + project string + zone string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetNodeTemplate: Updates the node template of the node group. +// List: Retrieves a list of node groups available to the specified project. +// Note: use nodeGroups.listNodes for more details about each group. // -// - nodeGroup: Name of the NodeGroup resource to update. // - project: Project ID for this request. // - zone: The name of the zone for this request. -func (r *NodeGroupsService) SetNodeTemplate(project string, zone string, nodeGroup string, nodegroupssetnodetemplaterequest *NodeGroupsSetNodeTemplateRequest) *NodeGroupsSetNodeTemplateCall { - c := &NodeGroupsSetNodeTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NodeGroupsService) List(project string, zone string) *NodeGroupsListCall { + c := &NodeGroupsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.nodeGroup = nodeGroup - c.nodegroupssetnodetemplaterequest = nodegroupssetnodetemplaterequest return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeGroupsSetNodeTemplateCall) RequestId(requestId string) *NodeGroupsSetNodeTemplateCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *NodeGroupsListCall) Filter(filter string) *NodeGroupsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *NodeGroupsListCall) MaxResults(maxResults int64) *NodeGroupsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *NodeGroupsListCall) OrderBy(orderBy string) *NodeGroupsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *NodeGroupsListCall) PageToken(pageToken string) *NodeGroupsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *NodeGroupsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeGroupsSetNodeTemplateCall) Fields(s ...googleapi.Field) *NodeGroupsSetNodeTemplateCall { +func (c *NodeGroupsListCall) Fields(s ...googleapi.Field) *NodeGroupsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NodeGroupsListCall) IfNoneMatch(entityTag string) *NodeGroupsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsSetNodeTemplateCall) Context(ctx context.Context) *NodeGroupsSetNodeTemplateCall { +func (c *NodeGroupsListCall) Context(ctx context.Context) *NodeGroupsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsSetNodeTemplateCall) Header() http.Header { +func (c *NodeGroupsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } - return c.header_ -} - -func (c *NodeGroupsSetNodeTemplateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + return c.header_ +} + +func (c *NodeGroupsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroupssetnodetemplaterequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups") 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{ - "project": c.project, - "zone": c.zone, - "nodeGroup": c.nodeGroup, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.setNodeTemplate" call. +// Do executes the "compute.nodeGroups.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *NodeGroupList.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsSetNodeTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NodeGroupsListCall) Do(opts ...googleapi.CallOption) (*NodeGroupList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50731,7 +50899,7 @@ func (c *NodeGroupsSetNodeTemplateCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NodeGroupList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50744,81 +50912,157 @@ func (c *NodeGroupsSetNodeTemplateCall) Do(opts ...googleapi.CallOption) (*Opera return ret, nil } -type NodeGroupsSimulateMaintenanceEventCall struct { - s *Service - project string - zone string - nodeGroup string - nodegroupssimulatemaintenanceeventrequest *NodeGroupsSimulateMaintenanceEventRequest - 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 *NodeGroupsListCall) Pages(ctx context.Context, f func(*NodeGroupList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// SimulateMaintenanceEvent: Simulates maintenance event on specified nodes -// from the node group. +type NodeGroupsListNodesCall struct { + s *Service + project string + zone string + nodeGroup string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ListNodes: Lists nodes in the node group. // -// - nodeGroup: Name of the NodeGroup resource whose nodes will go under -// maintenance simulation. -// - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeGroupsService) SimulateMaintenanceEvent(project string, zone string, nodeGroup string, nodegroupssimulatemaintenanceeventrequest *NodeGroupsSimulateMaintenanceEventRequest) *NodeGroupsSimulateMaintenanceEventCall { - c := &NodeGroupsSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - nodeGroup: Name of the NodeGroup resource whose nodes you want to list. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *NodeGroupsService) ListNodes(project string, zone string, nodeGroup string) *NodeGroupsListNodesCall { + c := &NodeGroupsListNodesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone c.nodeGroup = nodeGroup - c.nodegroupssimulatemaintenanceeventrequest = nodegroupssimulatemaintenanceeventrequest return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeGroupsSimulateMaintenanceEventCall) RequestId(requestId string) *NodeGroupsSimulateMaintenanceEventCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *NodeGroupsListNodesCall) Filter(filter string) *NodeGroupsListNodesCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *NodeGroupsListNodesCall) MaxResults(maxResults int64) *NodeGroupsListNodesCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *NodeGroupsListNodesCall) OrderBy(orderBy string) *NodeGroupsListNodesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *NodeGroupsListNodesCall) PageToken(pageToken string) *NodeGroupsListNodesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *NodeGroupsListNodesCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeGroupsListNodesCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeGroupsSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *NodeGroupsSimulateMaintenanceEventCall { +func (c *NodeGroupsListNodesCall) Fields(s ...googleapi.Field) *NodeGroupsListNodesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsSimulateMaintenanceEventCall) Context(ctx context.Context) *NodeGroupsSimulateMaintenanceEventCall { +func (c *NodeGroupsListNodesCall) Context(ctx context.Context) *NodeGroupsListNodesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsSimulateMaintenanceEventCall) Header() http.Header { +func (c *NodeGroupsListNodesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *NodeGroupsListNodesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroupssimulatemaintenanceeventrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/listNodes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -50833,12 +51077,13 @@ func (c *NodeGroupsSimulateMaintenanceEventCall) doRequest(alt string) (*http.Re return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.simulateMaintenanceEvent" call. +// Do executes the "compute.nodeGroups.listNodes" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeGroupsSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *NodeGroupsListNodes.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *NodeGroupsListNodesCall) Do(opts ...googleapi.CallOption) (*NodeGroupsListNodes, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50857,7 +51102,7 @@ func (c *NodeGroupsSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NodeGroupsListNodes{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50870,86 +51115,120 @@ func (c *NodeGroupsSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption return ret, nil } -type NodeGroupsTestIamPermissionsCall struct { - s *Service - project string - zone string - resource string - testpermissionsrequest *TestPermissionsRequest - 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 *NodeGroupsListNodesCall) Pages(ctx context.Context, f func(*NodeGroupsListNodes) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +type NodeGroupsPatchCall struct { + s *Service + project string + zone string + nodeGroup string + nodegroup *NodeGroup + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified node group. // +// - nodeGroup: Name of the NodeGroup resource to update. // - project: Project ID for this request. -// - resource: Name or id of the resource for this request. // - zone: The name of the zone for this request. -func (r *NodeGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeGroupsTestIamPermissionsCall { - c := &NodeGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NodeGroupsService) Patch(project string, zone string, nodeGroup string, nodegroup *NodeGroup) *NodeGroupsPatchCall { + c := &NodeGroupsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.zone = zone - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.nodeGroup = nodeGroup + c.nodegroup = nodegroup + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeGroupsPatchCall) RequestId(requestId string) *NodeGroupsPatchCall { + 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 // details. -func (c *NodeGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NodeGroupsTestIamPermissionsCall { +func (c *NodeGroupsPatchCall) Fields(s ...googleapi.Field) *NodeGroupsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeGroupsTestIamPermissionsCall) Context(ctx context.Context) *NodeGroupsTestIamPermissionsCall { +func (c *NodeGroupsPatchCall) Context(ctx context.Context) *NodeGroupsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeGroupsTestIamPermissionsCall) Header() http.Header { +func (c *NodeGroupsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *NodeGroupsPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroup) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}") 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{ - "project": c.project, - "zone": c.zone, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "nodeGroup": c.nodeGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeGroups.testIamPermissions" call. +// Do executes the "compute.nodeGroups.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NodeGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *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 *NodeGroupsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -50968,7 +51247,7 @@ func (c *NodeGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Te if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -50981,184 +51260,100 @@ func (c *NodeGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*Te return ret, nil } -type NodeTemplatesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NodeGroupsPerformMaintenanceCall struct { + s *Service + project string + zone string + nodeGroup string + nodegroupsperformmaintenancerequest *NodeGroupsPerformMaintenanceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AggregatedList: Retrieves an aggregated list of node templates. To prevent -// failure, Google recommends that you set the `returnPartialSuccess` parameter -// to `true`. +// PerformMaintenance: Perform maintenance on a subset of nodes in the node +// group. // +// - nodeGroup: Name of the node group scoping this request. // - project: Project ID for this request. -func (r *NodeTemplatesService) AggregatedList(project string) *NodeTemplatesAggregatedListCall { - c := &NodeTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *NodeGroupsService) PerformMaintenance(project string, zone string, nodeGroup string, nodegroupsperformmaintenancerequest *NodeGroupsPerformMaintenanceRequest) *NodeGroupsPerformMaintenanceCall { + c := &NodeGroupsPerformMaintenanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.zone = zone + c.nodeGroup = nodeGroup + c.nodegroupsperformmaintenancerequest = nodegroupsperformmaintenancerequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *NodeTemplatesAggregatedListCall) Filter(filter string) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *NodeTemplatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTemplatesAggregatedListCall) MaxResults(maxResults int64) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *NodeTemplatesAggregatedListCall) OrderBy(orderBy string) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *NodeTemplatesAggregatedListCall) PageToken(pageToken string) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *NodeTemplatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *NodeTemplatesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeTemplatesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeGroupsPerformMaintenanceCall) RequestId(requestId string) *NodeGroupsPerformMaintenanceCall { + 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 // details. -func (c *NodeTemplatesAggregatedListCall) Fields(s ...googleapi.Field) *NodeTemplatesAggregatedListCall { +func (c *NodeGroupsPerformMaintenanceCall) Fields(s ...googleapi.Field) *NodeGroupsPerformMaintenanceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NodeTemplatesAggregatedListCall) IfNoneMatch(entityTag string) *NodeTemplatesAggregatedListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesAggregatedListCall) Context(ctx context.Context) *NodeTemplatesAggregatedListCall { +func (c *NodeGroupsPerformMaintenanceCall) Context(ctx context.Context) *NodeGroupsPerformMaintenanceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeTemplatesAggregatedListCall) Header() http.Header { +func (c *NodeGroupsPerformMaintenanceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *NodeGroupsPerformMaintenanceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroupsperformmaintenancerequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/performMaintenance") 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{ - "project": c.project, + "project": c.project, + "zone": c.zone, + "nodeGroup": c.nodeGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeTemplates.aggregatedList" call. +// Do executes the "compute.nodeGroups.performMaintenance" call. // Any non-2xx status code is an error. Response headers are in either -// *NodeTemplateAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NodeTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTemplateAggregatedList, error) { +// *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 *NodeGroupsPerformMaintenanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51177,7 +51372,7 @@ func (c *NodeTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Nod if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NodeTemplateAggregatedList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51189,115 +51384,86 @@ func (c *NodeTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*Nod } return ret, nil } - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NodeTemplatesAggregatedListCall) Pages(ctx context.Context, f func(*NodeTemplateAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type NodeTemplatesDeleteCall struct { - s *Service - project string - region string - nodeTemplate string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header + +type NodeGroupsSetIamPolicyCall struct { + s *Service + project string + zone string + resource string + zonesetpolicyrequest *ZoneSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified NodeTemplate resource. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. // -// - nodeTemplate: Name of the NodeTemplate resource to delete. // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) Delete(project string, region string, nodeTemplate string) *NodeTemplatesDeleteCall { - c := &NodeTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *NodeGroupsService) SetIamPolicy(project string, zone string, resource string, zonesetpolicyrequest *ZoneSetPolicyRequest) *NodeGroupsSetIamPolicyCall { + c := &NodeGroupsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.nodeTemplate = nodeTemplate - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeTemplatesDeleteCall) RequestId(requestId string) *NodeTemplatesDeleteCall { - c.urlParams_.Set("requestId", requestId) + c.zone = zone + c.resource = resource + c.zonesetpolicyrequest = zonesetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeTemplatesDeleteCall) Fields(s ...googleapi.Field) *NodeTemplatesDeleteCall { +func (c *NodeGroupsSetIamPolicyCall) Fields(s ...googleapi.Field) *NodeGroupsSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesDeleteCall) Context(ctx context.Context) *NodeTemplatesDeleteCall { +func (c *NodeGroupsSetIamPolicyCall) Context(ctx context.Context) *NodeGroupsSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeTemplatesDeleteCall) Header() http.Header { +func (c *NodeGroupsSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *NodeGroupsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.zonesetpolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{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{ - "project": c.project, - "region": c.region, - "nodeTemplate": c.nodeTemplate, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeTemplates.delete" call. +// Do executes the "compute.nodeGroups.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *NodeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NodeGroupsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51316,7 +51482,7 @@ func (c *NodeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, 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, @@ -51329,90 +51495,99 @@ func (c *NodeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type NodeTemplatesGetCall struct { - s *Service - project string - region string - nodeTemplate string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NodeGroupsSetNodeTemplateCall struct { + s *Service + project string + zone string + nodeGroup string + nodegroupssetnodetemplaterequest *NodeGroupsSetNodeTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified node template. +// SetNodeTemplate: Updates the node template of the node group. // -// - nodeTemplate: Name of the node template to return. +// - nodeGroup: Name of the NodeGroup resource to update. // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) Get(project string, region string, nodeTemplate string) *NodeTemplatesGetCall { - c := &NodeTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *NodeGroupsService) SetNodeTemplate(project string, zone string, nodeGroup string, nodegroupssetnodetemplaterequest *NodeGroupsSetNodeTemplateRequest) *NodeGroupsSetNodeTemplateCall { + c := &NodeGroupsSetNodeTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.nodeTemplate = nodeTemplate + c.zone = zone + c.nodeGroup = nodeGroup + c.nodegroupssetnodetemplaterequest = nodegroupssetnodetemplaterequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeGroupsSetNodeTemplateCall) RequestId(requestId string) *NodeGroupsSetNodeTemplateCall { + 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 // details. -func (c *NodeTemplatesGetCall) Fields(s ...googleapi.Field) *NodeTemplatesGetCall { +func (c *NodeGroupsSetNodeTemplateCall) Fields(s ...googleapi.Field) *NodeGroupsSetNodeTemplateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NodeTemplatesGetCall) IfNoneMatch(entityTag string) *NodeTemplatesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesGetCall) Context(ctx context.Context) *NodeTemplatesGetCall { +func (c *NodeGroupsSetNodeTemplateCall) Context(ctx context.Context) *NodeGroupsSetNodeTemplateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeTemplatesGetCall) Header() http.Header { +func (c *NodeGroupsSetNodeTemplateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeTemplatesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *NodeGroupsSetNodeTemplateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroupssetnodetemplaterequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/setNodeTemplate") 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{ - "project": c.project, - "region": c.region, - "nodeTemplate": c.nodeTemplate, + "project": c.project, + "zone": c.zone, + "nodeGroup": c.nodeGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeTemplates.get" call. +// Do executes the "compute.nodeGroups.setNodeTemplate" call. // Any non-2xx status code is an error. Response headers are in either -// *NodeTemplate.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *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 *NodeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*NodeTemplate, error) { +func (c *NodeGroupsSetNodeTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51431,7 +51606,7 @@ func (c *NodeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*NodeTemplate, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NodeTemplate{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51444,98 +51619,101 @@ func (c *NodeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*NodeTemplate, return ret, nil } -type NodeTemplatesGetIamPolicyCall struct { - s *Service - project string - region string - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NodeGroupsSimulateMaintenanceEventCall struct { + s *Service + project string + zone string + nodeGroup string + nodegroupssimulatemaintenanceeventrequest *NodeGroupsSimulateMaintenanceEventRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// SimulateMaintenanceEvent: Simulates maintenance event on specified nodes +// from the node group. // -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NodeTemplatesService) GetIamPolicy(project string, region string, resource string) *NodeTemplatesGetIamPolicyCall { - c := &NodeTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - nodeGroup: Name of the NodeGroup resource whose nodes will go under +// maintenance simulation. +// - project: Project ID for this request. +// - zone: The name of the zone for this request. +func (r *NodeGroupsService) SimulateMaintenanceEvent(project string, zone string, nodeGroup string, nodegroupssimulatemaintenanceeventrequest *NodeGroupsSimulateMaintenanceEventRequest) *NodeGroupsSimulateMaintenanceEventCall { + c := &NodeGroupsSimulateMaintenanceEventCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource + c.zone = zone + c.nodeGroup = nodeGroup + c.nodegroupssimulatemaintenanceeventrequest = nodegroupssimulatemaintenanceeventrequest return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *NodeTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeTemplatesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeGroupsSimulateMaintenanceEventCall) RequestId(requestId string) *NodeGroupsSimulateMaintenanceEventCall { + 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 // details. -func (c *NodeTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *NodeTemplatesGetIamPolicyCall { +func (c *NodeGroupsSimulateMaintenanceEventCall) Fields(s ...googleapi.Field) *NodeGroupsSimulateMaintenanceEventCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NodeTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *NodeTemplatesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesGetIamPolicyCall) Context(ctx context.Context) *NodeTemplatesGetIamPolicyCall { +func (c *NodeGroupsSimulateMaintenanceEventCall) Context(ctx context.Context) *NodeGroupsSimulateMaintenanceEventCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeTemplatesGetIamPolicyCall) Header() http.Header { +func (c *NodeGroupsSimulateMaintenanceEventCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *NodeGroupsSimulateMaintenanceEventCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodegroupssimulatemaintenanceeventrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{nodeGroup}/simulateMaintenanceEvent") 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "zone": c.zone, + "nodeGroup": c.nodeGroup, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeTemplates.getIamPolicy" call. +// Do executes the "compute.nodeGroups.simulateMaintenanceEvent" call. // 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 +// *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 *NodeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *NodeGroupsSimulateMaintenanceEventCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51554,7 +51732,7 @@ func (c *NodeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic 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, @@ -51567,77 +51745,65 @@ func (c *NodeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic return ret, nil } -type NodeTemplatesInsertCall struct { - s *Service - project string - region string - nodetemplate *NodeTemplate - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NodeGroupsTestIamPermissionsCall struct { + s *Service + project string + zone string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a NodeTemplate resource in the specified project using the -// data included in the request. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) Insert(project string, region string, nodetemplate *NodeTemplate) *NodeTemplatesInsertCall { - c := &NodeTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +// - zone: The name of the zone for this request. +func (r *NodeGroupsService) TestIamPermissions(project string, zone string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeGroupsTestIamPermissionsCall { + c := &NodeGroupsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.nodetemplate = nodetemplate - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeTemplatesInsertCall) RequestId(requestId string) *NodeTemplatesInsertCall { - c.urlParams_.Set("requestId", requestId) + c.zone = zone + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeTemplatesInsertCall) Fields(s ...googleapi.Field) *NodeTemplatesInsertCall { +func (c *NodeGroupsTestIamPermissionsCall) Fields(s ...googleapi.Field) *NodeGroupsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesInsertCall) Context(ctx context.Context) *NodeTemplatesInsertCall { +func (c *NodeGroupsTestIamPermissionsCall) Context(ctx context.Context) *NodeGroupsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeTemplatesInsertCall) Header() http.Header { +func (c *NodeGroupsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *NodeGroupsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodetemplate) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeGroups/{resource}/testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -51645,18 +51811,20 @@ func (c *NodeTemplatesInsertCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "zone": c.zone, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeTemplates.insert" call. +// Do executes the "compute.nodeGroups.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *NodeTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NodeGroupsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51675,7 +51843,7 @@ func (c *NodeTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -51688,24 +51856,23 @@ func (c *NodeTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type NodeTemplatesListCall struct { +type NodeTemplatesAggregatedListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of node templates available to the specified project. +// AggregatedList: Retrieves an aggregated list of node templates. To prevent +// failure, Google recommends that you set the `returnPartialSuccess` parameter +// to `true`. // // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *NodeTemplatesService) List(project string, region string) *NodeTemplatesListCall { - c := &NodeTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NodeTemplatesService) AggregatedList(project string) *NodeTemplatesAggregatedListCall { + c := &NodeTemplatesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -51741,17 +51908,30 @@ func (r *NodeTemplatesService) List(project string, region string) *NodeTemplate // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *NodeTemplatesListCall) Filter(filter string) *NodeTemplatesListCall { +func (c *NodeTemplatesAggregatedListCall) Filter(filter string) *NodeTemplatesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *NodeTemplatesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeTemplatesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTemplatesListCall) MaxResults(maxResults int64) *NodeTemplatesListCall { +func (c *NodeTemplatesAggregatedListCall) MaxResults(maxResults int64) *NodeTemplatesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -51764,7 +51944,7 @@ func (c *NodeTemplatesListCall) MaxResults(maxResults int64) *NodeTemplatesListC // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *NodeTemplatesListCall) OrderBy(orderBy string) *NodeTemplatesListCall { +func (c *NodeTemplatesAggregatedListCall) OrderBy(orderBy string) *NodeTemplatesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -51772,7 +51952,7 @@ func (c *NodeTemplatesListCall) OrderBy(orderBy string) *NodeTemplatesListCall { // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *NodeTemplatesListCall) PageToken(pageToken string) *NodeTemplatesListCall { +func (c *NodeTemplatesAggregatedListCall) PageToken(pageToken string) *NodeTemplatesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -51782,202 +51962,78 @@ func (c *NodeTemplatesListCall) PageToken(pageToken string) *NodeTemplatesListCa // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *NodeTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTemplatesListCall { +func (c *NodeTemplatesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTemplatesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTemplatesListCall) Fields(s ...googleapi.Field) *NodeTemplatesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NodeTemplatesListCall) IfNoneMatch(entityTag string) *NodeTemplatesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesListCall) Context(ctx context.Context) *NodeTemplatesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *NodeTemplatesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *NodeTemplatesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.nodeTemplates.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *NodeTemplateList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *NodeTemplatesListCall) Do(opts ...googleapi.CallOption) (*NodeTemplateList, 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 := &NodeTemplateList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NodeTemplatesListCall) Pages(ctx context.Context, f func(*NodeTemplateList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type NodeTemplatesSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NodeTemplatesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NodeTemplatesSetIamPolicyCall { - c := &NodeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *NodeTemplatesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeTemplatesAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *NodeTemplatesSetIamPolicyCall { +func (c *NodeTemplatesAggregatedListCall) Fields(s ...googleapi.Field) *NodeTemplatesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NodeTemplatesAggregatedListCall) IfNoneMatch(entityTag string) *NodeTemplatesAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesSetIamPolicyCall) Context(ctx context.Context) *NodeTemplatesSetIamPolicyCall { +func (c *NodeTemplatesAggregatedListCall) Context(ctx context.Context) *NodeTemplatesAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeTemplatesSetIamPolicyCall) Header() http.Header { +func (c *NodeTemplatesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) - if err != nil { - return nil, err +func (c *NodeTemplatesAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeTemplates") 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeTemplates.setIamPolicy" call. +// Do executes the "compute.nodeTemplates.aggregatedList" call. // 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 *NodeTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *NodeTemplateAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NodeTemplatesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTemplateAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -51996,7 +52052,7 @@ func (c *NodeTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &NodeTemplateAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52009,86 +52065,114 @@ func (c *NodeTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Polic return ret, nil } -type NodeTemplatesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - 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 *NodeTemplatesAggregatedListCall) Pages(ctx context.Context, f func(*NodeTemplateAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +type NodeTemplatesDeleteCall struct { + s *Service + project string + region string + nodeTemplate string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified NodeTemplate resource. // +// - nodeTemplate: Name of the NodeTemplate resource to delete. // - project: Project ID for this request. // - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *NodeTemplatesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeTemplatesTestIamPermissionsCall { - c := &NodeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NodeTemplatesService) Delete(project string, region string, nodeTemplate string) *NodeTemplatesDeleteCall { + c := &NodeTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.nodeTemplate = nodeTemplate + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeTemplatesDeleteCall) RequestId(requestId string) *NodeTemplatesDeleteCall { + 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 // details. -func (c *NodeTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *NodeTemplatesTestIamPermissionsCall { +func (c *NodeTemplatesDeleteCall) Fields(s ...googleapi.Field) *NodeTemplatesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeTemplatesTestIamPermissionsCall) Context(ctx context.Context) *NodeTemplatesTestIamPermissionsCall { +func (c *NodeTemplatesDeleteCall) Context(ctx context.Context) *NodeTemplatesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeTemplatesTestIamPermissionsCall) Header() http.Header { +func (c *NodeTemplatesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *NodeTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}") 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "nodeTemplate": c.nodeTemplate, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeTemplates.testIamPermissions" call. +// Do executes the "compute.nodeTemplates.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *NodeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *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 *NodeTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52107,7 +52191,7 @@ func (c *NodeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52116,133 +52200,38 @@ func (c *NodeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) ( target := &ret if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err - } - return ret, nil -} - -type NodeTypesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// AggregatedList: Retrieves an aggregated list of node types. To prevent -// failure, Google recommends that you set the `returnPartialSuccess` parameter -// to `true`. -// -// - project: Project ID for this request. -func (r *NodeTypesService) AggregatedList(project string) *NodeTypesAggregatedListCall { - c := &NodeTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *NodeTypesAggregatedListCall) Filter(filter string) *NodeTypesAggregatedListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *NodeTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeTypesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTypesAggregatedListCall) MaxResults(maxResults int64) *NodeTypesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *NodeTypesAggregatedListCall) OrderBy(orderBy string) *NodeTypesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *NodeTypesAggregatedListCall) PageToken(pageToken string) *NodeTypesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c + } + return ret, nil } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *NodeTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTypesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c +type NodeTemplatesGetCall struct { + s *Service + project string + region string + nodeTemplate string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *NodeTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeTypesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) +// Get: Returns the specified node template. +// +// - nodeTemplate: Name of the node template to return. +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *NodeTemplatesService) Get(project string, region string, nodeTemplate string) *NodeTemplatesGetCall { + c := &NodeTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.nodeTemplate = nodeTemplate return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *NodeTypesAggregatedListCall) Fields(s ...googleapi.Field) *NodeTypesAggregatedListCall { +func (c *NodeTemplatesGetCall) Fields(s ...googleapi.Field) *NodeTemplatesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -52250,27 +52239,27 @@ func (c *NodeTypesAggregatedListCall) Fields(s ...googleapi.Field) *NodeTypesAgg // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NodeTypesAggregatedListCall) IfNoneMatch(entityTag string) *NodeTypesAggregatedListCall { +func (c *NodeTemplatesGetCall) IfNoneMatch(entityTag string) *NodeTemplatesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NodeTypesAggregatedListCall) Context(ctx context.Context) *NodeTypesAggregatedListCall { +func (c *NodeTemplatesGetCall) Context(ctx context.Context) *NodeTemplatesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeTypesAggregatedListCall) Header() http.Header { +func (c *NodeTemplatesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *NodeTemplatesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -52278,7 +52267,7 @@ func (c *NodeTypesAggregatedListCall) doRequest(alt string) (*http.Response, err var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{nodeTemplate}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -52286,18 +52275,19 @@ func (c *NodeTypesAggregatedListCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "region": c.region, + "nodeTemplate": c.nodeTemplate, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeTypes.aggregatedList" call. +// Do executes the "compute.nodeTemplates.get" call. // Any non-2xx status code is an error. Response headers are in either -// *NodeTypeAggregatedList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *NodeTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTypeAggregatedList, error) { +// *NodeTemplate.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *NodeTemplatesGetCall) Do(opts ...googleapi.CallOption) (*NodeTemplate, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52316,7 +52306,7 @@ func (c *NodeTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTyp if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NodeTypeAggregatedList{ + ret := &NodeTemplate{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52329,55 +52319,42 @@ func (c *NodeTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTyp return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NodeTypesAggregatedListCall) Pages(ctx context.Context, f func(*NodeTypeAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type NodeTypesGetCall struct { +type NodeTemplatesGetIamPolicyCall struct { s *Service project string - zone string - nodeType string + region string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified node type. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. // -// - nodeType: Name of the node type to return. // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeTypesService) Get(project string, zone string, nodeType string) *NodeTypesGetCall { - c := &NodeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *NodeTemplatesService) GetIamPolicy(project string, region string, resource string) *NodeTemplatesGetIamPolicyCall { + c := &NodeTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - c.nodeType = nodeType + c.region = region + c.resource = resource + return c +} + +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *NodeTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *NodeTemplatesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 // details. -func (c *NodeTypesGetCall) Fields(s ...googleapi.Field) *NodeTypesGetCall { +func (c *NodeTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *NodeTemplatesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -52385,27 +52362,27 @@ func (c *NodeTypesGetCall) Fields(s ...googleapi.Field) *NodeTypesGetCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *NodeTypesGetCall) IfNoneMatch(entityTag string) *NodeTypesGetCall { +func (c *NodeTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *NodeTemplatesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *NodeTypesGetCall) Context(ctx context.Context) *NodeTypesGetCall { +func (c *NodeTemplatesGetIamPolicyCall) Context(ctx context.Context) *NodeTemplatesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeTypesGetCall) Header() http.Header { +func (c *NodeTemplatesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeTypesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *NodeTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -52413,7 +52390,7 @@ func (c *NodeTypesGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeTypes/{nodeType}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{resource}/getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -52422,18 +52399,18 @@ func (c *NodeTypesGetCall) doRequest(alt string) (*http.Response, error) { req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "zone": c.zone, - "nodeType": c.nodeType, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeTypes.get" call. +// Do executes the "compute.nodeTemplates.getIamPolicy" call. // 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 +// *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 *NodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, error) { +func (c *NodeTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52452,7 +52429,7 @@ func (c *NodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NodeType{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52465,164 +52442,96 @@ func (c *NodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, error) { return ret, nil } -type NodeTypesListCall struct { +type NodeTemplatesInsertCall struct { s *Service project string - zone string + region string + nodetemplate *NodeTemplate urlParams_ gensupport.URLParams - ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of node types available to the specified project. +// Insert: Creates a NodeTemplate resource in the specified project using the +// data included in the request. // // - project: Project ID for this request. -// - zone: The name of the zone for this request. -func (r *NodeTypesService) List(project string, zone string) *NodeTypesListCall { - c := &NodeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *NodeTemplatesService) Insert(project string, region string, nodetemplate *NodeTemplate) *NodeTemplatesInsertCall { + c := &NodeTemplatesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.zone = zone - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *NodeTypesListCall) Filter(filter string) *NodeTypesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *NodeTypesListCall) MaxResults(maxResults int64) *NodeTypesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *NodeTypesListCall) OrderBy(orderBy string) *NodeTypesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *NodeTypesListCall) PageToken(pageToken string) *NodeTypesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *NodeTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTypesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.region = region + c.nodetemplate = nodetemplate return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *NodeTypesListCall) Fields(s ...googleapi.Field) *NodeTypesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *NodeTemplatesInsertCall) RequestId(requestId string) *NodeTemplatesInsertCall { + c.urlParams_.Set("requestId", requestId) return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *NodeTypesListCall) IfNoneMatch(entityTag string) *NodeTypesListCall { - c.ifNoneMatch_ = entityTag +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *NodeTemplatesInsertCall) Fields(s ...googleapi.Field) *NodeTemplatesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *NodeTypesListCall) Context(ctx context.Context) *NodeTypesListCall { +func (c *NodeTemplatesInsertCall) Context(ctx context.Context) *NodeTemplatesInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *NodeTypesListCall) Header() http.Header { +func (c *NodeTemplatesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *NodeTypesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *NodeTemplatesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.nodetemplate) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates") 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{ "project": c.project, - "zone": c.zone, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.nodeTypes.list" call. +// Do executes the "compute.nodeTemplates.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *NodeTypeList.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *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 *NodeTypesListCall) Do(opts ...googleapi.CallOption) (*NodeTypeList, error) { +func (c *NodeTemplatesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52641,7 +52550,7 @@ func (c *NodeTypesListCall) Do(opts ...googleapi.CallOption) (*NodeTypeList, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &NodeTypeList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52654,44 +52563,24 @@ func (c *NodeTypesListCall) Do(opts ...googleapi.CallOption) (*NodeTypeList, err return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *NodeTypesListCall) Pages(ctx context.Context, f func(*NodeTypeList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type PacketMirroringsAggregatedListCall struct { +type NodeTemplatesListCall struct { s *Service project string + region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of packetMirrorings. To prevent -// failure, Google recommends that you set the `returnPartialSuccess` parameter -// to `true`. +// List: Retrieves a list of node templates available to the specified project. // // - project: Project ID for this request. -func (r *PacketMirroringsService) AggregatedList(project string) *PacketMirroringsAggregatedListCall { - c := &PacketMirroringsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *NodeTemplatesService) List(project string, region string) *NodeTemplatesListCall { + c := &NodeTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region return c } @@ -52727,30 +52616,17 @@ func (r *PacketMirroringsService) AggregatedList(project string) *PacketMirrorin // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *PacketMirroringsAggregatedListCall) Filter(filter string) *PacketMirroringsAggregatedListCall { +func (c *NodeTemplatesListCall) Filter(filter string) *NodeTemplatesListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *PacketMirroringsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *PacketMirroringsAggregatedListCall) MaxResults(maxResults int64) *PacketMirroringsAggregatedListCall { +func (c *NodeTemplatesListCall) MaxResults(maxResults int64) *NodeTemplatesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -52763,7 +52639,7 @@ func (c *PacketMirroringsAggregatedListCall) MaxResults(maxResults int64) *Packe // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *PacketMirroringsAggregatedListCall) OrderBy(orderBy string) *PacketMirroringsAggregatedListCall { +func (c *NodeTemplatesListCall) OrderBy(orderBy string) *NodeTemplatesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -52771,7 +52647,7 @@ func (c *PacketMirroringsAggregatedListCall) OrderBy(orderBy string) *PacketMirr // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *PacketMirroringsAggregatedListCall) PageToken(pageToken string) *PacketMirroringsAggregatedListCall { +func (c *NodeTemplatesListCall) PageToken(pageToken string) *NodeTemplatesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -52781,23 +52657,15 @@ func (c *PacketMirroringsAggregatedListCall) PageToken(pageToken string) *Packet // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *PacketMirroringsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PacketMirroringsAggregatedListCall { +func (c *NodeTemplatesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTemplatesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *PacketMirroringsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *PacketMirroringsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PacketMirroringsAggregatedListCall) Fields(s ...googleapi.Field) *PacketMirroringsAggregatedListCall { +func (c *NodeTemplatesListCall) Fields(s ...googleapi.Field) *NodeTemplatesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -52805,27 +52673,27 @@ func (c *PacketMirroringsAggregatedListCall) Fields(s ...googleapi.Field) *Packe // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *PacketMirroringsAggregatedListCall) IfNoneMatch(entityTag string) *PacketMirroringsAggregatedListCall { +func (c *NodeTemplatesListCall) IfNoneMatch(entityTag string) *NodeTemplatesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsAggregatedListCall) Context(ctx context.Context) *PacketMirroringsAggregatedListCall { +func (c *NodeTemplatesListCall) Context(ctx context.Context) *NodeTemplatesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PacketMirroringsAggregatedListCall) Header() http.Header { +func (c *NodeTemplatesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PacketMirroringsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *NodeTemplatesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -52833,7 +52701,7 @@ func (c *PacketMirroringsAggregatedListCall) 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, "projects/{project}/aggregated/packetMirrorings") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -52842,17 +52710,18 @@ func (c *PacketMirroringsAggregatedListCall) doRequest(alt string) (*http.Respon req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.packetMirrorings.aggregatedList" call. +// Do executes the "compute.nodeTemplates.list" call. // Any non-2xx status code is an error. Response headers are in either -// *PacketMirroringAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *PacketMirroringsAggregatedListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringAggregatedList, error) { +// *NodeTemplateList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *NodeTemplatesListCall) Do(opts ...googleapi.CallOption) (*NodeTemplateList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -52871,7 +52740,7 @@ func (c *PacketMirroringsAggregatedListCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PacketMirroringAggregatedList{ + ret := &NodeTemplateList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -52887,7 +52756,7 @@ func (c *PacketMirroringsAggregatedListCall) 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 *PacketMirroringsAggregatedListCall) Pages(ctx context.Context, f func(*PacketMirroringAggregatedList) error) error { +func (c *NodeTemplatesListCall) Pages(ctx context.Context, f func(*NodeTemplateList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -52905,93 +52774,196 @@ func (c *PacketMirroringsAggregatedListCall) Pages(ctx context.Context, f func(* } } -type PacketMirroringsDeleteCall struct { - s *Service - project string - region string - packetMirroring string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type NodeTemplatesSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. +// +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *NodeTemplatesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *NodeTemplatesSetIamPolicyCall { + c := &NodeTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *NodeTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *NodeTemplatesSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *NodeTemplatesSetIamPolicyCall) Context(ctx context.Context) *NodeTemplatesSetIamPolicyCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *NodeTemplatesSetIamPolicyCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *NodeTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{resource}/setIamPolicy") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.nodeTemplates.setIamPolicy" call. +// 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 *NodeTemplatesSetIamPolicyCall) 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 +} + +type NodeTemplatesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified PacketMirroring resource. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // -// - packetMirroring: Name of the PacketMirroring resource to delete. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Delete(project string, region string, packetMirroring string) *PacketMirroringsDeleteCall { - c := &PacketMirroringsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *NodeTemplatesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *NodeTemplatesTestIamPermissionsCall { + c := &NodeTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.packetMirroring = packetMirroring - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *PacketMirroringsDeleteCall) RequestId(requestId string) *PacketMirroringsDeleteCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PacketMirroringsDeleteCall) Fields(s ...googleapi.Field) *PacketMirroringsDeleteCall { +func (c *NodeTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *NodeTemplatesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsDeleteCall) Context(ctx context.Context) *PacketMirroringsDeleteCall { +func (c *NodeTemplatesTestIamPermissionsCall) Context(ctx context.Context) *NodeTemplatesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PacketMirroringsDeleteCall) Header() http.Header { +func (c *NodeTemplatesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PacketMirroringsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *NodeTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/nodeTemplates/{resource}/testIamPermissions") 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{ - "project": c.project, - "region": c.region, - "packetMirroring": c.packetMirroring, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.packetMirrorings.delete" call. +// Do executes the "compute.nodeTemplates.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PacketMirroringsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *NodeTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53010,7 +52982,7 @@ func (c *PacketMirroringsDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -53023,34 +52995,129 @@ func (c *PacketMirroringsDeleteCall) Do(opts ...googleapi.CallOption) (*Operatio return ret, nil } -type PacketMirroringsGetCall struct { - s *Service - project string - region string - packetMirroring string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type NodeTypesAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified PacketMirroring resource. +// AggregatedList: Retrieves an aggregated list of node types. To prevent +// failure, Google recommends that you set the `returnPartialSuccess` parameter +// to `true`. // -// - packetMirroring: Name of the PacketMirroring resource to return. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Get(project string, region string, packetMirroring string) *PacketMirroringsGetCall { - c := &PacketMirroringsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *NodeTypesService) AggregatedList(project string) *NodeTypesAggregatedListCall { + c := &NodeTypesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.packetMirroring = packetMirroring + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *NodeTypesAggregatedListCall) Filter(filter string) *NodeTypesAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *NodeTypesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *NodeTypesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *NodeTypesAggregatedListCall) MaxResults(maxResults int64) *NodeTypesAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *NodeTypesAggregatedListCall) OrderBy(orderBy string) *NodeTypesAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *NodeTypesAggregatedListCall) PageToken(pageToken string) *NodeTypesAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *NodeTypesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTypesAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *NodeTypesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *NodeTypesAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PacketMirroringsGetCall) Fields(s ...googleapi.Field) *PacketMirroringsGetCall { +func (c *NodeTypesAggregatedListCall) Fields(s ...googleapi.Field) *NodeTypesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -53058,27 +53125,27 @@ func (c *PacketMirroringsGetCall) Fields(s ...googleapi.Field) *PacketMirrorings // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *PacketMirroringsGetCall) IfNoneMatch(entityTag string) *PacketMirroringsGetCall { +func (c *NodeTypesAggregatedListCall) IfNoneMatch(entityTag string) *NodeTypesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsGetCall) Context(ctx context.Context) *PacketMirroringsGetCall { +func (c *NodeTypesAggregatedListCall) Context(ctx context.Context) *NodeTypesAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PacketMirroringsGetCall) Header() http.Header { +func (c *NodeTypesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PacketMirroringsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *NodeTypesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -53086,7 +53153,7 @@ func (c *PacketMirroringsGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/nodeTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -53094,20 +53161,18 @@ func (c *PacketMirroringsGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "packetMirroring": c.packetMirroring, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.packetMirrorings.get" call. +// Do executes the "compute.nodeTypes.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *PacketMirroring.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// *NodeTypeAggregatedList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to // check whether the returned error was because http.StatusNotModified was // returned. -func (c *PacketMirroringsGetCall) Do(opts ...googleapi.CallOption) (*PacketMirroring, error) { +func (c *NodeTypesAggregatedListCall) Do(opts ...googleapi.CallOption) (*NodeTypeAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53126,7 +53191,7 @@ func (c *PacketMirroringsGetCall) Do(opts ...googleapi.CallOption) (*PacketMirro if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PacketMirroring{ + ret := &NodeTypeAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -53139,96 +53204,111 @@ func (c *PacketMirroringsGetCall) Do(opts ...googleapi.CallOption) (*PacketMirro return ret, nil } -type PacketMirroringsInsertCall struct { - s *Service - project string - region string - packetmirroring *PacketMirroring - 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 *NodeTypesAggregatedListCall) Pages(ctx context.Context, f func(*NodeTypeAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type NodeTypesGetCall struct { + s *Service + project string + zone string + nodeType string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Creates a PacketMirroring resource in the specified project and -// region using the data included in the request. +// Get: Returns the specified node type. // +// - nodeType: Name of the node type to return. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Insert(project string, region string, packetmirroring *PacketMirroring) *PacketMirroringsInsertCall { - c := &PacketMirroringsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *NodeTypesService) Get(project string, zone string, nodeType string) *NodeTypesGetCall { + c := &NodeTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.packetmirroring = packetmirroring - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *PacketMirroringsInsertCall) RequestId(requestId string) *PacketMirroringsInsertCall { - c.urlParams_.Set("requestId", requestId) + c.zone = zone + c.nodeType = nodeType return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PacketMirroringsInsertCall) Fields(s ...googleapi.Field) *PacketMirroringsInsertCall { +func (c *NodeTypesGetCall) Fields(s ...googleapi.Field) *NodeTypesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NodeTypesGetCall) IfNoneMatch(entityTag string) *NodeTypesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsInsertCall) Context(ctx context.Context) *PacketMirroringsInsertCall { +func (c *NodeTypesGetCall) Context(ctx context.Context) *NodeTypesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PacketMirroringsInsertCall) Header() http.Header { +func (c *NodeTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PacketMirroringsInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.packetmirroring) - if err != nil { - return nil, err +func (c *NodeTypesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeTypes/{nodeType}") 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{ - "project": c.project, - "region": c.region, + "project": c.project, + "zone": c.zone, + "nodeType": c.nodeType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.packetMirrorings.insert" call. +// Do executes the "compute.nodeTypes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *PacketMirroringsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NodeTypesGetCall) Do(opts ...googleapi.CallOption) (*NodeType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53247,7 +53327,7 @@ func (c *PacketMirroringsInsertCall) Do(opts ...googleapi.CallOption) (*Operatio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NodeType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -53260,25 +53340,24 @@ func (c *PacketMirroringsInsertCall) Do(opts ...googleapi.CallOption) (*Operatio return ret, nil } -type PacketMirroringsListCall struct { +type NodeTypesListCall struct { s *Service project string - region string + zone string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of PacketMirroring resources available to the -// specified project and region. +// List: Retrieves a list of node types available to the specified project. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) List(project string, region string) *PacketMirroringsListCall { - c := &PacketMirroringsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - zone: The name of the zone for this request. +func (r *NodeTypesService) List(project string, zone string) *NodeTypesListCall { + c := &NodeTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region + c.zone = zone return c } @@ -53314,7 +53393,7 @@ func (r *PacketMirroringsService) List(project string, region string) *PacketMir // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *PacketMirroringsListCall) Filter(filter string) *PacketMirroringsListCall { +func (c *NodeTypesListCall) Filter(filter string) *NodeTypesListCall { c.urlParams_.Set("filter", filter) return c } @@ -53324,7 +53403,7 @@ func (c *PacketMirroringsListCall) Filter(filter string) *PacketMirroringsListCa // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *PacketMirroringsListCall) MaxResults(maxResults int64) *PacketMirroringsListCall { +func (c *NodeTypesListCall) MaxResults(maxResults int64) *NodeTypesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -53337,7 +53416,7 @@ func (c *PacketMirroringsListCall) MaxResults(maxResults int64) *PacketMirroring // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *PacketMirroringsListCall) OrderBy(orderBy string) *PacketMirroringsListCall { +func (c *NodeTypesListCall) OrderBy(orderBy string) *NodeTypesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -53345,7 +53424,7 @@ func (c *PacketMirroringsListCall) OrderBy(orderBy string) *PacketMirroringsList // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *PacketMirroringsListCall) PageToken(pageToken string) *PacketMirroringsListCall { +func (c *NodeTypesListCall) PageToken(pageToken string) *NodeTypesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -53355,7 +53434,7 @@ func (c *PacketMirroringsListCall) PageToken(pageToken string) *PacketMirrorings // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *PacketMirroringsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PacketMirroringsListCall { +func (c *NodeTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *NodeTypesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -53363,210 +53442,62 @@ func (c *PacketMirroringsListCall) ReturnPartialSuccess(returnPartialSuccess boo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PacketMirroringsListCall) Fields(s ...googleapi.Field) *PacketMirroringsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *PacketMirroringsListCall) IfNoneMatch(entityTag string) *PacketMirroringsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsListCall) Context(ctx context.Context) *PacketMirroringsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PacketMirroringsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PacketMirroringsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.packetMirrorings.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PacketMirroringList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *PacketMirroringsListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringList, 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 := &PacketMirroringList{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *PacketMirroringsListCall) Pages(ctx context.Context, f func(*PacketMirroringList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type PacketMirroringsPatchCall struct { - s *Service - project string - region string - packetMirroring string - packetmirroring *PacketMirroring - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified PacketMirroring resource with the data included -// in the request. This method supports PATCH semantics and uses JSON merge -// patch format and processing rules. -// -// - packetMirroring: Name of the PacketMirroring resource to patch. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *PacketMirroringsService) Patch(project string, region string, packetMirroring string, packetmirroring *PacketMirroring) *PacketMirroringsPatchCall { - c := &PacketMirroringsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.packetMirroring = packetMirroring - c.packetmirroring = packetmirroring - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *PacketMirroringsPatchCall) RequestId(requestId string) *PacketMirroringsPatchCall { - 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 -// details. -func (c *PacketMirroringsPatchCall) Fields(s ...googleapi.Field) *PacketMirroringsPatchCall { +func (c *NodeTypesListCall) Fields(s ...googleapi.Field) *NodeTypesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *NodeTypesListCall) IfNoneMatch(entityTag string) *NodeTypesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsPatchCall) Context(ctx context.Context) *PacketMirroringsPatchCall { +func (c *NodeTypesListCall) Context(ctx context.Context) *NodeTypesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PacketMirroringsPatchCall) Header() http.Header { +func (c *NodeTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PacketMirroringsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.packetmirroring) - if err != nil { - return nil, err +func (c *NodeTypesListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/zones/{zone}/nodeTypes") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", 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{ - "project": c.project, - "region": c.region, - "packetMirroring": c.packetMirroring, + "project": c.project, + "zone": c.zone, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.packetMirrorings.patch" call. +// Do executes the "compute.nodeTypes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *NodeTypeList.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *PacketMirroringsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *NodeTypesListCall) Do(opts ...googleapi.CallOption) (*NodeTypeList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53585,7 +53516,7 @@ func (c *PacketMirroringsPatchCall) Do(opts ...googleapi.CallOption) (*Operation if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &NodeTypeList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -53598,86 +53529,205 @@ func (c *PacketMirroringsPatchCall) Do(opts ...googleapi.CallOption) (*Operation return ret, nil } -type PacketMirroringsTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - 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 *NodeTypesListCall) Pages(ctx context.Context, f func(*NodeTypeList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +type PacketMirroringsAggregatedListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// AggregatedList: Retrieves an aggregated list of packetMirrorings. To prevent +// failure, Google recommends that you set the `returnPartialSuccess` parameter +// to `true`. // // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *PacketMirroringsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *PacketMirroringsTestIamPermissionsCall { - c := &PacketMirroringsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *PacketMirroringsService) AggregatedList(project string) *PacketMirroringsAggregatedListCall { + c := &PacketMirroringsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *PacketMirroringsAggregatedListCall) Filter(filter string) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *PacketMirroringsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *PacketMirroringsAggregatedListCall) MaxResults(maxResults int64) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *PacketMirroringsAggregatedListCall) OrderBy(orderBy string) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *PacketMirroringsAggregatedListCall) PageToken(pageToken string) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *PacketMirroringsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *PacketMirroringsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *PacketMirroringsAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PacketMirroringsTestIamPermissionsCall) Fields(s ...googleapi.Field) *PacketMirroringsTestIamPermissionsCall { +func (c *PacketMirroringsAggregatedListCall) Fields(s ...googleapi.Field) *PacketMirroringsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *PacketMirroringsAggregatedListCall) IfNoneMatch(entityTag string) *PacketMirroringsAggregatedListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *PacketMirroringsTestIamPermissionsCall) Context(ctx context.Context) *PacketMirroringsTestIamPermissionsCall { +func (c *PacketMirroringsAggregatedListCall) Context(ctx context.Context) *PacketMirroringsAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PacketMirroringsTestIamPermissionsCall) Header() http.Header { +func (c *PacketMirroringsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PacketMirroringsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err +func (c *PacketMirroringsAggregatedListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/packetMirrorings") 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.packetMirrorings.testIamPermissions" call. +// Do executes the "compute.packetMirrorings.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// *PacketMirroringAggregatedList.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *PacketMirroringsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +func (c *PacketMirroringsAggregatedListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53696,7 +53746,7 @@ func (c *PacketMirroringsTestIamPermissionsCall) Do(opts ...googleapi.CallOption if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &PacketMirroringAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -53709,20 +53759,47 @@ func (c *PacketMirroringsTestIamPermissionsCall) Do(opts ...googleapi.CallOption return ret, nil } -type ProjectsDisableXpnHostCall struct { - s *Service - project 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 *PacketMirroringsAggregatedListCall) Pages(ctx context.Context, f func(*PacketMirroringAggregatedList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// DisableXpnHost: Disable this project as a shared VPC host project. +type PacketMirroringsDeleteCall struct { + s *Service + project string + region string + packetMirroring string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Delete: Deletes the specified PacketMirroring resource. // +// - packetMirroring: Name of the PacketMirroring resource to delete. // - project: Project ID for this request. -func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall { - c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *PacketMirroringsService) Delete(project string, region string, packetMirroring string) *PacketMirroringsDeleteCall { + c := &PacketMirroringsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region + c.packetMirroring = packetMirroring return c } @@ -53736,7 +53813,7 @@ func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHost // 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 *ProjectsDisableXpnHostCall) RequestId(requestId string) *ProjectsDisableXpnHostCall { +func (c *PacketMirroringsDeleteCall) RequestId(requestId string) *PacketMirroringsDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -53744,50 +53821,52 @@ func (c *ProjectsDisableXpnHostCall) RequestId(requestId string) *ProjectsDisabl // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsDisableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnHostCall { +func (c *PacketMirroringsDeleteCall) Fields(s ...googleapi.Field) *PacketMirroringsDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsDisableXpnHostCall) Context(ctx context.Context) *ProjectsDisableXpnHostCall { +func (c *PacketMirroringsDeleteCall) Context(ctx context.Context) *PacketMirroringsDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsDisableXpnHostCall) Header() http.Header { +func (c *PacketMirroringsDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, error) { +func (c *PacketMirroringsDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/disableXpnHost") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") 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{ - "project": c.project, + "project": c.project, + "region": c.region, + "packetMirroring": c.packetMirroring, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.disableXpnHost" call. +// Do executes the "compute.packetMirrorings.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PacketMirroringsDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53819,92 +53898,91 @@ func (c *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operatio return ret, nil } -type ProjectsDisableXpnResourceCall struct { - s *Service - project string - projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PacketMirroringsGetCall struct { + s *Service + project string + region string + packetMirroring string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// DisableXpnResource: Disable a service resource (also known as service -// project) associated with this host project. +// Get: Returns the specified PacketMirroring resource. // +// - packetMirroring: Name of the PacketMirroring resource to return. // - project: Project ID for this request. -func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall { - c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *PacketMirroringsService) Get(project string, region string, packetMirroring string) *PacketMirroringsGetCall { + c := &PacketMirroringsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.projectsdisablexpnresourcerequest = projectsdisablexpnresourcerequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *ProjectsDisableXpnResourceCall) RequestId(requestId string) *ProjectsDisableXpnResourceCall { - c.urlParams_.Set("requestId", requestId) + c.region = region + c.packetMirroring = packetMirroring return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsDisableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnResourceCall { +func (c *PacketMirroringsGetCall) Fields(s ...googleapi.Field) *PacketMirroringsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *PacketMirroringsGetCall) IfNoneMatch(entityTag string) *PacketMirroringsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsDisableXpnResourceCall) Context(ctx context.Context) *ProjectsDisableXpnResourceCall { +func (c *PacketMirroringsGetCall) Context(ctx context.Context) *PacketMirroringsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsDisableXpnResourceCall) Header() http.Header { +func (c *PacketMirroringsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsdisablexpnresourcerequest) - if err != nil { - return nil, err +func (c *PacketMirroringsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/disableXpnResource") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") 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{ - "project": c.project, + "project": c.project, + "region": c.region, + "packetMirroring": c.packetMirroring, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.disableXpnResource" call. +// Do executes the "compute.packetMirrorings.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *PacketMirroring.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *PacketMirroringsGetCall) Do(opts ...googleapi.CallOption) (*PacketMirroring, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -53923,7 +54001,7 @@ func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Oper if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &PacketMirroring{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -53936,20 +54014,26 @@ func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Oper return ret, nil } -type ProjectsEnableXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PacketMirroringsInsertCall struct { + s *Service + project string + region string + packetmirroring *PacketMirroring + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// EnableXpnHost: Enable this project as a shared VPC host project. +// Insert: Creates a PacketMirroring resource in the specified project and +// region using the data included in the request. // // - project: Project ID for this request. -func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall { - c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *PacketMirroringsService) Insert(project string, region string, packetmirroring *PacketMirroring) *PacketMirroringsInsertCall { + c := &PacketMirroringsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region + c.packetmirroring = packetmirroring return c } @@ -53963,7 +54047,7 @@ func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCa // 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 *ProjectsEnableXpnHostCall) RequestId(requestId string) *ProjectsEnableXpnHostCall { +func (c *PacketMirroringsInsertCall) RequestId(requestId string) *PacketMirroringsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -53971,32 +54055,36 @@ func (c *ProjectsEnableXpnHostCall) RequestId(requestId string) *ProjectsEnableX // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsEnableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnHostCall { +func (c *PacketMirroringsInsertCall) Fields(s ...googleapi.Field) *PacketMirroringsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsEnableXpnHostCall) Context(ctx context.Context) *ProjectsEnableXpnHostCall { +func (c *PacketMirroringsInsertCall) Context(ctx context.Context) *PacketMirroringsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsEnableXpnHostCall) Header() http.Header { +func (c *PacketMirroringsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *PacketMirroringsInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.packetmirroring) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/enableXpnHost") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -54005,16 +54093,17 @@ func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.enableXpnHost" call. +// Do executes the "compute.packetMirrorings.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PacketMirroringsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54046,93 +54135,166 @@ func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation return ret, nil } -type ProjectsEnableXpnResourceCall struct { - s *Service - project string - projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PacketMirroringsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves a list of PacketMirroring resources available to the +// specified project and region. +// +// - project: Project ID for this request. +// - region: Name of the region for this request. +func (r *PacketMirroringsService) List(project string, region string) *PacketMirroringsListCall { + c := &PacketMirroringsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *PacketMirroringsListCall) Filter(filter string) *PacketMirroringsListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *PacketMirroringsListCall) MaxResults(maxResults int64) *PacketMirroringsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *PacketMirroringsListCall) OrderBy(orderBy string) *PacketMirroringsListCall { + c.urlParams_.Set("orderBy", orderBy) + return c } -// EnableXpnResource: Enable service resource (a.k.a service project) for a -// host project, so that subnets in the host project can be used by instances -// in the service project. -// -// - project: Project ID for this request. -func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall { - c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectsenablexpnresourcerequest = projectsenablexpnresourcerequest +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *PacketMirroringsListCall) PageToken(pageToken string) *PacketMirroringsListCall { + c.urlParams_.Set("pageToken", pageToken) return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *ProjectsEnableXpnResourceCall) RequestId(requestId string) *ProjectsEnableXpnResourceCall { - c.urlParams_.Set("requestId", requestId) +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *PacketMirroringsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PacketMirroringsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsEnableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnResourceCall { +func (c *PacketMirroringsListCall) Fields(s ...googleapi.Field) *PacketMirroringsListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *PacketMirroringsListCall) IfNoneMatch(entityTag string) *PacketMirroringsListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsEnableXpnResourceCall) Context(ctx context.Context) *ProjectsEnableXpnResourceCall { +func (c *PacketMirroringsListCall) Context(ctx context.Context) *PacketMirroringsListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsEnableXpnResourceCall) Header() http.Header { +func (c *PacketMirroringsListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsenablexpnresourcerequest) - if err != nil { - return nil, err +func (c *PacketMirroringsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/enableXpnResource") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings") 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{ "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.enableXpnResource" call. +// Do executes the "compute.packetMirrorings.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *PacketMirroringList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *PacketMirroringsListCall) Do(opts ...googleapi.CallOption) (*PacketMirroringList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54151,7 +54313,7 @@ func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &PacketMirroringList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54164,88 +54326,122 @@ func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Opera return ret, nil } -type ProjectsGetCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PacketMirroringsListCall) Pages(ctx context.Context, f func(*PacketMirroringList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Get: Returns the specified Project resource. To decrease latency for this -// method, you can optionally omit any unneeded information from the response -// by using a field mask. This practice is especially recommended for unused -// quota information (the `quotas` field). To exclude one or more fields, set -// your request's `fields` query parameter to only include the fields you need. -// For example, to only include the `id` and `selfLink` fields, add the query -// parameter `?fields=id,selfLink` to your request. +type PacketMirroringsPatchCall struct { + s *Service + project string + region string + packetMirroring string + packetmirroring *PacketMirroring + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified PacketMirroring resource with the data included +// in the request. This method supports PATCH semantics and uses JSON merge +// patch format and processing rules. // +// - packetMirroring: Name of the PacketMirroring resource to patch. // - project: Project ID for this request. -func (r *ProjectsService) Get(project string) *ProjectsGetCall { - c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *PacketMirroringsService) Patch(project string, region string, packetMirroring string, packetmirroring *PacketMirroring) *PacketMirroringsPatchCall { + c := &PacketMirroringsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region + c.packetMirroring = packetMirroring + c.packetmirroring = packetmirroring + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *PacketMirroringsPatchCall) RequestId(requestId string) *PacketMirroringsPatchCall { + 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 // details. -func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { +func (c *PacketMirroringsPatchCall) Fields(s ...googleapi.Field) *PacketMirroringsPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { +func (c *PacketMirroringsPatchCall) Context(ctx context.Context) *PacketMirroringsPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsGetCall) Header() http.Header { +func (c *PacketMirroringsPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *PacketMirroringsPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.packetmirroring) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{packetMirroring}") 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{ - "project": c.project, + "project": c.project, + "region": c.region, + "packetMirroring": c.packetMirroring, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.get" call. +// Do executes the "compute.packetMirrorings.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *Project.ServerResponse.Header or (if a response was returned at all) in +// *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 *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { +func (c *PacketMirroringsPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54264,7 +54460,7 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Project{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54277,83 +54473,86 @@ func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { return ret, nil } -type ProjectsGetXpnHostCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PacketMirroringsTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetXpnHost: Gets the shared VPC host project that this project links to. May -// be empty if no link exists. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // // - project: Project ID for this request. -func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall { - c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *PacketMirroringsService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *PacketMirroringsTestIamPermissionsCall { + c := &PacketMirroringsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsGetXpnHostCall) Fields(s ...googleapi.Field) *ProjectsGetXpnHostCall { +func (c *PacketMirroringsTestIamPermissionsCall) Fields(s ...googleapi.Field) *PacketMirroringsTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsGetXpnHostCall) IfNoneMatch(entityTag string) *ProjectsGetXpnHostCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsGetXpnHostCall) Context(ctx context.Context) *ProjectsGetXpnHostCall { +func (c *PacketMirroringsTestIamPermissionsCall) Context(ctx context.Context) *PacketMirroringsTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsGetXpnHostCall) Header() http.Header { +func (c *PacketMirroringsTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsGetXpnHostCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *PacketMirroringsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/getXpnHost") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/packetMirrorings/{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{ - "project": c.project, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.getXpnHost" call. +// Do executes the "compute.packetMirrorings.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Project.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PacketMirroringsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54372,7 +54571,7 @@ func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, err if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Project{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54385,145 +54584,69 @@ func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, err return ret, nil } -type ProjectsGetXpnResourcesCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsDisableXpnHostCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetXpnResources: Gets service resources (a.k.a service project) associated -// with this host project. +// DisableXpnHost: Disable this project as a shared VPC host project. // // - project: Project ID for this request. -func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall { - c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsService) DisableXpnHost(project string) *ProjectsDisableXpnHostCall { + c := &ProjectsDisableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *ProjectsGetXpnResourcesCall) Filter(filter string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *ProjectsGetXpnResourcesCall) MaxResults(maxResults int64) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *ProjectsGetXpnResourcesCall) OrderBy(orderBy string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *ProjectsGetXpnResourcesCall) PageToken(pageToken string) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *ProjectsGetXpnResourcesCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsGetXpnResourcesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *ProjectsDisableXpnHostCall) RequestId(requestId string) *ProjectsDisableXpnHostCall { + 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 // details. -func (c *ProjectsGetXpnResourcesCall) Fields(s ...googleapi.Field) *ProjectsGetXpnResourcesCall { +func (c *ProjectsDisableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnHostCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsGetXpnResourcesCall) IfNoneMatch(entityTag string) *ProjectsGetXpnResourcesCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsGetXpnResourcesCall) Context(ctx context.Context) *ProjectsGetXpnResourcesCall { +func (c *ProjectsDisableXpnHostCall) Context(ctx context.Context) *ProjectsDisableXpnHostCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsGetXpnResourcesCall) Header() http.Header { +func (c *ProjectsDisableXpnHostCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDisableXpnHostCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/getXpnResources") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/disableXpnHost") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -54534,13 +54657,12 @@ func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.getXpnResources" call. +// Do executes the "compute.projects.disableXpnHost" call. // Any non-2xx status code is an error. Response headers are in either -// *ProjectsGetXpnResources.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*ProjectsGetXpnResources, error) { +// *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 *ProjectsDisableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54559,171 +54681,87 @@ func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*Project if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ProjectsGetXpnResources{ + 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 -} - -// 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 *ProjectsGetXpnResourcesCall) Pages(ctx context.Context, f func(*ProjectsGetXpnResources) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsListXpnHostsCall struct { - s *Service - project string - projectslistxpnhostsrequest *ProjectsListXpnHostsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// ListXpnHosts: Lists all shared VPC host projects visible to the user in an -// organization. -// -// - project: Project ID for this request. -func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall { - c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.projectslistxpnhostsrequest = projectslistxpnhostsrequest - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *ProjectsListXpnHostsCall) Filter(filter string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *ProjectsListXpnHostsCall) MaxResults(maxResults int64) *ProjectsListXpnHostsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *ProjectsListXpnHostsCall) OrderBy(orderBy string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("orderBy", orderBy) - return c +type ProjectsDisableXpnResourceCall struct { + s *Service + project string + projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *ProjectsListXpnHostsCall) PageToken(pageToken string) *ProjectsListXpnHostsCall { - c.urlParams_.Set("pageToken", pageToken) +// DisableXpnResource: Disable a service resource (also known as service +// project) associated with this host project. +// +// - project: Project ID for this request. +func (r *ProjectsService) DisableXpnResource(project string, projectsdisablexpnresourcerequest *ProjectsDisableXpnResourceRequest) *ProjectsDisableXpnResourceCall { + c := &ProjectsDisableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.projectsdisablexpnresourcerequest = projectsdisablexpnresourcerequest return c } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *ProjectsListXpnHostsCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsListXpnHostsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *ProjectsDisableXpnResourceCall) RequestId(requestId string) *ProjectsDisableXpnResourceCall { + 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 // details. -func (c *ProjectsListXpnHostsCall) Fields(s ...googleapi.Field) *ProjectsListXpnHostsCall { +func (c *ProjectsDisableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsDisableXpnResourceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsListXpnHostsCall) Context(ctx context.Context) *ProjectsListXpnHostsCall { +func (c *ProjectsDisableXpnResourceCall) Context(ctx context.Context) *ProjectsDisableXpnResourceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsListXpnHostsCall) Header() http.Header { +func (c *ProjectsDisableXpnResourceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsDisableXpnResourceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectslistxpnhostsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsdisablexpnresourcerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/listXpnHosts") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/disableXpnResource") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -54736,12 +54774,12 @@ func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.listXpnHosts" call. +// Do executes the "compute.projects.disableXpnResource" call. // Any non-2xx status code is an error. Response headers are in either -// *XpnHostList.ServerResponse.Header or (if a response was returned at all) in +// *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 *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostList, error) { +func (c *ProjectsDisableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54760,7 +54798,7 @@ func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostLis if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &XpnHostList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -54773,43 +54811,20 @@ func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostLis return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsListXpnHostsCall) Pages(ctx context.Context, f func(*XpnHostList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsMoveDiskCall struct { - s *Service - project string - diskmoverequest *DiskMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsEnableXpnHostCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// MoveDisk: Moves a persistent disk from one zone to another. +// EnableXpnHost: Enable this project as a shared VPC host project. // // - project: Project ID for this request. -func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall { - c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsService) EnableXpnHost(project string) *ProjectsEnableXpnHostCall { + c := &ProjectsEnableXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.diskmoverequest = diskmoverequest return c } @@ -54823,7 +54838,7 @@ func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequ // 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 *ProjectsMoveDiskCall) RequestId(requestId string) *ProjectsMoveDiskCall { +func (c *ProjectsEnableXpnHostCall) RequestId(requestId string) *ProjectsEnableXpnHostCall { c.urlParams_.Set("requestId", requestId) return c } @@ -54831,36 +54846,32 @@ func (c *ProjectsMoveDiskCall) RequestId(requestId string) *ProjectsMoveDiskCall // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsMoveDiskCall) Fields(s ...googleapi.Field) *ProjectsMoveDiskCall { +func (c *ProjectsEnableXpnHostCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnHostCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsMoveDiskCall) Context(ctx context.Context) *ProjectsMoveDiskCall { +func (c *ProjectsEnableXpnHostCall) Context(ctx context.Context) *ProjectsEnableXpnHostCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsMoveDiskCall) Header() http.Header { +func (c *ProjectsEnableXpnHostCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsEnableXpnHostCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.diskmoverequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/moveDisk") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/enableXpnHost") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -54873,12 +54884,12 @@ func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.moveDisk" call. +// Do executes the "compute.projects.enableXpnHost" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsEnableXpnHostCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -54910,28 +54921,24 @@ func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, err return ret, nil } -type ProjectsMoveInstanceCall struct { - s *Service - project string - instancemoverequest *InstanceMoveRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsEnableXpnResourceCall struct { + s *Service + project string + projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// MoveInstance: Moves an instance and its attached persistent disks from one -// zone to another. *Note*: Moving VMs or disks by using this method might -// cause unexpected behavior. For more information, see the known issue -// (/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_mov -// einstance_api_or_the_causes_unexpected_behavior). [Deprecated] This method -// is deprecated. See moving instance across zones -// (/compute/docs/instances/moving-instance-across-zones) instead. +// EnableXpnResource: Enable service resource (a.k.a service project) for a +// host project, so that subnets in the host project can be used by instances +// in the service project. // // - project: Project ID for this request. -func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall { - c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsService) EnableXpnResource(project string, projectsenablexpnresourcerequest *ProjectsEnableXpnResourceRequest) *ProjectsEnableXpnResourceCall { + c := &ProjectsEnableXpnResourceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.instancemoverequest = instancemoverequest + c.projectsenablexpnresourcerequest = projectsenablexpnresourcerequest return c } @@ -54945,7 +54952,7 @@ func (r *ProjectsService) MoveInstance(project string, instancemoverequest *Inst // 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 *ProjectsMoveInstanceCall) RequestId(requestId string) *ProjectsMoveInstanceCall { +func (c *ProjectsEnableXpnResourceCall) RequestId(requestId string) *ProjectsEnableXpnResourceCall { c.urlParams_.Set("requestId", requestId) return c } @@ -54953,36 +54960,36 @@ func (c *ProjectsMoveInstanceCall) RequestId(requestId string) *ProjectsMoveInst // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsMoveInstanceCall) Fields(s ...googleapi.Field) *ProjectsMoveInstanceCall { +func (c *ProjectsEnableXpnResourceCall) Fields(s ...googleapi.Field) *ProjectsEnableXpnResourceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsMoveInstanceCall) Context(ctx context.Context) *ProjectsMoveInstanceCall { +func (c *ProjectsEnableXpnResourceCall) Context(ctx context.Context) *ProjectsEnableXpnResourceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsMoveInstanceCall) Header() http.Header { +func (c *ProjectsEnableXpnResourceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsEnableXpnResourceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancemoverequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectsenablexpnresourcerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/moveInstance") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/enableXpnResource") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -54995,12 +55002,12 @@ func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.moveInstance" call. +// Do executes the "compute.projects.enableXpnResource" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsEnableXpnResourceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55032,78 +55039,72 @@ func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type ProjectsSetCloudArmorTierCall struct { - s *Service - project string - projectssetcloudarmortierrequest *ProjectsSetCloudArmorTierRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsGetCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetCloudArmorTier: Sets the Cloud Armor tier of the project. To set -// ENTERPRISE or above the billing account of the project must be subscribed to -// Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more -// information. +// Get: Returns the specified Project resource. To decrease latency for this +// method, you can optionally omit any unneeded information from the response +// by using a field mask. This practice is especially recommended for unused +// quota information (the `quotas` field). To exclude one or more fields, set +// your request's `fields` query parameter to only include the fields you need. +// For example, to only include the `id` and `selfLink` fields, add the query +// parameter `?fields=id,selfLink` to your request. // // - project: Project ID for this request. -func (r *ProjectsService) SetCloudArmorTier(project string, projectssetcloudarmortierrequest *ProjectsSetCloudArmorTierRequest) *ProjectsSetCloudArmorTierCall { - c := &ProjectsSetCloudArmorTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsService) Get(project string) *ProjectsGetCall { + c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.projectssetcloudarmortierrequest = projectssetcloudarmortierrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *ProjectsSetCloudArmorTierCall) RequestId(requestId string) *ProjectsSetCloudArmorTierCall { - 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 // details. -func (c *ProjectsSetCloudArmorTierCall) Fields(s ...googleapi.Field) *ProjectsSetCloudArmorTierCall { +func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsSetCloudArmorTierCall) Context(ctx context.Context) *ProjectsSetCloudArmorTierCall { +func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsSetCloudArmorTierCall) Header() http.Header { +func (c *ProjectsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsSetCloudArmorTierCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectssetcloudarmortierrequest) - if err != nil { - return nil, err +func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setCloudArmorTier") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -55114,12 +55115,12 @@ func (c *ProjectsSetCloudArmorTierCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.setCloudArmorTier" call. +// Do executes the "compute.projects.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *Project.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetCloudArmorTierCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55138,7 +55139,7 @@ func (c *ProjectsSetCloudArmorTierCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Project{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55151,76 +55152,67 @@ func (c *ProjectsSetCloudArmorTierCall) Do(opts ...googleapi.CallOption) (*Opera return ret, nil } -type ProjectsSetCommonInstanceMetadataCall struct { - s *Service - project string - metadata *Metadata - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsGetXpnHostCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetCommonInstanceMetadata: Sets metadata common to all instances within the -// specified project using the data included in the request. +// GetXpnHost: Gets the shared VPC host project that this project links to. May +// be empty if no link exists. // // - project: Project ID for this request. -func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall { - c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsService) GetXpnHost(project string) *ProjectsGetXpnHostCall { + c := &ProjectsGetXpnHostCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.metadata = metadata - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *ProjectsSetCommonInstanceMetadataCall) RequestId(requestId string) *ProjectsSetCommonInstanceMetadataCall { - 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 // details. -func (c *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall { +func (c *ProjectsGetXpnHostCall) Fields(s ...googleapi.Field) *ProjectsGetXpnHostCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsGetXpnHostCall) IfNoneMatch(entityTag string) *ProjectsGetXpnHostCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall { +func (c *ProjectsGetXpnHostCall) Context(ctx context.Context) *ProjectsGetXpnHostCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsSetCommonInstanceMetadataCall) Header() http.Header { +func (c *ProjectsGetXpnHostCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) - if err != nil { - return nil, err +func (c *ProjectsGetXpnHostCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setCommonInstanceMetadata") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/getXpnHost") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -55231,12 +55223,12 @@ func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.setCommonInstanceMetadata" call. +// Do executes the "compute.projects.getXpnHost" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *Project.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsGetXpnHostCall) Do(opts ...googleapi.CallOption) (*Project, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55255,7 +55247,7 @@ func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Project{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55268,77 +55260,145 @@ func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsSetDefaultNetworkTierCall struct { - s *Service - project string - projectssetdefaultnetworktierrequest *ProjectsSetDefaultNetworkTierRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsGetXpnResourcesCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetDefaultNetworkTier: Sets the default network tier of the project. The -// default network tier is used when an address/forwardingRule/instance is -// created without specifying the network tier field. +// GetXpnResources: Gets service resources (a.k.a service project) associated +// with this host project. // // - project: Project ID for this request. -func (r *ProjectsService) SetDefaultNetworkTier(project string, projectssetdefaultnetworktierrequest *ProjectsSetDefaultNetworkTierRequest) *ProjectsSetDefaultNetworkTierCall { - c := &ProjectsSetDefaultNetworkTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsService) GetXpnResources(project string) *ProjectsGetXpnResourcesCall { + c := &ProjectsGetXpnResourcesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.projectssetdefaultnetworktierrequest = projectssetdefaultnetworktierrequest return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *ProjectsSetDefaultNetworkTierCall) RequestId(requestId string) *ProjectsSetDefaultNetworkTierCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *ProjectsGetXpnResourcesCall) Filter(filter string) *ProjectsGetXpnResourcesCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *ProjectsGetXpnResourcesCall) MaxResults(maxResults int64) *ProjectsGetXpnResourcesCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *ProjectsGetXpnResourcesCall) OrderBy(orderBy string) *ProjectsGetXpnResourcesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *ProjectsGetXpnResourcesCall) PageToken(pageToken string) *ProjectsGetXpnResourcesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *ProjectsGetXpnResourcesCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsGetXpnResourcesCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsSetDefaultNetworkTierCall) Fields(s ...googleapi.Field) *ProjectsSetDefaultNetworkTierCall { +func (c *ProjectsGetXpnResourcesCall) Fields(s ...googleapi.Field) *ProjectsGetXpnResourcesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsGetXpnResourcesCall) IfNoneMatch(entityTag string) *ProjectsGetXpnResourcesCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsSetDefaultNetworkTierCall) Context(ctx context.Context) *ProjectsSetDefaultNetworkTierCall { +func (c *ProjectsGetXpnResourcesCall) Context(ctx context.Context) *ProjectsGetXpnResourcesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsSetDefaultNetworkTierCall) Header() http.Header { +func (c *ProjectsGetXpnResourcesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsSetDefaultNetworkTierCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectssetdefaultnetworktierrequest) - if err != nil { - return nil, err +func (c *ProjectsGetXpnResourcesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setDefaultNetworkTier") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/getXpnResources") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -55349,12 +55409,13 @@ func (c *ProjectsSetDefaultNetworkTierCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.setDefaultNetworkTier" call. +// Do executes the "compute.projects.getXpnResources" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetDefaultNetworkTierCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *ProjectsGetXpnResources.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsGetXpnResourcesCall) Do(opts ...googleapi.CallOption) (*ProjectsGetXpnResources, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55373,7 +55434,7 @@ func (c *ProjectsSetDefaultNetworkTierCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &ProjectsGetXpnResources{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55383,78 +55444,161 @@ func (c *ProjectsSetDefaultNetworkTierCall) Do(opts ...googleapi.CallOption) (*O if err := gensupport.DecodeResponse(target, res); err != nil { return nil, err } - return ret, nil + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsGetXpnResourcesCall) Pages(ctx context.Context, f func(*ProjectsGetXpnResources) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -type ProjectsSetUsageExportBucketCall struct { - s *Service - project string - usageexportlocation *UsageExportLocation - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsListXpnHostsCall struct { + s *Service + project string + projectslistxpnhostsrequest *ProjectsListXpnHostsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetUsageExportBucket: Enables the usage export feature and sets the usage -// export bucket where reports are stored. If you provide an empty request body -// using this method, the usage export feature will be disabled. +// ListXpnHosts: Lists all shared VPC host projects visible to the user in an +// organization. // // - project: Project ID for this request. -func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall { - c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsService) ListXpnHosts(project string, projectslistxpnhostsrequest *ProjectsListXpnHostsRequest) *ProjectsListXpnHostsCall { + c := &ProjectsListXpnHostsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.usageexportlocation = usageexportlocation + c.projectslistxpnhostsrequest = projectslistxpnhostsrequest return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *ProjectsSetUsageExportBucketCall) RequestId(requestId string) *ProjectsSetUsageExportBucketCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *ProjectsListXpnHostsCall) Filter(filter string) *ProjectsListXpnHostsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *ProjectsListXpnHostsCall) MaxResults(maxResults int64) *ProjectsListXpnHostsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *ProjectsListXpnHostsCall) OrderBy(orderBy string) *ProjectsListXpnHostsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *ProjectsListXpnHostsCall) PageToken(pageToken string) *ProjectsListXpnHostsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *ProjectsListXpnHostsCall) ReturnPartialSuccess(returnPartialSuccess bool) *ProjectsListXpnHostsCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall { +func (c *ProjectsListXpnHostsCall) Fields(s ...googleapi.Field) *ProjectsListXpnHostsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall { +func (c *ProjectsListXpnHostsCall) Context(ctx context.Context) *ProjectsListXpnHostsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsSetUsageExportBucketCall) Header() http.Header { +func (c *ProjectsListXpnHostsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsListXpnHostsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectslistxpnhostsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setUsageExportBucket") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/listXpnHosts") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -55467,12 +55611,12 @@ func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.projects.setUsageExportBucket" call. +// Do executes the "compute.projects.listXpnHosts" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *XpnHostList.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsListXpnHostsCall) Do(opts ...googleapi.CallOption) (*XpnHostList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55491,7 +55635,7 @@ func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Op if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &XpnHostList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55504,24 +55648,43 @@ func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Op return ret, nil } -type PublicAdvertisedPrefixesAnnounceCall struct { - s *Service - project string - publicAdvertisedPrefix 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 *ProjectsListXpnHostsCall) Pages(ctx context.Context, f func(*XpnHostList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Announce: Announces the specified PublicAdvertisedPrefix +type ProjectsMoveDiskCall struct { + s *Service + project string + diskmoverequest *DiskMoveRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// MoveDisk: Moves a persistent disk from one zone to another. // -// - project: Project ID for this request. -// - publicAdvertisedPrefix: The name of the public advertised prefix. It -// should comply with RFC1035. -func (r *PublicAdvertisedPrefixesService) Announce(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesAnnounceCall { - c := &PublicAdvertisedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *ProjectsService) MoveDisk(project string, diskmoverequest *DiskMoveRequest) *ProjectsMoveDiskCall { + c := &ProjectsMoveDiskCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix + c.diskmoverequest = diskmoverequest return c } @@ -55535,7 +55698,7 @@ func (r *PublicAdvertisedPrefixesService) Announce(project string, publicAdverti // 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 *PublicAdvertisedPrefixesAnnounceCall) RequestId(requestId string) *PublicAdvertisedPrefixesAnnounceCall { +func (c *ProjectsMoveDiskCall) RequestId(requestId string) *ProjectsMoveDiskCall { c.urlParams_.Set("requestId", requestId) return c } @@ -55543,32 +55706,36 @@ func (c *PublicAdvertisedPrefixesAnnounceCall) RequestId(requestId string) *Publ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicAdvertisedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesAnnounceCall { +func (c *ProjectsMoveDiskCall) Fields(s ...googleapi.Field) *ProjectsMoveDiskCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesAnnounceCall) Context(ctx context.Context) *PublicAdvertisedPrefixesAnnounceCall { +func (c *ProjectsMoveDiskCall) Context(ctx context.Context) *ProjectsMoveDiskCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicAdvertisedPrefixesAnnounceCall) Header() http.Header { +func (c *ProjectsMoveDiskCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicAdvertisedPrefixesAnnounceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *ProjectsMoveDiskCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.diskmoverequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/moveDisk") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -55576,18 +55743,17 @@ func (c *PublicAdvertisedPrefixesAnnounceCall) doRequest(alt string) (*http.Resp } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicAdvertisedPrefixes.announce" call. +// Do executes the "compute.projects.moveDisk" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesAnnounceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsMoveDiskCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55619,24 +55785,28 @@ func (c *PublicAdvertisedPrefixesAnnounceCall) Do(opts ...googleapi.CallOption) return ret, nil } -type PublicAdvertisedPrefixesDeleteCall struct { - s *Service - project string - publicAdvertisedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsMoveInstanceCall struct { + s *Service + project string + instancemoverequest *InstanceMoveRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified PublicAdvertisedPrefix +// MoveInstance: Moves an instance and its attached persistent disks from one +// zone to another. *Note*: Moving VMs or disks by using this method might +// cause unexpected behavior. For more information, see the known issue +// (/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_mov +// einstance_api_or_the_causes_unexpected_behavior). [Deprecated] This method +// is deprecated. See moving instance across zones +// (/compute/docs/instances/moving-instance-across-zones) instead. // -// - project: Project ID for this request. -// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to -// delete. -func (r *PublicAdvertisedPrefixesService) Delete(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesDeleteCall { - c := &PublicAdvertisedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *ProjectsService) MoveInstance(project string, instancemoverequest *InstanceMoveRequest) *ProjectsMoveInstanceCall { + c := &ProjectsMoveInstanceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix + c.instancemoverequest = instancemoverequest return c } @@ -55650,7 +55820,7 @@ func (r *PublicAdvertisedPrefixesService) Delete(project string, publicAdvertise // 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 *PublicAdvertisedPrefixesDeleteCall) RequestId(requestId string) *PublicAdvertisedPrefixesDeleteCall { +func (c *ProjectsMoveInstanceCall) RequestId(requestId string) *ProjectsMoveInstanceCall { c.urlParams_.Set("requestId", requestId) return c } @@ -55658,51 +55828,54 @@ func (c *PublicAdvertisedPrefixesDeleteCall) RequestId(requestId string) *Public // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicAdvertisedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesDeleteCall { +func (c *ProjectsMoveInstanceCall) Fields(s ...googleapi.Field) *ProjectsMoveInstanceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesDeleteCall) Context(ctx context.Context) *PublicAdvertisedPrefixesDeleteCall { +func (c *ProjectsMoveInstanceCall) Context(ctx context.Context) *ProjectsMoveInstanceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicAdvertisedPrefixesDeleteCall) Header() http.Header { +func (c *ProjectsMoveInstanceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } - -func (c *PublicAdvertisedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + +func (c *ProjectsMoveInstanceCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancemoverequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/moveInstance") 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{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicAdvertisedPrefixes.delete" call. +// Do executes the "compute.projects.moveInstance" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsMoveInstanceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55734,88 +55907,94 @@ func (c *PublicAdvertisedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type PublicAdvertisedPrefixesGetCall struct { - s *Service - project string - publicAdvertisedPrefix string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsSetCloudArmorTierCall struct { + s *Service + project string + projectssetcloudarmortierrequest *ProjectsSetCloudArmorTierRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified PublicAdvertisedPrefix resource. +// SetCloudArmorTier: Sets the Cloud Armor tier of the project. To set +// ENTERPRISE or above the billing account of the project must be subscribed to +// Cloud Armor Enterprise. See Subscribing to Cloud Armor Enterprise for more +// information. // -// - project: Project ID for this request. -// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to -// return. -func (r *PublicAdvertisedPrefixesService) Get(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesGetCall { - c := &PublicAdvertisedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *ProjectsService) SetCloudArmorTier(project string, projectssetcloudarmortierrequest *ProjectsSetCloudArmorTierRequest) *ProjectsSetCloudArmorTierCall { + c := &ProjectsSetCloudArmorTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix + c.projectssetcloudarmortierrequest = projectssetcloudarmortierrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *ProjectsSetCloudArmorTierCall) RequestId(requestId string) *ProjectsSetCloudArmorTierCall { + 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 // details. -func (c *PublicAdvertisedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesGetCall { +func (c *ProjectsSetCloudArmorTierCall) Fields(s ...googleapi.Field) *ProjectsSetCloudArmorTierCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *PublicAdvertisedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicAdvertisedPrefixesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesGetCall) Context(ctx context.Context) *PublicAdvertisedPrefixesGetCall { +func (c *ProjectsSetCloudArmorTierCall) Context(ctx context.Context) *ProjectsSetCloudArmorTierCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicAdvertisedPrefixesGetCall) Header() http.Header { +func (c *ProjectsSetCloudArmorTierCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicAdvertisedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsSetCloudArmorTierCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectssetcloudarmortierrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setCloudArmorTier") 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{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicAdvertisedPrefixes.get" call. +// Do executes the "compute.projects.setCloudArmorTier" call. // Any non-2xx status code is an error. Response headers are in either -// *PublicAdvertisedPrefix.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *PublicAdvertisedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicAdvertisedPrefix, error) { +// *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 *ProjectsSetCloudArmorTierCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55834,7 +56013,7 @@ func (c *PublicAdvertisedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*Pub if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PublicAdvertisedPrefix{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -55847,23 +56026,23 @@ func (c *PublicAdvertisedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*Pub return ret, nil } -type PublicAdvertisedPrefixesInsertCall struct { - s *Service - project string - publicadvertisedprefix *PublicAdvertisedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsSetCommonInstanceMetadataCall struct { + s *Service + project string + metadata *Metadata + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a PublicAdvertisedPrefix in the specified project using the -// parameters that are included in the request. +// SetCommonInstanceMetadata: Sets metadata common to all instances within the +// specified project using the data included in the request. // // - project: Project ID for this request. -func (r *PublicAdvertisedPrefixesService) Insert(project string, publicadvertisedprefix *PublicAdvertisedPrefix) *PublicAdvertisedPrefixesInsertCall { - c := &PublicAdvertisedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsService) SetCommonInstanceMetadata(project string, metadata *Metadata) *ProjectsSetCommonInstanceMetadataCall { + c := &ProjectsSetCommonInstanceMetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.publicadvertisedprefix = publicadvertisedprefix + c.metadata = metadata return c } @@ -55877,7 +56056,7 @@ func (r *PublicAdvertisedPrefixesService) Insert(project string, publicadvertise // 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 *PublicAdvertisedPrefixesInsertCall) RequestId(requestId string) *PublicAdvertisedPrefixesInsertCall { +func (c *ProjectsSetCommonInstanceMetadataCall) RequestId(requestId string) *ProjectsSetCommonInstanceMetadataCall { c.urlParams_.Set("requestId", requestId) return c } @@ -55885,36 +56064,36 @@ func (c *PublicAdvertisedPrefixesInsertCall) RequestId(requestId string) *Public // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicAdvertisedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesInsertCall { +func (c *ProjectsSetCommonInstanceMetadataCall) Fields(s ...googleapi.Field) *ProjectsSetCommonInstanceMetadataCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesInsertCall) Context(ctx context.Context) *PublicAdvertisedPrefixesInsertCall { +func (c *ProjectsSetCommonInstanceMetadataCall) Context(ctx context.Context) *ProjectsSetCommonInstanceMetadataCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicAdvertisedPrefixesInsertCall) Header() http.Header { +func (c *ProjectsSetCommonInstanceMetadataCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicAdvertisedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsSetCommonInstanceMetadataCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicadvertisedprefix) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.metadata) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setCommonInstanceMetadata") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -55927,12 +56106,12 @@ func (c *PublicAdvertisedPrefixesInsertCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicAdvertisedPrefixes.insert" call. +// Do executes the "compute.projects.setCommonInstanceMetadata" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsSetCommonInstanceMetadataCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -55964,144 +56143,77 @@ func (c *PublicAdvertisedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type PublicAdvertisedPrefixesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsSetDefaultNetworkTierCall struct { + s *Service + project string + projectssetdefaultnetworktierrequest *ProjectsSetDefaultNetworkTierRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists the PublicAdvertisedPrefixes for a project. +// SetDefaultNetworkTier: Sets the default network tier of the project. The +// default network tier is used when an address/forwardingRule/instance is +// created without specifying the network tier field. // // - project: Project ID for this request. -func (r *PublicAdvertisedPrefixesService) List(project string) *PublicAdvertisedPrefixesListCall { - c := &PublicAdvertisedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsService) SetDefaultNetworkTier(project string, projectssetdefaultnetworktierrequest *ProjectsSetDefaultNetworkTierRequest) *ProjectsSetDefaultNetworkTierCall { + c := &ProjectsSetDefaultNetworkTierCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.projectssetdefaultnetworktierrequest = projectssetdefaultnetworktierrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *PublicAdvertisedPrefixesListCall) Filter(filter string) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *PublicAdvertisedPrefixesListCall) MaxResults(maxResults int64) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *PublicAdvertisedPrefixesListCall) OrderBy(orderBy string) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *PublicAdvertisedPrefixesListCall) PageToken(pageToken string) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *PublicAdvertisedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicAdvertisedPrefixesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *ProjectsSetDefaultNetworkTierCall) RequestId(requestId string) *ProjectsSetDefaultNetworkTierCall { + 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 // details. -func (c *PublicAdvertisedPrefixesListCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesListCall { +func (c *ProjectsSetDefaultNetworkTierCall) Fields(s ...googleapi.Field) *ProjectsSetDefaultNetworkTierCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *PublicAdvertisedPrefixesListCall) IfNoneMatch(entityTag string) *PublicAdvertisedPrefixesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesListCall) Context(ctx context.Context) *PublicAdvertisedPrefixesListCall { +func (c *ProjectsSetDefaultNetworkTierCall) Context(ctx context.Context) *ProjectsSetDefaultNetworkTierCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicAdvertisedPrefixesListCall) Header() http.Header { +func (c *ProjectsSetDefaultNetworkTierCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicAdvertisedPrefixesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsSetDefaultNetworkTierCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.projectssetdefaultnetworktierrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setDefaultNetworkTier") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -56112,13 +56224,12 @@ func (c *PublicAdvertisedPrefixesListCall) doRequest(alt string) (*http.Response return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicAdvertisedPrefixes.list" call. +// Do executes the "compute.projects.setDefaultNetworkTier" call. // Any non-2xx status code is an error. Response headers are in either -// *PublicAdvertisedPrefixList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicAdvertisedPrefixList, error) { +// *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 *ProjectsSetDefaultNetworkTierCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56137,7 +56248,7 @@ func (c *PublicAdvertisedPrefixesListCall) Do(opts ...googleapi.CallOption) (*Pu if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PublicAdvertisedPrefixList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56150,49 +56261,24 @@ func (c *PublicAdvertisedPrefixesListCall) Do(opts ...googleapi.CallOption) (*Pu return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *PublicAdvertisedPrefixesListCall) Pages(ctx context.Context, f func(*PublicAdvertisedPrefixList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type PublicAdvertisedPrefixesPatchCall struct { - s *Service - project string - publicAdvertisedPrefix string - publicadvertisedprefix *PublicAdvertisedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsSetUsageExportBucketCall struct { + s *Service + project string + usageexportlocation *UsageExportLocation + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Patches the specified Router resource with the data included in the -// request. This method supports PATCH semantics and uses JSON merge patch -// format and processing rules. +// SetUsageExportBucket: Enables the usage export feature and sets the usage +// export bucket where reports are stored. If you provide an empty request body +// using this method, the usage export feature will be disabled. // -// - project: Project ID for this request. -// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to -// patch. -func (r *PublicAdvertisedPrefixesService) Patch(project string, publicAdvertisedPrefix string, publicadvertisedprefix *PublicAdvertisedPrefix) *PublicAdvertisedPrefixesPatchCall { - c := &PublicAdvertisedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *ProjectsService) SetUsageExportBucket(project string, usageexportlocation *UsageExportLocation) *ProjectsSetUsageExportBucketCall { + c := &ProjectsSetUsageExportBucketCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.publicAdvertisedPrefix = publicAdvertisedPrefix - c.publicadvertisedprefix = publicadvertisedprefix + c.usageexportlocation = usageexportlocation return c } @@ -56206,7 +56292,7 @@ func (r *PublicAdvertisedPrefixesService) Patch(project string, publicAdvertised // 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 *PublicAdvertisedPrefixesPatchCall) RequestId(requestId string) *PublicAdvertisedPrefixesPatchCall { +func (c *ProjectsSetUsageExportBucketCall) RequestId(requestId string) *ProjectsSetUsageExportBucketCall { c.urlParams_.Set("requestId", requestId) return c } @@ -56214,55 +56300,54 @@ func (c *PublicAdvertisedPrefixesPatchCall) RequestId(requestId string) *PublicA // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicAdvertisedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesPatchCall { +func (c *ProjectsSetUsageExportBucketCall) Fields(s ...googleapi.Field) *ProjectsSetUsageExportBucketCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesPatchCall) Context(ctx context.Context) *PublicAdvertisedPrefixesPatchCall { +func (c *ProjectsSetUsageExportBucketCall) Context(ctx context.Context) *ProjectsSetUsageExportBucketCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicAdvertisedPrefixesPatchCall) Header() http.Header { +func (c *ProjectsSetUsageExportBucketCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicAdvertisedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsSetUsageExportBucketCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicadvertisedprefix) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.usageexportlocation) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/setUsageExportBucket") 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{ - "project": c.project, - "publicAdvertisedPrefix": c.publicAdvertisedPrefix, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicAdvertisedPrefixes.patch" call. +// Do executes the "compute.projects.setUsageExportBucket" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *ProjectsSetUsageExportBucketCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56294,7 +56379,7 @@ func (c *PublicAdvertisedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type PublicAdvertisedPrefixesWithdrawCall struct { +type PublicAdvertisedPrefixesAnnounceCall struct { s *Service project string publicAdvertisedPrefix string @@ -56303,13 +56388,13 @@ type PublicAdvertisedPrefixesWithdrawCall struct { header_ http.Header } -// Withdraw: Withdraws the specified PublicAdvertisedPrefix +// Announce: Announces the specified PublicAdvertisedPrefix // // - project: Project ID for this request. // - publicAdvertisedPrefix: The name of the public advertised prefix. It // should comply with RFC1035. -func (r *PublicAdvertisedPrefixesService) Withdraw(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesWithdrawCall { - c := &PublicAdvertisedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *PublicAdvertisedPrefixesService) Announce(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesAnnounceCall { + c := &PublicAdvertisedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.publicAdvertisedPrefix = publicAdvertisedPrefix return c @@ -56325,7 +56410,7 @@ func (r *PublicAdvertisedPrefixesService) Withdraw(project string, publicAdverti // 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 *PublicAdvertisedPrefixesWithdrawCall) RequestId(requestId string) *PublicAdvertisedPrefixesWithdrawCall { +func (c *PublicAdvertisedPrefixesAnnounceCall) RequestId(requestId string) *PublicAdvertisedPrefixesAnnounceCall { c.urlParams_.Set("requestId", requestId) return c } @@ -56333,32 +56418,32 @@ func (c *PublicAdvertisedPrefixesWithdrawCall) RequestId(requestId string) *Publ // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicAdvertisedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesWithdrawCall { +func (c *PublicAdvertisedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesAnnounceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PublicAdvertisedPrefixesWithdrawCall) Context(ctx context.Context) *PublicAdvertisedPrefixesWithdrawCall { +func (c *PublicAdvertisedPrefixesAnnounceCall) Context(ctx context.Context) *PublicAdvertisedPrefixesAnnounceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicAdvertisedPrefixesWithdrawCall) Header() http.Header { +func (c *PublicAdvertisedPrefixesAnnounceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicAdvertisedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicAdvertisedPrefixesAnnounceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/announce") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -56372,12 +56457,12 @@ func (c *PublicAdvertisedPrefixesWithdrawCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicAdvertisedPrefixes.withdraw" call. +// Do executes the "compute.publicAdvertisedPrefixes.announce" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *PublicAdvertisedPrefixesWithdrawCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicAdvertisedPrefixesAnnounceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56409,129 +56494,147 @@ func (c *PublicAdvertisedPrefixesWithdrawCall) Do(opts ...googleapi.CallOption) return ret, nil } -type PublicDelegatedPrefixesAggregatedListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PublicAdvertisedPrefixesDeleteCall struct { + s *Service + project string + publicAdvertisedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// AggregatedList: Lists all PublicDelegatedPrefix resources owned by the -// specific project across all scopes. To prevent failure, Google recommends -// that you set the `returnPartialSuccess` parameter to `true`. +// Delete: Deletes the specified PublicAdvertisedPrefix // -// - project: Name of the project scoping this request. -func (r *PublicDelegatedPrefixesService) AggregatedList(project string) *PublicDelegatedPrefixesAggregatedListCall { - c := &PublicDelegatedPrefixesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to +// delete. +func (r *PublicAdvertisedPrefixesService) Delete(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesDeleteCall { + c := &PublicAdvertisedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.publicAdvertisedPrefix = publicAdvertisedPrefix return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *PublicDelegatedPrefixesAggregatedListCall) Filter(filter string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("filter", filter) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *PublicAdvertisedPrefixesDeleteCall) RequestId(requestId string) *PublicAdvertisedPrefixesDeleteCall { + c.urlParams_.Set("requestId", requestId) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *PublicDelegatedPrefixesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *PublicAdvertisedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesDeleteCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *PublicDelegatedPrefixesAggregatedListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// Context sets the context to be used in this call's Do method. +func (c *PublicAdvertisedPrefixesDeleteCall) Context(ctx context.Context) *PublicAdvertisedPrefixesDeleteCall { + c.ctx_ = ctx return c } -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *PublicDelegatedPrefixesAggregatedListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("orderBy", orderBy) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *PublicAdvertisedPrefixesDeleteCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ } -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *PublicDelegatedPrefixesAggregatedListCall) PageToken(pageToken string) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("pageToken", pageToken) - return c +func (c *PublicAdvertisedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") + 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{ + "project": c.project, + "publicAdvertisedPrefix": c.publicAdvertisedPrefix, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *PublicDelegatedPrefixesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c +// Do executes the "compute.publicAdvertisedPrefixes.delete" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *PublicAdvertisedPrefixesDeleteCall) 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 } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *PublicDelegatedPrefixesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *PublicDelegatedPrefixesAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) +type PublicAdvertisedPrefixesGetCall struct { + s *Service + project string + publicAdvertisedPrefix string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns the specified PublicAdvertisedPrefix resource. +// +// - project: Project ID for this request. +// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to +// return. +func (r *PublicAdvertisedPrefixesService) Get(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesGetCall { + c := &PublicAdvertisedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.publicAdvertisedPrefix = publicAdvertisedPrefix return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicDelegatedPrefixesAggregatedListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAggregatedListCall { +func (c *PublicAdvertisedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -56539,27 +56642,27 @@ func (c *PublicDelegatedPrefixesAggregatedListCall) Fields(s ...googleapi.Field) // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *PublicDelegatedPrefixesAggregatedListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesAggregatedListCall { +func (c *PublicAdvertisedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicAdvertisedPrefixesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesAggregatedListCall) Context(ctx context.Context) *PublicDelegatedPrefixesAggregatedListCall { +func (c *PublicAdvertisedPrefixesGetCall) Context(ctx context.Context) *PublicAdvertisedPrefixesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicDelegatedPrefixesAggregatedListCall) Header() http.Header { +func (c *PublicAdvertisedPrefixesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicDelegatedPrefixesAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicAdvertisedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -56567,7 +56670,7 @@ func (c *PublicDelegatedPrefixesAggregatedListCall) doRequest(alt string) (*http var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/publicDelegatedPrefixes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -56575,18 +56678,19 @@ func (c *PublicDelegatedPrefixesAggregatedListCall) doRequest(alt string) (*http } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, + "project": c.project, + "publicAdvertisedPrefix": c.publicAdvertisedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicDelegatedPrefixes.aggregatedList" call. +// Do executes the "compute.publicAdvertisedPrefixes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefixAggregatedList.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesAggregatedListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixAggregatedList, error) { +// *PublicAdvertisedPrefix.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *PublicAdvertisedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicAdvertisedPrefix, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56605,7 +56709,7 @@ func (c *PublicDelegatedPrefixesAggregatedListCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PublicDelegatedPrefixAggregatedList{ + ret := &PublicAdvertisedPrefix{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56618,49 +56722,23 @@ func (c *PublicDelegatedPrefixesAggregatedListCall) Do(opts ...googleapi.CallOpt return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *PublicDelegatedPrefixesAggregatedListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixAggregatedList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type PublicDelegatedPrefixesAnnounceCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicAdvertisedPrefixesInsertCall struct { + s *Service + project string + publicadvertisedprefix *PublicAdvertisedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Announce: Announces the specified PublicDelegatedPrefix in the given region. +// Insert: Creates a PublicAdvertisedPrefix in the specified project using the +// parameters that are included in the request. // -// - project: Project ID for this request. -// - publicDelegatedPrefix: The name of the public delegated prefix. It should -// comply with RFC1035. -// - region: The name of the region where the public delegated prefix is -// located. It should comply with RFC1035. -func (r *PublicDelegatedPrefixesService) Announce(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesAnnounceCall { - c := &PublicDelegatedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +func (r *PublicAdvertisedPrefixesService) Insert(project string, publicadvertisedprefix *PublicAdvertisedPrefix) *PublicAdvertisedPrefixesInsertCall { + c := &PublicAdvertisedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix + c.publicadvertisedprefix = publicadvertisedprefix return c } @@ -56674,7 +56752,7 @@ func (r *PublicDelegatedPrefixesService) Announce(project string, region string, // 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 *PublicDelegatedPrefixesAnnounceCall) RequestId(requestId string) *PublicDelegatedPrefixesAnnounceCall { +func (c *PublicAdvertisedPrefixesInsertCall) RequestId(requestId string) *PublicAdvertisedPrefixesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -56682,32 +56760,36 @@ func (c *PublicDelegatedPrefixesAnnounceCall) RequestId(requestId string) *Publi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicDelegatedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAnnounceCall { +func (c *PublicAdvertisedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesAnnounceCall) Context(ctx context.Context) *PublicDelegatedPrefixesAnnounceCall { +func (c *PublicAdvertisedPrefixesInsertCall) Context(ctx context.Context) *PublicAdvertisedPrefixesInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicDelegatedPrefixesAnnounceCall) Header() http.Header { +func (c *PublicAdvertisedPrefixesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicDelegatedPrefixesAnnounceCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *PublicAdvertisedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicadvertisedprefix) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -56715,19 +56797,17 @@ func (c *PublicDelegatedPrefixesAnnounceCall) doRequest(alt string) (*http.Respo } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicDelegatedPrefixes.announce" call. +// Do executes the "compute.publicAdvertisedPrefixes.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesAnnounceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicAdvertisedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56759,94 +56839,161 @@ func (c *PublicDelegatedPrefixesAnnounceCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type PublicDelegatedPrefixesDeleteCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicAdvertisedPrefixesListCall struct { + s *Service + project string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Lists the PublicAdvertisedPrefixes for a project. +// +// - project: Project ID for this request. +func (r *PublicAdvertisedPrefixesService) List(project string) *PublicAdvertisedPrefixesListCall { + c := &PublicAdvertisedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *PublicAdvertisedPrefixesListCall) Filter(filter string) *PublicAdvertisedPrefixesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *PublicAdvertisedPrefixesListCall) MaxResults(maxResults int64) *PublicAdvertisedPrefixesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c } -// Delete: Deletes the specified PublicDelegatedPrefix in the given region. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// delete. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Delete(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesDeleteCall { - c := &PublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *PublicAdvertisedPrefixesListCall) OrderBy(orderBy string) *PublicAdvertisedPrefixesListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *PublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *PublicDelegatedPrefixesDeleteCall { - c.urlParams_.Set("requestId", requestId) +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *PublicAdvertisedPrefixesListCall) PageToken(pageToken string) *PublicAdvertisedPrefixesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *PublicAdvertisedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicAdvertisedPrefixesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesDeleteCall { +func (c *PublicAdvertisedPrefixesListCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *PublicAdvertisedPrefixesListCall) IfNoneMatch(entityTag string) *PublicAdvertisedPrefixesListCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *PublicDelegatedPrefixesDeleteCall { +func (c *PublicAdvertisedPrefixesListCall) Context(ctx context.Context) *PublicAdvertisedPrefixesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicDelegatedPrefixesDeleteCall) Header() http.Header { +func (c *PublicAdvertisedPrefixesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicAdvertisedPrefixesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes") 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{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, + "project": c.project, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicDelegatedPrefixes.delete" call. +// Do executes the "compute.publicAdvertisedPrefixes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *PublicAdvertisedPrefixList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublicAdvertisedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicAdvertisedPrefixList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56865,7 +57012,7 @@ func (c *PublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (*O if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &PublicAdvertisedPrefixList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56878,93 +57025,119 @@ func (c *PublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type PublicDelegatedPrefixesGetCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *PublicAdvertisedPrefixesListCall) Pages(ctx context.Context, f func(*PublicAdvertisedPrefixList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Get: Returns the specified PublicDelegatedPrefix resource in the given -// region. +type PublicAdvertisedPrefixesPatchCall struct { + s *Service + project string + publicAdvertisedPrefix string + publicadvertisedprefix *PublicAdvertisedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Patches the specified Router resource with the data included in the +// request. This method supports PATCH semantics and uses JSON merge patch +// format and processing rules. // // - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// return. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Get(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesGetCall { - c := &PublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - publicAdvertisedPrefix: Name of the PublicAdvertisedPrefix resource to +// patch. +func (r *PublicAdvertisedPrefixesService) Patch(project string, publicAdvertisedPrefix string, publicadvertisedprefix *PublicAdvertisedPrefix) *PublicAdvertisedPrefixesPatchCall { + c := &PublicAdvertisedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix + c.publicAdvertisedPrefix = publicAdvertisedPrefix + c.publicadvertisedprefix = publicadvertisedprefix + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *PublicAdvertisedPrefixesPatchCall) RequestId(requestId string) *PublicAdvertisedPrefixesPatchCall { + 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 // details. -func (c *PublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesGetCall { +func (c *PublicAdvertisedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *PublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesGetCall) Context(ctx context.Context) *PublicDelegatedPrefixesGetCall { +func (c *PublicAdvertisedPrefixesPatchCall) Context(ctx context.Context) *PublicAdvertisedPrefixesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicDelegatedPrefixesGetCall) Header() http.Header { +func (c *PublicAdvertisedPrefixesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicDelegatedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *PublicAdvertisedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicadvertisedprefix) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}") 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{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, + "project": c.project, + "publicAdvertisedPrefix": c.publicAdvertisedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicDelegatedPrefixes.get" call. +// Do executes the "compute.publicAdvertisedPrefixes.patch" call. // Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefix.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *PublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, error) { +// *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 *PublicAdvertisedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -56983,7 +57156,7 @@ func (c *PublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*Publ if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PublicDelegatedPrefix{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -56996,26 +57169,24 @@ func (c *PublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*Publ return ret, nil } -type PublicDelegatedPrefixesInsertCall struct { - s *Service - project string - region string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicAdvertisedPrefixesWithdrawCall struct { + s *Service + project string + publicAdvertisedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a PublicDelegatedPrefix in the specified project in the -// given region using the parameters that are included in the request. +// Withdraw: Withdraws the specified PublicAdvertisedPrefix // -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) Insert(project string, region string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesInsertCall { - c := &PublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicAdvertisedPrefix: The name of the public advertised prefix. It +// should comply with RFC1035. +func (r *PublicAdvertisedPrefixesService) Withdraw(project string, publicAdvertisedPrefix string) *PublicAdvertisedPrefixesWithdrawCall { + c := &PublicAdvertisedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region - c.publicdelegatedprefix = publicdelegatedprefix + c.publicAdvertisedPrefix = publicAdvertisedPrefix return c } @@ -57029,7 +57200,7 @@ func (r *PublicDelegatedPrefixesService) Insert(project string, region string, p // 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 *PublicDelegatedPrefixesInsertCall) RequestId(requestId string) *PublicDelegatedPrefixesInsertCall { +func (c *PublicAdvertisedPrefixesWithdrawCall) RequestId(requestId string) *PublicAdvertisedPrefixesWithdrawCall { c.urlParams_.Set("requestId", requestId) return c } @@ -57037,36 +57208,32 @@ func (c *PublicDelegatedPrefixesInsertCall) RequestId(requestId string) *PublicD // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesInsertCall { +func (c *PublicAdvertisedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicAdvertisedPrefixesWithdrawCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *PublicDelegatedPrefixesInsertCall { +func (c *PublicAdvertisedPrefixesWithdrawCall) Context(ctx context.Context) *PublicAdvertisedPrefixesWithdrawCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicDelegatedPrefixesInsertCall) Header() http.Header { +func (c *PublicAdvertisedPrefixesWithdrawCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *PublicAdvertisedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/global/publicAdvertisedPrefixes/{publicAdvertisedPrefix}/withdraw") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -57074,18 +57241,18 @@ func (c *PublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "publicAdvertisedPrefix": c.publicAdvertisedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicDelegatedPrefixes.insert" call. +// Do executes the "compute.publicAdvertisedPrefixes.withdraw" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicAdvertisedPrefixesWithdrawCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57117,24 +57284,23 @@ func (c *PublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*O return ret, nil } -type PublicDelegatedPrefixesListCall struct { +type PublicDelegatedPrefixesAggregatedListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Lists the PublicDelegatedPrefixes for a project in the given region. +// AggregatedList: Lists all PublicDelegatedPrefix resources owned by the +// specific project across all scopes. To prevent failure, Google recommends +// that you set the `returnPartialSuccess` parameter to `true`. // -// - project: Project ID for this request. -// - region: Name of the region of this request. -func (r *PublicDelegatedPrefixesService) List(project string, region string) *PublicDelegatedPrefixesListCall { - c := &PublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Name of the project scoping this request. +func (r *PublicDelegatedPrefixesService) AggregatedList(project string) *PublicDelegatedPrefixesAggregatedListCall { + c := &PublicDelegatedPrefixesAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -57170,17 +57336,30 @@ func (r *PublicDelegatedPrefixesService) List(project string, region string) *Pu // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *PublicDelegatedPrefixesListCall) Filter(filter string) *PublicDelegatedPrefixesListCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) Filter(filter string) *PublicDelegatedPrefixesAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *PublicDelegatedPrefixesAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *PublicDelegatedPrefixesAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *PublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesListCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -57193,7 +57372,7 @@ func (c *PublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *PublicDe // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *PublicDelegatedPrefixesListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesListCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -57201,7 +57380,7 @@ func (c *PublicDelegatedPrefixesListCall) OrderBy(orderBy string) *PublicDelegat // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *PublicDelegatedPrefixesListCall) PageToken(pageToken string) *PublicDelegatedPrefixesListCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) PageToken(pageToken string) *PublicDelegatedPrefixesAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -57211,15 +57390,23 @@ func (c *PublicDelegatedPrefixesListCall) PageToken(pageToken string) *PublicDel // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *PublicDelegatedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesListCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *PublicDelegatedPrefixesAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *PublicDelegatedPrefixesAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesListCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -57227,27 +57414,27 @@ func (c *PublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *PublicDe // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *PublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesListCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesListCall) Context(ctx context.Context) *PublicDelegatedPrefixesListCall { +func (c *PublicDelegatedPrefixesAggregatedListCall) Context(ctx context.Context) *PublicDelegatedPrefixesAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicDelegatedPrefixesListCall) Header() http.Header { +func (c *PublicDelegatedPrefixesAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -57255,7 +57442,7 @@ func (c *PublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/publicDelegatedPrefixes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -57264,18 +57451,17 @@ func (c *PublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicDelegatedPrefixes.list" call. +// Do executes the "compute.publicDelegatedPrefixes.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *PublicDelegatedPrefixList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use +// *PublicDelegatedPrefixAggregatedList.ServerResponse.Header or (if a response +// was returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, error) { +func (c *PublicDelegatedPrefixesAggregatedListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57294,7 +57480,7 @@ func (c *PublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*Pub if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &PublicDelegatedPrefixList{ + ret := &PublicDelegatedPrefixAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57310,7 +57496,7 @@ func (c *PublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*Pub // 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 *PublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) error) error { +func (c *PublicDelegatedPrefixesAggregatedListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -57328,134 +57514,7 @@ func (c *PublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*Pub } } -type PublicDelegatedPrefixesPatchCall struct { - s *Service - project string - region string - publicDelegatedPrefix string - publicdelegatedprefix *PublicDelegatedPrefix - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Patches the specified PublicDelegatedPrefix resource with the data -// included in the request. This method supports PATCH semantics and uses JSON -// merge patch format and processing rules. -// -// - project: Project ID for this request. -// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to -// patch. -// - region: Name of the region for this request. -func (r *PublicDelegatedPrefixesService) Patch(project string, region string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesPatchCall { - c := &PublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.publicDelegatedPrefix = publicDelegatedPrefix - c.publicdelegatedprefix = publicdelegatedprefix - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *PublicDelegatedPrefixesPatchCall) RequestId(requestId string) *PublicDelegatedPrefixesPatchCall { - 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 -// details. -func (c *PublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *PublicDelegatedPrefixesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PublicDelegatedPrefixesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") - 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{ - "project": c.project, - "region": c.region, - "publicDelegatedPrefix": c.publicDelegatedPrefix, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.publicDelegatedPrefixes.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type PublicDelegatedPrefixesWithdrawCall struct { +type PublicDelegatedPrefixesAnnounceCall struct { s *Service project string region string @@ -57465,15 +57524,15 @@ type PublicDelegatedPrefixesWithdrawCall struct { header_ http.Header } -// Withdraw: Withdraws the specified PublicDelegatedPrefix in the given region. +// Announce: Announces the specified PublicDelegatedPrefix in the given region. // // - project: Project ID for this request. // - publicDelegatedPrefix: The name of the public delegated prefix. It should // comply with RFC1035. // - region: The name of the region where the public delegated prefix is // located. It should comply with RFC1035. -func (r *PublicDelegatedPrefixesService) Withdraw(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesWithdrawCall { - c := &PublicDelegatedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *PublicDelegatedPrefixesService) Announce(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesAnnounceCall { + c := &PublicDelegatedPrefixesAnnounceCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.publicDelegatedPrefix = publicDelegatedPrefix @@ -57490,7 +57549,7 @@ func (r *PublicDelegatedPrefixesService) Withdraw(project string, region string, // 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 *PublicDelegatedPrefixesWithdrawCall) RequestId(requestId string) *PublicDelegatedPrefixesWithdrawCall { +func (c *PublicDelegatedPrefixesAnnounceCall) RequestId(requestId string) *PublicDelegatedPrefixesAnnounceCall { c.urlParams_.Set("requestId", requestId) return c } @@ -57498,32 +57557,32 @@ func (c *PublicDelegatedPrefixesWithdrawCall) RequestId(requestId string) *Publi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *PublicDelegatedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesWithdrawCall { +func (c *PublicDelegatedPrefixesAnnounceCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesAnnounceCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *PublicDelegatedPrefixesWithdrawCall) Context(ctx context.Context) *PublicDelegatedPrefixesWithdrawCall { +func (c *PublicDelegatedPrefixesAnnounceCall) Context(ctx context.Context) *PublicDelegatedPrefixesAnnounceCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *PublicDelegatedPrefixesWithdrawCall) Header() http.Header { +func (c *PublicDelegatedPrefixesAnnounceCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *PublicDelegatedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesAnnounceCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/announce") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -57538,12 +57597,12 @@ func (c *PublicDelegatedPrefixesWithdrawCall) doRequest(alt string) (*http.Respo return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.publicDelegatedPrefixes.withdraw" call. +// Do executes the "compute.publicDelegatedPrefixes.announce" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *PublicDelegatedPrefixesWithdrawCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicDelegatedPrefixesAnnounceCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57575,26 +57634,27 @@ func (c *PublicDelegatedPrefixesWithdrawCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type RegionAutoscalersDeleteCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicDelegatedPrefixesDeleteCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified autoscaler. +// Delete: Deletes the specified PublicDelegatedPrefix in the given region. // -// - autoscaler: Name of the autoscaler to delete. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { - c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to +// delete. +// - region: Name of the region of this request. +func (r *PublicDelegatedPrefixesService) Delete(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesDeleteCall { + c := &PublicDelegatedPrefixesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.autoscaler = autoscaler + c.publicDelegatedPrefix = publicDelegatedPrefix return c } @@ -57608,7 +57668,7 @@ func (r *RegionAutoscalersService) Delete(project string, region string, autosca // 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 *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutoscalersDeleteCall { +func (c *PublicDelegatedPrefixesDeleteCall) RequestId(requestId string) *PublicDelegatedPrefixesDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -57616,32 +57676,32 @@ func (c *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutosca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionAutoscalersDeleteCall) Fields(s ...googleapi.Field) *RegionAutoscalersDeleteCall { +func (c *PublicDelegatedPrefixesDeleteCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersDeleteCall) Context(ctx context.Context) *RegionAutoscalersDeleteCall { +func (c *PublicDelegatedPrefixesDeleteCall) Context(ctx context.Context) *PublicDelegatedPrefixesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionAutoscalersDeleteCall) Header() http.Header { +func (c *PublicDelegatedPrefixesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -57649,19 +57709,19 @@ func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.delete" call. +// Do executes the "compute.publicDelegatedPrefixes.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicDelegatedPrefixesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57693,34 +57753,36 @@ func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operati return ret, nil } -type RegionAutoscalersGetCall struct { - s *Service - project string - region string - autoscaler string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type PublicDelegatedPrefixesGetCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified autoscaler. +// Get: Returns the specified PublicDelegatedPrefix resource in the given +// region. // -// - autoscaler: Name of the autoscaler to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { - c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to +// return. +// - region: Name of the region of this request. +func (r *PublicDelegatedPrefixesService) Get(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesGetCall { + c := &PublicDelegatedPrefixesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.autoscaler = autoscaler + c.publicDelegatedPrefix = publicDelegatedPrefix return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscalersGetCall { +func (c *PublicDelegatedPrefixesGetCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -57728,27 +57790,27 @@ func (c *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscale // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionAutoscalersGetCall) IfNoneMatch(entityTag string) *RegionAutoscalersGetCall { +func (c *PublicDelegatedPrefixesGetCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersGetCall) Context(ctx context.Context) *RegionAutoscalersGetCall { +func (c *PublicDelegatedPrefixesGetCall) Context(ctx context.Context) *PublicDelegatedPrefixesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionAutoscalersGetCall) Header() http.Header { +func (c *PublicDelegatedPrefixesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -57756,7 +57818,7 @@ func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -57764,19 +57826,20 @@ func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "autoscaler": c.autoscaler, + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.get" call. +// Do executes the "compute.publicDelegatedPrefixes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Autoscaler.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { +// *PublicDelegatedPrefix.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *PublicDelegatedPrefixesGetCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefix, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57795,7 +57858,7 @@ func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Autoscaler{ + ret := &PublicDelegatedPrefix{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -57808,26 +57871,26 @@ func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler return ret, nil } -type RegionAutoscalersInsertCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicDelegatedPrefixesInsertCall struct { + s *Service + project string + region string + publicdelegatedprefix *PublicDelegatedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates an autoscaler in the specified project using the data -// included in the request. +// Insert: Creates a PublicDelegatedPrefix in the specified project in the +// given region using the parameters that are included in the request. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { - c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region of this request. +func (r *PublicDelegatedPrefixesService) Insert(project string, region string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesInsertCall { + c := &PublicDelegatedPrefixesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.autoscaler = autoscaler + c.publicdelegatedprefix = publicdelegatedprefix return c } @@ -57841,7 +57904,7 @@ func (r *RegionAutoscalersService) Insert(project string, region string, autosca // 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 *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutoscalersInsertCall { +func (c *PublicDelegatedPrefixesInsertCall) RequestId(requestId string) *PublicDelegatedPrefixesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -57849,36 +57912,36 @@ func (c *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutosca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionAutoscalersInsertCall) Fields(s ...googleapi.Field) *RegionAutoscalersInsertCall { +func (c *PublicDelegatedPrefixesInsertCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersInsertCall) Context(ctx context.Context) *RegionAutoscalersInsertCall { +func (c *PublicDelegatedPrefixesInsertCall) Context(ctx context.Context) *PublicDelegatedPrefixesInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionAutoscalersInsertCall) Header() http.Header { +func (c *PublicDelegatedPrefixesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -57892,12 +57955,12 @@ func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, err return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.insert" call. +// Do executes the "compute.publicDelegatedPrefixes.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicDelegatedPrefixesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -57929,7 +57992,7 @@ func (c *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operati return ret, nil } -type RegionAutoscalersListCall struct { +type PublicDelegatedPrefixesListCall struct { s *Service project string region string @@ -57939,12 +58002,12 @@ type RegionAutoscalersListCall struct { header_ http.Header } -// List: Retrieves a list of autoscalers contained within the specified region. +// List: Lists the PublicDelegatedPrefixes for a project in the given region. // // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { - c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region of this request. +func (r *PublicDelegatedPrefixesService) List(project string, region string) *PublicDelegatedPrefixesListCall { + c := &PublicDelegatedPrefixesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region return c @@ -57982,7 +58045,7 @@ func (r *RegionAutoscalersService) List(project string, region string) *RegionAu // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) Filter(filter string) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("filter", filter) return c } @@ -57992,7 +58055,7 @@ func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersList // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) MaxResults(maxResults int64) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -58005,7 +58068,7 @@ func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscal // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) OrderBy(orderBy string) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -58013,7 +58076,7 @@ func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersLi // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) PageToken(pageToken string) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -58023,7 +58086,7 @@ func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscale // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *RegionAutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -58031,7 +58094,7 @@ func (c *RegionAutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bo // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -58039,27 +58102,27 @@ func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscal // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionAutoscalersListCall) IfNoneMatch(entityTag string) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) IfNoneMatch(entityTag string) *PublicDelegatedPrefixesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersListCall) Context(ctx context.Context) *RegionAutoscalersListCall { +func (c *PublicDelegatedPrefixesListCall) Context(ctx context.Context) *PublicDelegatedPrefixesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionAutoscalersListCall) Header() http.Header { +func (c *PublicDelegatedPrefixesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -58067,7 +58130,7 @@ func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -58081,13 +58144,13 @@ func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.list" call. +// Do executes the "compute.publicDelegatedPrefixes.list" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionAutoscalerList.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAutoscalerList, error) { +// *PublicDelegatedPrefixList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *PublicDelegatedPrefixesListCall) Do(opts ...googleapi.CallOption) (*PublicDelegatedPrefixList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58106,7 +58169,7 @@ func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAut if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionAutoscalerList{ + ret := &PublicDelegatedPrefixList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -58122,7 +58185,7 @@ func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAut // 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 *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAutoscalerList) error) error { +func (c *PublicDelegatedPrefixesListCall) Pages(ctx context.Context, f func(*PublicDelegatedPrefixList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -58140,34 +58203,31 @@ func (c *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAut } } -type RegionAutoscalersPatchCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicDelegatedPrefixesPatchCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + publicdelegatedprefix *PublicDelegatedPrefix + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates an autoscaler in the specified project using the data -// included in the request. This method supports PATCH semantics and uses the -// JSON merge patch format and processing rules. +// Patch: Patches the specified PublicDelegatedPrefix resource with the data +// included in the request. This method supports PATCH semantics and uses JSON +// merge patch format and processing rules. // -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { - c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicDelegatedPrefix: Name of the PublicDelegatedPrefix resource to +// patch. +// - region: Name of the region for this request. +func (r *PublicDelegatedPrefixesService) Patch(project string, region string, publicDelegatedPrefix string, publicdelegatedprefix *PublicDelegatedPrefix) *PublicDelegatedPrefixesPatchCall { + c := &PublicDelegatedPrefixesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to patch. -func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutoscalersPatchCall { - c.urlParams_.Set("autoscaler", autoscaler) + c.publicDelegatedPrefix = publicDelegatedPrefix + c.publicdelegatedprefix = publicdelegatedprefix return c } @@ -58181,7 +58241,7 @@ func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutosc // 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 *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscalersPatchCall { +func (c *PublicDelegatedPrefixesPatchCall) RequestId(requestId string) *PublicDelegatedPrefixesPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -58189,36 +58249,36 @@ func (c *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscal // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionAutoscalersPatchCall) Fields(s ...googleapi.Field) *RegionAutoscalersPatchCall { +func (c *PublicDelegatedPrefixesPatchCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersPatchCall) Context(ctx context.Context) *RegionAutoscalersPatchCall { +func (c *PublicDelegatedPrefixesPatchCall) Context(ctx context.Context) *PublicDelegatedPrefixesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionAutoscalersPatchCall) Header() http.Header { +func (c *PublicDelegatedPrefixesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *PublicDelegatedPrefixesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.publicdelegatedprefix) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -58226,18 +58286,19 @@ func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, erro } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.patch" call. +// Do executes the "compute.publicDelegatedPrefixes.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicDelegatedPrefixesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -58269,33 +58330,28 @@ func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operatio return ret, nil } -type RegionAutoscalersUpdateCall struct { - s *Service - project string - region string - autoscaler *Autoscaler - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type PublicDelegatedPrefixesWithdrawCall struct { + s *Service + project string + region string + publicDelegatedPrefix string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates an autoscaler in the specified project using the data -// included in the request. +// Withdraw: Withdraws the specified PublicDelegatedPrefix in the given region. // -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { - c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - publicDelegatedPrefix: The name of the public delegated prefix. It should +// comply with RFC1035. +// - region: The name of the region where the public delegated prefix is +// located. It should comply with RFC1035. +func (r *PublicDelegatedPrefixesService) Withdraw(project string, region string, publicDelegatedPrefix string) *PublicDelegatedPrefixesWithdrawCall { + c := &PublicDelegatedPrefixesWithdrawCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.autoscaler = autoscaler - return c -} - -// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler -// to update. -func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutoscalersUpdateCall { - c.urlParams_.Set("autoscaler", autoscaler) + c.publicDelegatedPrefix = publicDelegatedPrefix return c } @@ -58309,7 +58365,7 @@ func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutos // 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 *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall { +func (c *PublicDelegatedPrefixesWithdrawCall) RequestId(requestId string) *PublicDelegatedPrefixesWithdrawCall { c.urlParams_.Set("requestId", requestId) return c } @@ -58317,55 +58373,52 @@ func (c *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutosca // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionAutoscalersUpdateCall) Fields(s ...googleapi.Field) *RegionAutoscalersUpdateCall { +func (c *PublicDelegatedPrefixesWithdrawCall) Fields(s ...googleapi.Field) *PublicDelegatedPrefixesWithdrawCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionAutoscalersUpdateCall) Context(ctx context.Context) *RegionAutoscalersUpdateCall { +func (c *PublicDelegatedPrefixesWithdrawCall) Context(ctx context.Context) *PublicDelegatedPrefixesWithdrawCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionAutoscalersUpdateCall) Header() http.Header { +func (c *PublicDelegatedPrefixesWithdrawCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *PublicDelegatedPrefixesWithdrawCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/publicDelegatedPrefixes/{publicDelegatedPrefix}/withdraw") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", 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{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "publicDelegatedPrefix": c.publicDelegatedPrefix, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionAutoscalers.update" call. +// Do executes the "compute.publicDelegatedPrefixes.withdraw" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *PublicDelegatedPrefixesWithdrawCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { diff --git a/compute/v1/compute3-gen.go b/compute/v1/compute3-gen.go index 1e08b6980c5..e4b814610e8 100644 --- a/compute/v1/compute3-gen.go +++ b/compute/v1/compute3-gen.go @@ -16,26 +16,26 @@ import ( gensupport "google.golang.org/api/internal/gensupport" ) -type RegionBackendServicesDeleteCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionAutoscalersDeleteCall struct { + s *Service + project string + region string + autoscaler string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified regional BackendService resource. +// Delete: Deletes the specified autoscaler. // -// - backendService: Name of the BackendService resource to delete. +// - autoscaler: Name of the autoscaler to delete. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { - c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionAutoscalersService) Delete(project string, region string, autoscaler string) *RegionAutoscalersDeleteCall { + c := &RegionAutoscalersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendService = backendService + c.autoscaler = autoscaler return c } @@ -49,7 +49,7 @@ func (r *RegionBackendServicesService) Delete(project string, region string, bac // 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 *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall { +func (c *RegionAutoscalersDeleteCall) RequestId(requestId string) *RegionAutoscalersDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -57,32 +57,32 @@ func (c *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBac // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall { +func (c *RegionAutoscalersDeleteCall) Fields(s ...googleapi.Field) *RegionAutoscalersDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall { +func (c *RegionAutoscalersDeleteCall) Context(ctx context.Context) *RegionAutoscalersDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesDeleteCall) Header() http.Header { +func (c *RegionAutoscalersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionAutoscalersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("DELETE", urls, body) if err != nil { @@ -90,19 +90,19 @@ func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, + "project": c.project, + "region": c.region, + "autoscaler": c.autoscaler, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.delete" call. +// Do executes the "compute.regionAutoscalers.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionAutoscalersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -134,34 +134,34 @@ func (c *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type RegionBackendServicesGetCall struct { - s *Service - project string - region string - backendService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionAutoscalersGetCall struct { + s *Service + project string + region string + autoscaler string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified regional BackendService resource. +// Get: Returns the specified autoscaler. // -// - backendService: Name of the BackendService resource to return. +// - autoscaler: Name of the autoscaler to return. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { - c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionAutoscalersService) Get(project string, region string, autoscaler string) *RegionAutoscalersGetCall { + c := &RegionAutoscalersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendService = backendService + c.autoscaler = autoscaler return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall { +func (c *RegionAutoscalersGetCall) Fields(s ...googleapi.Field) *RegionAutoscalersGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -169,27 +169,27 @@ func (c *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBacke // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall { +func (c *RegionAutoscalersGetCall) IfNoneMatch(entityTag string) *RegionAutoscalersGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall { +func (c *RegionAutoscalersGetCall) Context(ctx context.Context) *RegionAutoscalersGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesGetCall) Header() http.Header { +func (c *RegionAutoscalersGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionAutoscalersGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -197,7 +197,7 @@ func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, er var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers/{autoscaler}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -205,19 +205,19 @@ func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, er } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, + "project": c.project, + "region": c.region, + "autoscaler": c.autoscaler, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.get" call. +// Do executes the "compute.regionAutoscalers.get" call. // Any non-2xx status code is an error. Response headers are in either -// *BackendService.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *Autoscaler.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { +func (c *RegionAutoscalersGetCall) Do(opts ...googleapi.CallOption) (*Autoscaler, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -236,7 +236,7 @@ func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*Backen if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendService{ + ret := &Autoscaler{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -249,66 +249,77 @@ func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*Backen return ret, nil } -type RegionBackendServicesGetHealthCall struct { - s *Service - project string - region string - backendService string - resourcegroupreference *ResourceGroupReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionAutoscalersInsertCall struct { + s *Service + project string + region string + autoscaler *Autoscaler + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// GetHealth: Gets the most recent health check results for this regional -// BackendService. +// Insert: Creates an autoscaler in the specified project using the data +// included in the request. // -// - backendService: Name of the BackendService resource for which to get -// health. -// - project: . -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { - c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionAutoscalersService) Insert(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersInsertCall { + c := &RegionAutoscalersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendService = backendService - c.resourcegroupreference = resourcegroupreference + c.autoscaler = autoscaler + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionAutoscalersInsertCall) RequestId(requestId string) *RegionAutoscalersInsertCall { + 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 // details. -func (c *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall { +func (c *RegionAutoscalersInsertCall) Fields(s ...googleapi.Field) *RegionAutoscalersInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall { +func (c *RegionAutoscalersInsertCall) Context(ctx context.Context) *RegionAutoscalersInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesGetHealthCall) Header() http.Header { +func (c *RegionAutoscalersInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionAutoscalersInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -316,20 +327,18 @@ func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Respon } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.getHealth" call. +// Do executes the "compute.regionAutoscalers.insert" call. // Any non-2xx status code is an error. Response headers are in either -// *BackendServiceGroupHealth.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { +// *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 *RegionAutoscalersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -348,7 +357,7 @@ func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceGroupHealth{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -361,42 +370,109 @@ func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type RegionBackendServicesGetIamPolicyCall struct { +type RegionAutoscalersListCall struct { s *Service project string region string - resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// List: Retrieves a list of autoscalers contained within the specified region. // // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) GetIamPolicy(project string, region string, resource string) *RegionBackendServicesGetIamPolicyCall { - c := &RegionBackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *RegionAutoscalersService) List(project string, region string) *RegionAutoscalersListCall { + c := &RegionAutoscalersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionBackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionBackendServicesGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionAutoscalersListCall) Filter(filter string) *RegionAutoscalersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionAutoscalersListCall) MaxResults(maxResults int64) *RegionAutoscalersListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionAutoscalersListCall) OrderBy(orderBy string) *RegionAutoscalersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionAutoscalersListCall) PageToken(pageToken string) *RegionAutoscalersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionAutoscalersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionAutoscalersListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetIamPolicyCall { +func (c *RegionAutoscalersListCall) Fields(s ...googleapi.Field) *RegionAutoscalersListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -404,27 +480,27 @@ func (c *RegionBackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *Re // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionBackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetIamPolicyCall { +func (c *RegionAutoscalersListCall) IfNoneMatch(entityTag string) *RegionAutoscalersListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesGetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesGetIamPolicyCall { +func (c *RegionAutoscalersListCall) Context(ctx context.Context) *RegionAutoscalersListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesGetIamPolicyCall) Header() http.Header { +func (c *RegionAutoscalersListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionAutoscalersListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -432,7 +508,7 @@ func (c *RegionBackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Res var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -440,19 +516,19 @@ func (c *RegionBackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.getIamPolicy" call. +// Do executes the "compute.regionAutoscalers.list" call. // 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 *RegionBackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *RegionAutoscalerList.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionAutoscalersListCall) Do(opts ...googleapi.CallOption) (*RegionAutoscalerList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -471,7 +547,7 @@ func (c *RegionBackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &RegionAutoscalerList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -484,27 +560,55 @@ func (c *RegionBackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) return ret, nil } -type RegionBackendServicesInsertCall struct { - s *Service - project string - region string - backendservice *BackendService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Insert: Creates a regional BackendService resource in the specified project -// using the data included in the request. For more information, see Backend -// services overview. -// -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { - c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// 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 *RegionAutoscalersListCall) Pages(ctx context.Context, f func(*RegionAutoscalerList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type RegionAutoscalersPatchCall struct { + s *Service + project string + region string + autoscaler *Autoscaler + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates an autoscaler in the specified project using the data +// included in the request. This method supports PATCH semantics and uses the +// JSON merge patch format and processing rules. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionAutoscalersService) Patch(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersPatchCall { + c := &RegionAutoscalersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendservice = backendservice + c.autoscaler = autoscaler + return c +} + +// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler +// to patch. +func (c *RegionAutoscalersPatchCall) Autoscaler(autoscaler string) *RegionAutoscalersPatchCall { + c.urlParams_.Set("autoscaler", autoscaler) return c } @@ -518,7 +622,7 @@ func (r *RegionBackendServicesService) Insert(project string, region string, bac // 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 *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall { +func (c *RegionAutoscalersPatchCall) RequestId(requestId string) *RegionAutoscalersPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -526,38 +630,38 @@ func (c *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBac // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall { +func (c *RegionAutoscalersPatchCall) Fields(s ...googleapi.Field) *RegionAutoscalersPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall { +func (c *RegionAutoscalersPatchCall) Context(ctx context.Context) *RegionAutoscalersPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesInsertCall) Header() http.Header { +func (c *RegionAutoscalersPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionAutoscalersPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -569,12 +673,12 @@ func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.insert" call. +// Do executes the "compute.regionAutoscalers.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionAutoscalersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -606,148 +710,86 @@ func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type RegionBackendServicesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionAutoscalersUpdateCall struct { + s *Service + project string + region string + autoscaler *Autoscaler + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of regional BackendService resources available to -// the specified project in the given region. +// Update: Updates an autoscaler in the specified project using the data +// included in the request. // // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { - c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionAutoscalersService) Update(project string, region string, autoscaler *Autoscaler) *RegionAutoscalersUpdateCall { + c := &RegionAutoscalersUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.autoscaler = autoscaler return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall { - c.urlParams_.Set("pageToken", pageToken) +// Autoscaler sets the optional parameter "autoscaler": Name of the autoscaler +// to update. +func (c *RegionAutoscalersUpdateCall) Autoscaler(autoscaler string) *RegionAutoscalersUpdateCall { + c.urlParams_.Set("autoscaler", autoscaler) return c } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionBackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionAutoscalersUpdateCall) RequestId(requestId string) *RegionAutoscalersUpdateCall { + 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 // details. -func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { +func (c *RegionAutoscalersUpdateCall) Fields(s ...googleapi.Field) *RegionAutoscalersUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { +func (c *RegionAutoscalersUpdateCall) Context(ctx context.Context) *RegionAutoscalersUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesListCall) Header() http.Header { +func (c *RegionAutoscalersUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *RegionAutoscalersUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscaler) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/autoscalers") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } @@ -759,13 +801,12 @@ func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, e return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.list" call. +// Do executes the "compute.regionAutoscalers.update" call. // Any non-2xx status code is an error. Response headers are in either -// *BackendServiceList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { +// *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 *RegionAutoscalersUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -784,7 +825,7 @@ func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*Backe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -797,188 +838,93 @@ func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*Backe return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RegionBackendServicesListUsableCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionBackendServicesDeleteCall struct { + s *Service + project string + region string + backendService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListUsable: Retrieves a list of all usable backend services in the specified -// project in the given region. +// Delete: Deletes the specified regional BackendService resource. // -// - project: Project ID for this request. -// - region: Name of the region scoping this request. It must be a string that -// meets the requirements in RFC1035. -func (r *RegionBackendServicesService) ListUsable(project string, region string) *RegionBackendServicesListUsableCall { - c := &RegionBackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to delete. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Delete(project string, region string, backendService string) *RegionBackendServicesDeleteCall { + c := &RegionBackendServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.backendService = backendService return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionBackendServicesListUsableCall) PageToken(pageToken string) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListUsableCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionBackendServicesDeleteCall) RequestId(requestId string) *RegionBackendServicesDeleteCall { + 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 // details. -func (c *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *RegionBackendServicesListUsableCall { +func (c *RegionBackendServicesDeleteCall) Fields(s ...googleapi.Field) *RegionBackendServicesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionBackendServicesListUsableCall) IfNoneMatch(entityTag string) *RegionBackendServicesListUsableCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesListUsableCall) Context(ctx context.Context) *RegionBackendServicesListUsableCall { +func (c *RegionBackendServicesDeleteCall) Context(ctx context.Context) *RegionBackendServicesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesListUsableCall) Header() http.Header { +func (c *RegionBackendServicesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesListUsableCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionBackendServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/listUsable") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") 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{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.listUsable" call. +// Do executes the "compute.regionBackendServices.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *BackendServiceListUsable.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, error) { +// *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 *RegionBackendServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -997,7 +943,7 @@ func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &BackendServiceListUsable{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1010,105 +956,72 @@ func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RegionBackendServicesPatchCall struct { +type RegionBackendServicesGetCall struct { s *Service project string region string backendService string - backendservice *BackendService urlParams_ gensupport.URLParams + ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Patch: Updates the specified regional BackendService resource with the data -// included in the request. For more information, see Understanding backend -// services This method supports PATCH semantics and uses the JSON merge patch -// format and processing rules. +// Get: Returns the specified regional BackendService resource. // -// - backendService: Name of the BackendService resource to patch. +// - backendService: Name of the BackendService resource to return. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { - c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionBackendServicesService) Get(project string, region string, backendService string) *RegionBackendServicesGetCall { + c := &RegionBackendServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.backendService = backendService - c.backendservice = backendservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { - 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 // details. -func (c *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { +func (c *RegionBackendServicesGetCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionBackendServicesGetCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { +func (c *RegionBackendServicesGetCall) Context(ctx context.Context) *RegionBackendServicesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesPatchCall) Header() http.Header { +func (c *RegionBackendServicesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) - if err != nil { - return nil, err +func (c *RegionBackendServicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -1121,12 +1034,12 @@ func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.patch" call. +// Do executes the "compute.regionBackendServices.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *BackendService.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionBackendServicesGetCall) Do(opts ...googleapi.CallOption) (*BackendService, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1145,7 +1058,7 @@ func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Oper if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &BackendService{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1158,65 +1071,66 @@ func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Oper return ret, nil } -type RegionBackendServicesSetIamPolicyCall struct { +type RegionBackendServicesGetHealthCall struct { s *Service project string region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest + backendService string + resourcegroupreference *ResourceGroupReference urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. +// GetHealth: Gets the most recent health check results for this regional +// BackendService. // -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendServicesSetIamPolicyCall { - c := &RegionBackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource for which to get +// health. +// - project: . +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) GetHealth(project string, region string, backendService string, resourcegroupreference *ResourceGroupReference) *RegionBackendServicesGetHealthCall { + c := &RegionBackendServicesGetHealthCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest + c.backendService = backendService + c.resourcegroupreference = resourcegroupreference return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetIamPolicyCall { +func (c *RegionBackendServicesGetHealthCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetHealthCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetIamPolicyCall { +func (c *RegionBackendServicesGetHealthCall) Context(ctx context.Context) *RegionBackendServicesGetHealthCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesSetIamPolicyCall) Header() http.Header { +func (c *RegionBackendServicesGetHealthCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionBackendServicesGetHealthCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.resourcegroupreference) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/getHealth") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -1224,19 +1138,20 @@ func (c *RegionBackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.setIamPolicy" call. +// Do executes the "compute.regionBackendServices.getHealth" call. // 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 *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *BackendServiceGroupHealth.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionBackendServicesGetHealthCall) Do(opts ...googleapi.CallOption) (*BackendServiceGroupHealth, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1255,7 +1170,7 @@ func (c *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &BackendServiceGroupHealth{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1268,194 +1183,80 @@ func (c *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) return ret, nil } -type RegionBackendServicesSetSecurityPolicyCall struct { - s *Service - project string - region string - backendService string - securitypolicyreference *SecurityPolicyReference - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionBackendServicesGetIamPolicyCall struct { + s *Service + project string + region string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the -// specified backend service. For more information, see Google Cloud Armor -// Overview +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. // -// - backendService: Name of the BackendService resource to which the security -// policy should be set. The name should conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region string, backendService string, securitypolicyreference *SecurityPolicyReference) *RegionBackendServicesSetSecurityPolicyCall { - c := &RegionBackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) GetIamPolicy(project string, region string, resource string) *RegionBackendServicesGetIamPolicyCall { + c := &RegionBackendServicesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendService = backendService - c.securitypolicyreference = securitypolicyreference + c.resource = resource return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionBackendServicesSetSecurityPolicyCall) RequestId(requestId string) *RegionBackendServicesSetSecurityPolicyCall { - c.urlParams_.Set("requestId", requestId) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *RegionBackendServicesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionBackendServicesGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 // details. -func (c *RegionBackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetSecurityPolicyCall { +func (c *RegionBackendServicesGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetSecurityPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionBackendServicesSetSecurityPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *RegionBackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy") - 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "compute.regionBackendServices.setSecurityPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type RegionBackendServicesTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. -// -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { - c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionBackendServicesGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionBackendServicesGetIamPolicyCall { + c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { +func (c *RegionBackendServicesGetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { +func (c *RegionBackendServicesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) - if err != nil { - return nil, err +func (c *RegionBackendServicesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{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 } @@ -1468,13 +1269,12 @@ func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*ht return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.testIamPermissions" call. +// Do executes the "compute.regionBackendServices.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *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 *RegionBackendServicesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1493,7 +1293,7 @@ func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallO if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1506,29 +1306,26 @@ func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallO return ret, nil } -type RegionBackendServicesUpdateCall struct { +type RegionBackendServicesInsertCall struct { s *Service project string region string - backendService string backendservice *BackendService urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Update: Updates the specified regional BackendService resource with the data -// included in the request. For more information, see Backend services overview -// . +// Insert: Creates a regional BackendService resource in the specified project +// using the data included in the request. For more information, see Backend +// services overview. // -// - backendService: Name of the BackendService resource to update. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { - c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionBackendServicesService) Insert(project string, region string, backendservice *BackendService) *RegionBackendServicesInsertCall { + c := &RegionBackendServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.backendService = backendService c.backendservice = backendservice return c } @@ -1543,7 +1340,7 @@ func (r *RegionBackendServicesService) Update(project string, region string, bac // 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 *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { +func (c *RegionBackendServicesInsertCall) RequestId(requestId string) *RegionBackendServicesInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -1551,27 +1348,27 @@ func (c *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBac // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { +func (c *RegionBackendServicesInsertCall) Fields(s ...googleapi.Field) *RegionBackendServicesInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { +func (c *RegionBackendServicesInsertCall) Context(ctx context.Context) *RegionBackendServicesInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionBackendServicesUpdateCall) Header() http.Header { +func (c *RegionBackendServicesInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionBackendServicesInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) @@ -1580,27 +1377,26 @@ func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", 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{ - "project": c.project, - "region": c.region, - "backendService": c.backendService, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionBackendServices.update" call. +// Do executes the "compute.regionBackendServices.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionBackendServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1632,23 +1428,25 @@ func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Ope return ret, nil } -type RegionCommitmentsAggregatedListCall struct { +type RegionBackendServicesListCall struct { s *Service project string + region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// AggregatedList: Retrieves an aggregated list of commitments by region. To -// prevent failure, Google recommends that you set the `returnPartialSuccess` -// parameter to `true`. +// List: Retrieves the list of regional BackendService resources available to +// the specified project in the given region. // // - project: Project ID for this request. -func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { - c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) List(project string, region string) *RegionBackendServicesListCall { + c := &RegionBackendServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project + c.region = region return c } @@ -1684,30 +1482,17 @@ func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitm // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { +func (c *RegionBackendServicesListCall) Filter(filter string) *RegionBackendServicesListCall { c.urlParams_.Set("filter", filter) return c } -// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates -// whether every visible scope for each scope type (zone, region, global) -// should be included in the response. For new resource types added after this -// field, the flag has no effect as new resource types will always include -// every visible scope for each scope type in response. For resource types -// which predate this field, if this flag is omitted or false, only scopes of -// the scope types where the resource type is expected to be found will be -// included. -func (c *RegionCommitmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) - return c -} - // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { +func (c *RegionBackendServicesListCall) MaxResults(maxResults int64) *RegionBackendServicesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -1720,7 +1505,7 @@ func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *Regi // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { +func (c *RegionBackendServicesListCall) OrderBy(orderBy string) *RegionBackendServicesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -1728,7 +1513,7 @@ func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCom // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { +func (c *RegionBackendServicesListCall) PageToken(pageToken string) *RegionBackendServicesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -1738,23 +1523,15 @@ func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *Regio // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *RegionCommitmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsAggregatedListCall { +func (c *RegionBackendServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } -// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The -// Shared VPC service project id or service project number for which aggregated -// list request is invoked for subnetworks list-usable api. -func (c *RegionCommitmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCommitmentsAggregatedListCall { - c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { +func (c *RegionBackendServicesListCall) Fields(s ...googleapi.Field) *RegionBackendServicesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1762,27 +1539,27 @@ func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *Regi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { +func (c *RegionBackendServicesListCall) IfNoneMatch(entityTag string) *RegionBackendServicesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { +func (c *RegionBackendServicesListCall) Context(ctx context.Context) *RegionBackendServicesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { +func (c *RegionBackendServicesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionBackendServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1790,7 +1567,7 @@ func (c *RegionCommitmentsAggregatedListCall) 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, "projects/{project}/aggregated/commitments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1799,17 +1576,18 @@ func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Respo req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.aggregatedList" call. +// Do executes the "compute.regionBackendServices.list" call. // Any non-2xx status code is an error. Response headers are in either -// *CommitmentAggregatedList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, error) { +// *BackendServiceList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionBackendServicesListCall) Do(opts ...googleapi.CallOption) (*BackendServiceList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1828,7 +1606,7 @@ func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CommitmentAggregatedList{ + ret := &BackendServiceList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1844,7 +1622,7 @@ func (c *RegionCommitmentsAggregatedListCall) 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 *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) error) error { +func (c *RegionBackendServicesListCall) Pages(ctx context.Context, f func(*BackendServiceList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -1862,34 +1640,111 @@ func (c *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func( } } -type RegionCommitmentsGetCall struct { +type RegionBackendServicesListUsableCall struct { s *Service project string region string - commitment string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns the specified commitment resource. +// ListUsable: Retrieves a list of all usable backend services in the specified +// project in the given region. // -// - commitment: Name of the commitment to return. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { - c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region scoping this request. It must be a string that +// meets the requirements in RFC1035. +func (r *RegionBackendServicesService) ListUsable(project string, region string) *RegionBackendServicesListUsableCall { + c := &RegionBackendServicesListUsableCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionBackendServicesListUsableCall) Filter(filter string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionBackendServicesListUsableCall) MaxResults(maxResults int64) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionBackendServicesListUsableCall) OrderBy(orderBy string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionBackendServicesListUsableCall) PageToken(pageToken string) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionBackendServicesListUsableCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionBackendServicesListUsableCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { +func (c *RegionBackendServicesListUsableCall) Fields(s ...googleapi.Field) *RegionBackendServicesListUsableCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -1897,27 +1752,27 @@ func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmen // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { +func (c *RegionBackendServicesListUsableCall) IfNoneMatch(entityTag string) *RegionBackendServicesListUsableCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { +func (c *RegionBackendServicesListUsableCall) Context(ctx context.Context) *RegionBackendServicesListUsableCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCommitmentsGetCall) Header() http.Header { +func (c *RegionBackendServicesListUsableCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionBackendServicesListUsableCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -1925,7 +1780,7 @@ func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/listUsable") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -1933,19 +1788,19 @@ func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.get" call. +// Do executes the "compute.regionBackendServices.listUsable" call. // Any non-2xx status code is an error. Response headers are in either -// *Commitment.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, error) { +// *BackendServiceListUsable.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionBackendServicesListUsableCall) Do(opts ...googleapi.CallOption) (*BackendServiceListUsable, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -1964,7 +1819,7 @@ func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Commitment{ + ret := &BackendServiceListUsable{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -1977,26 +1832,52 @@ func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment return ret, nil } -type RegionCommitmentsInsertCall struct { - s *Service - project string - region string - commitment *Commitment - 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 *RegionBackendServicesListUsableCall) Pages(ctx context.Context, f func(*BackendServiceListUsable) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Insert: Creates a commitment in the specified project using the data -// included in the request. +type RegionBackendServicesPatchCall struct { + s *Service + project string + region string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates the specified regional BackendService resource with the data +// included in the request. For more information, see Understanding backend +// services This method supports PATCH semantics and uses the JSON merge patch +// format and processing rules. // +// - backendService: Name of the BackendService resource to patch. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { - c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Patch(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesPatchCall { + c := &RegionBackendServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment + c.backendService = backendService + c.backendservice = backendservice return c } @@ -2010,7 +1891,7 @@ func (r *RegionCommitmentsService) Insert(project string, region string, commitm // 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 *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall { +func (c *RegionBackendServicesPatchCall) RequestId(requestId string) *RegionBackendServicesPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -2018,55 +1899,56 @@ func (c *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitm // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { +func (c *RegionBackendServicesPatchCall) Fields(s ...googleapi.Field) *RegionBackendServicesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { +func (c *RegionBackendServicesPatchCall) Context(ctx context.Context) *RegionBackendServicesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCommitmentsInsertCall) Header() http.Header { +func (c *RegionBackendServicesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionBackendServicesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitment) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") 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{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.insert" call. +// Do executes the "compute.regionBackendServices.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionBackendServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2098,164 +1980,85 @@ func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operati return ret, nil } -type RegionCommitmentsListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionBackendServicesSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves a list of commitments contained within the specified region. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { - c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionBackendServicesSetIamPolicyCall { + c := &RegionBackendServicesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionCommitmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { +func (c *RegionBackendServicesSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { +func (c *RegionBackendServicesSetIamPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCommitmentsListCall) Header() http.Header { +func (c *RegionBackendServicesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *RegionBackendServicesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{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{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.list" call. +// Do executes the "compute.regionBackendServices.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *CommitmentList.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *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 *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, error) { +func (c *RegionBackendServicesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2274,7 +2077,7 @@ func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*Commitmen if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CommitmentList{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2287,57 +2090,31 @@ func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*Commitmen return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RegionCommitmentsUpdateCall struct { - s *Service - project string - region string - commitment string - commitment2 *Commitment - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionBackendServicesSetSecurityPolicyCall struct { + s *Service + project string + region string + backendService string + securitypolicyreference *SecurityPolicyReference + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Updates the specified commitment with the data included in the -// request. Update is performed only on selected fields included as part of -// update-mask. Only the following fields can be modified: auto_renew. +// SetSecurityPolicy: Sets the Google Cloud Armor security policy for the +// specified backend service. For more information, see Google Cloud Armor +// Overview // -// - commitment: Name of the commitment for which auto renew is being updated. -// - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionCommitmentsService) Update(project string, region string, commitment string, commitment2 *Commitment) *RegionCommitmentsUpdateCall { - c := &RegionCommitmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - backendService: Name of the BackendService resource to which the security +// policy should be set. The name should conform to RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) SetSecurityPolicy(project string, region string, backendService string, securitypolicyreference *SecurityPolicyReference) *RegionBackendServicesSetSecurityPolicyCall { + c := &RegionBackendServicesSetSecurityPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.commitment = commitment - c.commitment2 = commitment2 - return c -} - -// Paths sets the optional parameter "paths": -func (c *RegionCommitmentsUpdateCall) Paths(paths ...string) *RegionCommitmentsUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) + c.backendService = backendService + c.securitypolicyreference = securitypolicyreference return c } @@ -2351,71 +2128,64 @@ func (c *RegionCommitmentsUpdateCall) Paths(paths ...string) *RegionCommitmentsU // 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 *RegionCommitmentsUpdateCall) RequestId(requestId string) *RegionCommitmentsUpdateCall { +func (c *RegionBackendServicesSetSecurityPolicyCall) RequestId(requestId string) *RegionBackendServicesSetSecurityPolicyCall { c.urlParams_.Set("requestId", requestId) return c } -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionCommitmentsUpdateCall) UpdateMask(updateMask string) *RegionCommitmentsUpdateCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionCommitmentsUpdateCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateCall { +func (c *RegionBackendServicesSetSecurityPolicyCall) Fields(s ...googleapi.Field) *RegionBackendServicesSetSecurityPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionCommitmentsUpdateCall) Context(ctx context.Context) *RegionCommitmentsUpdateCall { +func (c *RegionBackendServicesSetSecurityPolicyCall) Context(ctx context.Context) *RegionBackendServicesSetSecurityPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionCommitmentsUpdateCall) Header() http.Header { +func (c *RegionBackendServicesSetSecurityPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionCommitmentsUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionBackendServicesSetSecurityPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitment2) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.securitypolicyreference) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}/setSecurityPolicy") 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{ - "project": c.project, - "region": c.region, - "commitment": c.commitment, + "project": c.project, + "region": c.region, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionCommitments.update" call. +// Do executes the "compute.regionBackendServices.setSecurityPolicy" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionCommitmentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionBackendServicesSetSecurityPolicyCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2447,90 +2217,212 @@ func (c *RegionCommitmentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operati return ret, nil } -type RegionDiskTypesGetCall struct { - s *Service - project string - region string - diskType string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionBackendServicesTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified regional disk type. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // -// - diskType: Name of the disk type to return. // - project: Project ID for this request. // - region: The name of the region for this request. -func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { - c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *RegionBackendServicesService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionBackendServicesTestIamPermissionsCall { + c := &RegionBackendServicesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.diskType = diskType + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDiskTypesGetCall) Fields(s ...googleapi.Field) *RegionDiskTypesGetCall { +func (c *RegionBackendServicesTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionBackendServicesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionDiskTypesGetCall) IfNoneMatch(entityTag string) *RegionDiskTypesGetCall { - c.ifNoneMatch_ = entityTag +// Context sets the context to be used in this call's Do method. +func (c *RegionBackendServicesTestIamPermissionsCall) Context(ctx context.Context) *RegionBackendServicesTestIamPermissionsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionBackendServicesTestIamPermissionsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionBackendServicesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{resource}/testIamPermissions") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionBackendServices.testIamPermissions" call. +// Any non-2xx status code is an error. Response headers are in either +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionBackendServicesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, 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 := &TestPermissionsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type RegionBackendServicesUpdateCall struct { + s *Service + project string + region string + backendService string + backendservice *BackendService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the specified regional BackendService resource with the data +// included in the request. For more information, see Backend services overview +// . +// +// - backendService: Name of the BackendService resource to update. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionBackendServicesService) Update(project string, region string, backendService string, backendservice *BackendService) *RegionBackendServicesUpdateCall { + c := &RegionBackendServicesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.backendService = backendService + c.backendservice = backendservice + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionBackendServicesUpdateCall) RequestId(requestId string) *RegionBackendServicesUpdateCall { + 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 +// details. +func (c *RegionBackendServicesUpdateCall) Fields(s ...googleapi.Field) *RegionBackendServicesUpdateCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDiskTypesGetCall) Context(ctx context.Context) *RegionDiskTypesGetCall { +func (c *RegionBackendServicesUpdateCall) Context(ctx context.Context) *RegionBackendServicesUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDiskTypesGetCall) Header() http.Header { +func (c *RegionBackendServicesUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *RegionBackendServicesUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.backendservice) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes/{diskType}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/backendServices/{backendService}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "diskType": c.diskType, + "project": c.project, + "region": c.region, + "backendService": c.backendService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDiskTypes.get" call. +// Do executes the "compute.regionBackendServices.update" call. // Any non-2xx status code is an error. Response headers are in either -// *DiskType.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { +func (c *RegionBackendServicesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2549,7 +2441,7 @@ func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, er if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskType{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2562,25 +2454,23 @@ func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, er return ret, nil } -type RegionDiskTypesListCall struct { +type RegionCommitmentsAggregatedListCall struct { s *Service project string - region string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// List: Retrieves a list of regional disk types available to the specified -// project. +// AggregatedList: Retrieves an aggregated list of commitments by region. To +// prevent failure, Google recommends that you set the `returnPartialSuccess` +// parameter to `true`. // // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { - c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionCommitmentsService) AggregatedList(project string) *RegionCommitmentsAggregatedListCall { + c := &RegionCommitmentsAggregatedListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project - c.region = region return c } @@ -2616,17 +2506,30 @@ func (r *RegionDiskTypesService) List(project string, region string) *RegionDisk // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *RegionDiskTypesListCall) Filter(filter string) *RegionDiskTypesListCall { +func (c *RegionCommitmentsAggregatedListCall) Filter(filter string) *RegionCommitmentsAggregatedListCall { c.urlParams_.Set("filter", filter) return c } +// IncludeAllScopes sets the optional parameter "includeAllScopes": Indicates +// whether every visible scope for each scope type (zone, region, global) +// should be included in the response. For new resource types added after this +// field, the flag has no effect as new resource types will always include +// every visible scope for each scope type in response. For resource types +// which predate this field, if this flag is omitted or false, only scopes of +// the scope types where the resource type is expected to be found will be +// included. +func (c *RegionCommitmentsAggregatedListCall) IncludeAllScopes(includeAllScopes bool) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("includeAllScopes", fmt.Sprint(includeAllScopes)) + return c +} + // MaxResults sets the optional parameter "maxResults": The maximum number of // results per page that should be returned. If the number of available results // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionDiskTypesListCall) MaxResults(maxResults int64) *RegionDiskTypesListCall { +func (c *RegionCommitmentsAggregatedListCall) MaxResults(maxResults int64) *RegionCommitmentsAggregatedListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -2639,7 +2542,7 @@ func (c *RegionDiskTypesListCall) MaxResults(maxResults int64) *RegionDiskTypesL // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionDiskTypesListCall) OrderBy(orderBy string) *RegionDiskTypesListCall { +func (c *RegionCommitmentsAggregatedListCall) OrderBy(orderBy string) *RegionCommitmentsAggregatedListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -2647,7 +2550,7 @@ func (c *RegionDiskTypesListCall) OrderBy(orderBy string) *RegionDiskTypesListCa // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *RegionDiskTypesListCall) PageToken(pageToken string) *RegionDiskTypesListCall { +func (c *RegionCommitmentsAggregatedListCall) PageToken(pageToken string) *RegionCommitmentsAggregatedListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -2657,15 +2560,23 @@ func (c *RegionDiskTypesListCall) PageToken(pageToken string) *RegionDiskTypesLi // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *RegionDiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDiskTypesListCall { +func (c *RegionCommitmentsAggregatedListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsAggregatedListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } +// ServiceProjectNumber sets the optional parameter "serviceProjectNumber": The +// Shared VPC service project id or service project number for which aggregated +// list request is invoked for subnetworks list-usable api. +func (c *RegionCommitmentsAggregatedListCall) ServiceProjectNumber(serviceProjectNumber int64) *RegionCommitmentsAggregatedListCall { + c.urlParams_.Set("serviceProjectNumber", fmt.Sprint(serviceProjectNumber)) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesListCall { +func (c *RegionCommitmentsAggregatedListCall) Fields(s ...googleapi.Field) *RegionCommitmentsAggregatedListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -2673,27 +2584,27 @@ func (c *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesL // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionDiskTypesListCall) IfNoneMatch(entityTag string) *RegionDiskTypesListCall { +func (c *RegionCommitmentsAggregatedListCall) IfNoneMatch(entityTag string) *RegionCommitmentsAggregatedListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDiskTypesListCall) Context(ctx context.Context) *RegionDiskTypesListCall { +func (c *RegionCommitmentsAggregatedListCall) Context(ctx context.Context) *RegionCommitmentsAggregatedListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDiskTypesListCall) Header() http.Header { +func (c *RegionCommitmentsAggregatedListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsAggregatedListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -2701,7 +2612,7 @@ func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/aggregated/commitments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -2710,18 +2621,17 @@ func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ "project": c.project, - "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDiskTypes.list" call. +// Do executes the "compute.regionCommitments.aggregatedList" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionDiskTypeList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskTypeList, error) { +// *CommitmentAggregatedList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionCommitmentsAggregatedListCall) Do(opts ...googleapi.CallOption) (*CommitmentAggregatedList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2740,7 +2650,7 @@ func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskT if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionDiskTypeList{ + ret := &CommitmentAggregatedList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2756,7 +2666,7 @@ func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskT // 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 *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskTypeList) error) error { +func (c *RegionCommitmentsAggregatedListCall) Pages(ctx context.Context, f func(*CommitmentAggregatedList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -2774,101 +2684,90 @@ func (c *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskT } } -type RegionDisksAddResourcePoliciesCall struct { - s *Service - project string - region string - disk string - regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCommitmentsGetCall struct { + s *Service + project string + region string + commitment string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// AddResourcePolicies: Adds existing resource policies to a regional disk. You -// can only add one policy which will be applied to this disk for scheduling -// snapshot creation. +// Get: Returns the specified commitment resource. // -// - disk: The disk name for this request. +// - commitment: Name of the commitment to return. // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) AddResourcePolicies(project string, region string, disk string, regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest) *RegionDisksAddResourcePoliciesCall { - c := &RegionDisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) Get(project string, region string, commitment string) *RegionCommitmentsGetCall { + c := &RegionCommitmentsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk - c.regiondisksaddresourcepoliciesrequest = regiondisksaddresourcepoliciesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionDisksAddResourcePoliciesCall) RequestId(requestId string) *RegionDisksAddResourcePoliciesCall { - c.urlParams_.Set("requestId", requestId) + c.commitment = commitment return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksAddResourcePoliciesCall { +func (c *RegionCommitmentsGetCall) Fields(s ...googleapi.Field) *RegionCommitmentsGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionCommitmentsGetCall) IfNoneMatch(entityTag string) *RegionCommitmentsGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionDisksAddResourcePoliciesCall) Context(ctx context.Context) *RegionDisksAddResourcePoliciesCall { +func (c *RegionCommitmentsGetCall) Context(ctx context.Context) *RegionCommitmentsGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksAddResourcePoliciesCall) Header() http.Header { +func (c *RegionCommitmentsGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiondisksaddresourcepoliciesrequest) - if err != nil { - return nil, err +func (c *RegionCommitmentsGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, + "project": c.project, + "region": c.region, + "commitment": c.commitment, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.addResourcePolicies" call. +// Do executes the "compute.regionCommitments.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *Commitment.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionCommitmentsGetCall) Do(opts ...googleapi.CallOption) (*Commitment, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -2887,7 +2786,7 @@ func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &Commitment{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -2900,25 +2799,26 @@ func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type RegionDisksBulkInsertCall struct { - s *Service - project string - region string - bulkinsertdiskresource *BulkInsertDiskResource - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCommitmentsInsertCall struct { + s *Service + project string + region string + commitment *Commitment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// BulkInsert: Bulk create a set of disks. +// Insert: Creates a commitment in the specified project using the data +// included in the request. // // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) BulkInsert(project string, region string, bulkinsertdiskresource *BulkInsertDiskResource) *RegionDisksBulkInsertCall { - c := &RegionDisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionCommitmentsService) Insert(project string, region string, commitment *Commitment) *RegionCommitmentsInsertCall { + c := &RegionCommitmentsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.bulkinsertdiskresource = bulkinsertdiskresource + c.commitment = commitment return c } @@ -2932,7 +2832,7 @@ func (r *RegionDisksService) BulkInsert(project string, region string, bulkinser // 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 *RegionDisksBulkInsertCall) RequestId(requestId string) *RegionDisksBulkInsertCall { +func (c *RegionCommitmentsInsertCall) RequestId(requestId string) *RegionCommitmentsInsertCall { c.urlParams_.Set("requestId", requestId) return c } @@ -2940,36 +2840,36 @@ func (c *RegionDisksBulkInsertCall) RequestId(requestId string) *RegionDisksBulk // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksBulkInsertCall) Fields(s ...googleapi.Field) *RegionDisksBulkInsertCall { +func (c *RegionCommitmentsInsertCall) Fields(s ...googleapi.Field) *RegionCommitmentsInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksBulkInsertCall) Context(ctx context.Context) *RegionDisksBulkInsertCall { +func (c *RegionCommitmentsInsertCall) Context(ctx context.Context) *RegionCommitmentsInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksBulkInsertCall) Header() http.Header { +func (c *RegionCommitmentsInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionCommitmentsInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkinsertdiskresource) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitment) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/bulkInsert") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -2983,12 +2883,12 @@ func (c *RegionDisksBulkInsertCall) doRequest(alt string) (*http.Response, error return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.bulkInsert" call. +// Do executes the "compute.regionCommitments.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionCommitmentsInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3020,84 +2920,147 @@ func (c *RegionDisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation return ret, nil } -type RegionDisksCreateSnapshotCall struct { - s *Service - project string - region string - disk string - snapshot *Snapshot - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionCommitmentsListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// CreateSnapshot: Creates a snapshot of a specified persistent disk. For -// regular snapshot creation, consider using snapshots.insert instead, as that -// method supports more features, such as creating snapshots in a project -// different from the source disk project. +// List: Retrieves a list of commitments contained within the specified region. // -// - disk: Name of the regional persistent disk to snapshot. // - project: Project ID for this request. // - region: Name of the region for this request. -func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { - c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionCommitmentsService) List(project string, region string) *RegionCommitmentsListCall { + c := &RegionCommitmentsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk - c.snapshot = snapshot return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionDisksCreateSnapshotCall) RequestId(requestId string) *RegionDisksCreateSnapshotCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionCommitmentsListCall) Filter(filter string) *RegionCommitmentsListCall { + c.urlParams_.Set("filter", filter) return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksCreateSnapshotCall) Fields(s ...googleapi.Field) *RegionDisksCreateSnapshotCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionCommitmentsListCall) MaxResults(maxResults int64) *RegionCommitmentsListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksCreateSnapshotCall) Context(ctx context.Context) *RegionDisksCreateSnapshotCall { - c.ctx_ = ctx +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionCommitmentsListCall) OrderBy(orderBy string) *RegionCommitmentsListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksCreateSnapshotCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionCommitmentsListCall) PageToken(pageToken string) *RegionCommitmentsListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) - if err != nil { - return nil, err +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionCommitmentsListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionCommitmentsListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionCommitmentsListCall) Fields(s ...googleapi.Field) *RegionCommitmentsListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionCommitmentsListCall) IfNoneMatch(entityTag string) *RegionCommitmentsListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionCommitmentsListCall) Context(ctx context.Context) *RegionCommitmentsListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionCommitmentsListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionCommitmentsListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/createSnapshot") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -3105,17 +3068,16 @@ func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, e googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.createSnapshot" call. +// Do executes the "compute.regionCommitments.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// *CommitmentList.ServerResponse.Header or (if a response was returned at all) +// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionCommitmentsListCall) Do(opts ...googleapi.CallOption) (*CommitmentList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3134,7 +3096,7 @@ func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Opera if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &CommitmentList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3147,29 +3109,57 @@ func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Opera return ret, nil } -type RegionDisksDeleteCall struct { - s *Service - project string - region string - disk 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 *RegionCommitmentsListCall) Pages(ctx context.Context, f func(*CommitmentList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes the specified regional persistent disk. Deleting a regional -// disk removes all the replicas of its data permanently and is irreversible. -// However, deleting a disk does not delete any snapshots previously made from -// the disk. You must separately delete snapshots. +type RegionCommitmentsUpdateCall struct { + s *Service + project string + region string + commitment string + commitment2 *Commitment + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Update: Updates the specified commitment with the data included in the +// request. Update is performed only on selected fields included as part of +// update-mask. Only the following fields can be modified: auto_renew. // -// - disk: Name of the regional persistent disk to delete. +// - commitment: Name of the commitment for which auto renew is being updated. // - project: Project ID for this request. // - region: Name of the region for this request. -func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { - c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionCommitmentsService) Update(project string, region string, commitment string, commitment2 *Commitment) *RegionCommitmentsUpdateCall { + c := &RegionCommitmentsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk + c.commitment = commitment + c.commitment2 = commitment2 + return c +} + +// Paths sets the optional parameter "paths": +func (c *RegionCommitmentsUpdateCall) Paths(paths ...string) *RegionCommitmentsUpdateCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) return c } @@ -3183,60 +3173,71 @@ func (r *RegionDisksService) Delete(project string, region string, disk string) // 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 *RegionDisksDeleteCall) RequestId(requestId string) *RegionDisksDeleteCall { +func (c *RegionCommitmentsUpdateCall) RequestId(requestId string) *RegionCommitmentsUpdateCall { c.urlParams_.Set("requestId", requestId) return c } +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *RegionCommitmentsUpdateCall) UpdateMask(updateMask string) *RegionCommitmentsUpdateCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksDeleteCall) Fields(s ...googleapi.Field) *RegionDisksDeleteCall { +func (c *RegionCommitmentsUpdateCall) Fields(s ...googleapi.Field) *RegionCommitmentsUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksDeleteCall) Context(ctx context.Context) *RegionDisksDeleteCall { +func (c *RegionCommitmentsUpdateCall) Context(ctx context.Context) *RegionCommitmentsUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksDeleteCall) Header() http.Header { +func (c *RegionCommitmentsUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionCommitmentsUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitment2) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/commitments/{commitment}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, + "project": c.project, + "region": c.region, + "commitment": c.commitment, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.delete" call. +// Do executes the "compute.regionCommitments.update" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionCommitmentsUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3268,34 +3269,34 @@ func (c *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, er return ret, nil } -type RegionDisksGetCall struct { +type RegionDiskTypesGetCall struct { s *Service project string region string - disk string + diskType string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// Get: Returns a specified regional persistent disk. +// Get: Returns the specified regional disk type. // -// - disk: Name of the regional persistent disk to return. +// - diskType: Name of the disk type to return. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { - c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDiskTypesService) Get(project string, region string, diskType string) *RegionDiskTypesGetCall { + c := &RegionDiskTypesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk + c.diskType = diskType return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksGetCall) Fields(s ...googleapi.Field) *RegionDisksGetCall { +func (c *RegionDiskTypesGetCall) Fields(s ...googleapi.Field) *RegionDiskTypesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3303,27 +3304,27 @@ func (c *RegionDisksGetCall) Fields(s ...googleapi.Field) *RegionDisksGetCall { // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionDisksGetCall) IfNoneMatch(entityTag string) *RegionDisksGetCall { +func (c *RegionDiskTypesGetCall) IfNoneMatch(entityTag string) *RegionDiskTypesGetCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetCall) Context(ctx context.Context) *RegionDisksGetCall { +func (c *RegionDiskTypesGetCall) Context(ctx context.Context) *RegionDiskTypesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksGetCall) Header() http.Header { +func (c *RegionDiskTypesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDiskTypesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -3331,7 +3332,7 @@ func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes/{diskType}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3339,19 +3340,19 @@ func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "disk": c.disk, + "project": c.project, + "region": c.region, + "diskType": c.diskType, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.get" call. +// Do executes the "compute.regionDiskTypes.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Disk.ServerResponse.Header or (if a response was returned at all) in +// *DiskType.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { +func (c *RegionDiskTypesGetCall) Do(opts ...googleapi.CallOption) (*DiskType, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3370,7 +3371,7 @@ func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Disk{ + ret := &DiskType{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3383,42 +3384,110 @@ func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { return ret, nil } -type RegionDisksGetIamPolicyCall struct { +type RegionDiskTypesListCall struct { s *Service project string region string - resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// GetIamPolicy: Gets the access control policy for a resource. May be empty if -// no such policy or resource exists. +// List: Retrieves a list of regional disk types available to the specified +// project. // // - project: Project ID for this request. // - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) GetIamPolicy(project string, region string, resource string) *RegionDisksGetIamPolicyCall { - c := &RegionDisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDiskTypesService) List(project string, region string) *RegionDiskTypesListCall { + c := &RegionDiskTypesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource return c } -// OptionsRequestedPolicyVersion sets the optional parameter -// "optionsRequestedPolicyVersion": Requested IAM Policy version. -func (c *RegionDisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionDisksGetIamPolicyCall { - c.urlParams_.Set("optionsRequestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionDiskTypesListCall) Filter(filter string) *RegionDiskTypesListCall { + c.urlParams_.Set("filter", filter) return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionDiskTypesListCall) MaxResults(maxResults int64) *RegionDiskTypesListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionDiskTypesListCall) OrderBy(orderBy string) *RegionDiskTypesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionDiskTypesListCall) PageToken(pageToken string) *RegionDiskTypesListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionDiskTypesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDiskTypesListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksGetIamPolicyCall { +func (c *RegionDiskTypesListCall) Fields(s ...googleapi.Field) *RegionDiskTypesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3426,27 +3495,27 @@ func (c *RegionDisksGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksG // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionDisksGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionDisksGetIamPolicyCall { +func (c *RegionDiskTypesListCall) IfNoneMatch(entityTag string) *RegionDiskTypesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksGetIamPolicyCall) Context(ctx context.Context) *RegionDisksGetIamPolicyCall { +func (c *RegionDiskTypesListCall) Context(ctx context.Context) *RegionDiskTypesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksGetIamPolicyCall) Header() http.Header { +func (c *RegionDiskTypesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDiskTypesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -3454,7 +3523,7 @@ func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, err var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/diskTypes") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -3462,19 +3531,19 @@ func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.getIamPolicy" call. +// Do executes the "compute.regionDiskTypes.list" call. // 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 *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *RegionDiskTypeList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionDiskTypesListCall) Do(opts ...googleapi.CallOption) (*RegionDiskTypeList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3493,7 +3562,7 @@ func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &RegionDiskTypeList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3506,26 +3575,51 @@ func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, return ret, nil } -type RegionDisksInsertCall struct { - s *Service - project string - region string - disk *Disk - 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 *RegionDiskTypesListCall) Pages(ctx context.Context, f func(*RegionDiskTypeList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Insert: Creates a persistent regional disk in the specified project using -// the data included in the request. +type RegionDisksAddResourcePoliciesCall struct { + s *Service + project string + region string + disk string + regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// AddResourcePolicies: Adds existing resource policies to a regional disk. You +// can only add one policy which will be applied to this disk for scheduling +// snapshot creation. // +// - disk: The disk name for this request. // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { - c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDisksService) AddResourcePolicies(project string, region string, disk string, regiondisksaddresourcepoliciesrequest *RegionDisksAddResourcePoliciesRequest) *RegionDisksAddResourcePoliciesCall { + c := &RegionDisksAddResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk + c.regiondisksaddresourcepoliciesrequest = regiondisksaddresourcepoliciesrequest return c } @@ -3539,51 +3633,44 @@ func (r *RegionDisksService) Insert(project string, region string, disk *Disk) * // 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 *RegionDisksInsertCall) RequestId(requestId string) *RegionDisksInsertCall { +func (c *RegionDisksAddResourcePoliciesCall) RequestId(requestId string) *RegionDisksAddResourcePoliciesCall { c.urlParams_.Set("requestId", requestId) return c } -// SourceImage sets the optional parameter "sourceImage": Source image to -// restore onto a disk. This field is optional. -func (c *RegionDisksInsertCall) SourceImage(sourceImage string) *RegionDisksInsertCall { - c.urlParams_.Set("sourceImage", sourceImage) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksInsertCall) Fields(s ...googleapi.Field) *RegionDisksInsertCall { +func (c *RegionDisksAddResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksAddResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksInsertCall) Context(ctx context.Context) *RegionDisksInsertCall { +func (c *RegionDisksAddResourcePoliciesCall) Context(ctx context.Context) *RegionDisksAddResourcePoliciesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksInsertCall) Header() http.Header { +func (c *RegionDisksAddResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksAddResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiondisksaddresourcepoliciesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/addResourcePolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3593,16 +3680,17 @@ func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.insert" call. +// Do executes the "compute.regionDisks.addResourcePolicies" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksAddResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3634,148 +3722,78 @@ func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, er return ret, nil } -type RegionDisksListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksBulkInsertCall struct { + s *Service + project string + region string + bulkinsertdiskresource *BulkInsertDiskResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of persistent disks contained within the specified -// region. +// BulkInsert: Bulk create a set of disks. // // - project: Project ID for this request. -// - region: Name of the region for this request. -func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { - c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDisksService) BulkInsert(project string, region string, bulkinsertdiskresource *BulkInsertDiskResource) *RegionDisksBulkInsertCall { + c := &RegionDisksBulkInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.bulkinsertdiskresource = bulkinsertdiskresource return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionDisksListCall) Filter(filter string) *RegionDisksListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionDisksListCall) MaxResults(maxResults int64) *RegionDisksListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionDisksBulkInsertCall) RequestId(requestId string) *RegionDisksBulkInsertCall { + c.urlParams_.Set("requestId", requestId) return c } -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionDisksListCall) OrderBy(orderBy string) *RegionDisksListCall { - c.urlParams_.Set("orderBy", orderBy) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionDisksBulkInsertCall) Fields(s ...googleapi.Field) *RegionDisksBulkInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionDisksListCall) PageToken(pageToken string) *RegionDisksListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionDisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDisksListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksListCall) Fields(s ...googleapi.Field) *RegionDisksListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionDisksListCall) IfNoneMatch(entityTag string) *RegionDisksListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksListCall) Context(ctx context.Context) *RegionDisksListCall { - c.ctx_ = ctx +// Context sets the context to be used in this call's Do method. +func (c *RegionDisksBulkInsertCall) Context(ctx context.Context) *RegionDisksBulkInsertCall { + c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksListCall) Header() http.Header { +func (c *RegionDisksBulkInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *RegionDisksBulkInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.bulkinsertdiskresource) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/bulkInsert") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -3787,12 +3805,12 @@ func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.list" call. +// Do executes the "compute.regionDisks.bulkInsert" call. // Any non-2xx status code is an error. Response headers are in either -// *DiskList.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { +func (c *RegionDisksBulkInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3811,7 +3829,7 @@ func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &DiskList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3824,49 +3842,31 @@ func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionDisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RegionDisksRemoveResourcePoliciesCall struct { - s *Service - project string - region string - disk string - regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksCreateSnapshotCall struct { + s *Service + project string + region string + disk string + snapshot *Snapshot + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RemoveResourcePolicies: Removes resource policies from a regional disk. +// CreateSnapshot: Creates a snapshot of a specified persistent disk. For +// regular snapshot creation, consider using snapshots.insert instead, as that +// method supports more features, such as creating snapshots in a project +// different from the source disk project. // -// - disk: The disk name for this request. +// - disk: Name of the regional persistent disk to snapshot. // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) RemoveResourcePolicies(project string, region string, disk string, regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest) *RegionDisksRemoveResourcePoliciesCall { - c := &RegionDisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionDisksService) CreateSnapshot(project string, region string, disk string, snapshot *Snapshot) *RegionDisksCreateSnapshotCall { + c := &RegionDisksCreateSnapshotCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk - c.regiondisksremoveresourcepoliciesrequest = regiondisksremoveresourcepoliciesrequest + c.snapshot = snapshot return c } @@ -3880,7 +3880,7 @@ func (r *RegionDisksService) RemoveResourcePolicies(project string, region strin // 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 *RegionDisksRemoveResourcePoliciesCall) RequestId(requestId string) *RegionDisksRemoveResourcePoliciesCall { +func (c *RegionDisksCreateSnapshotCall) RequestId(requestId string) *RegionDisksCreateSnapshotCall { c.urlParams_.Set("requestId", requestId) return c } @@ -3888,36 +3888,36 @@ func (c *RegionDisksRemoveResourcePoliciesCall) RequestId(requestId string) *Reg // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksRemoveResourcePoliciesCall { +func (c *RegionDisksCreateSnapshotCall) Fields(s ...googleapi.Field) *RegionDisksCreateSnapshotCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksRemoveResourcePoliciesCall) Context(ctx context.Context) *RegionDisksRemoveResourcePoliciesCall { +func (c *RegionDisksCreateSnapshotCall) Context(ctx context.Context) *RegionDisksCreateSnapshotCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksRemoveResourcePoliciesCall) Header() http.Header { +func (c *RegionDisksCreateSnapshotCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksCreateSnapshotCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiondisksremoveresourcepoliciesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.snapshot) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/createSnapshot") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3932,12 +3932,12 @@ func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.removeResourcePolicies" call. +// Do executes the "compute.regionDisks.createSnapshot" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksCreateSnapshotCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3969,28 +3969,29 @@ func (c *RegionDisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) return ret, nil } -type RegionDisksResizeCall struct { - s *Service - project string - region string - disk string - regiondisksresizerequest *RegionDisksResizeRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksDeleteCall struct { + s *Service + project string + region string + disk string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resize: Resizes the specified regional persistent disk. +// Delete: Deletes the specified regional persistent disk. Deleting a regional +// disk removes all the replicas of its data permanently and is irreversible. +// However, deleting a disk does not delete any snapshots previously made from +// the disk. You must separately delete snapshots. // -// - disk: Name of the regional persistent disk. -// - project: The project ID for this request. +// - disk: Name of the regional persistent disk to delete. +// - project: Project ID for this request. // - region: Name of the region for this request. -func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { - c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDisksService) Delete(project string, region string, disk string) *RegionDisksDeleteCall { + c := &RegionDisksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk - c.regiondisksresizerequest = regiondisksresizerequest return c } @@ -4004,7 +4005,7 @@ func (r *RegionDisksService) Resize(project string, region string, disk string, // 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 *RegionDisksResizeCall) RequestId(requestId string) *RegionDisksResizeCall { +func (c *RegionDisksDeleteCall) RequestId(requestId string) *RegionDisksDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -4012,38 +4013,34 @@ func (c *RegionDisksResizeCall) RequestId(requestId string) *RegionDisksResizeCa // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksResizeCall) Fields(s ...googleapi.Field) *RegionDisksResizeCall { +func (c *RegionDisksDeleteCall) Fields(s ...googleapi.Field) *RegionDisksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksResizeCall) Context(ctx context.Context) *RegionDisksResizeCall { +func (c *RegionDisksDeleteCall) Context(ctx context.Context) *RegionDisksDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksResizeCall) Header() http.Header { +func (c *RegionDisksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *RegionDisksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiondisksresizerequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/resize") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -4056,12 +4053,12 @@ func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.resize" call. +// Do executes the "compute.regionDisks.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4093,85 +4090,90 @@ func (c *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, er return ret, nil } -type RegionDisksSetIamPolicyCall struct { - s *Service - project string - region string - resource string - regionsetpolicyrequest *RegionSetPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksGetCall struct { + s *Service + project string + region string + disk 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. +// Get: Returns a specified regional persistent disk. // +// - disk: Name of the regional persistent disk to return. // - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionDisksSetIamPolicyCall { - c := &RegionDisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionDisksService) Get(project string, region string, disk string) *RegionDisksGetCall { + c := &RegionDisksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.regionsetpolicyrequest = regionsetpolicyrequest + c.disk = disk return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksSetIamPolicyCall { +func (c *RegionDisksGetCall) Fields(s ...googleapi.Field) *RegionDisksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionDisksGetCall) IfNoneMatch(entityTag string) *RegionDisksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionDisksSetIamPolicyCall) Context(ctx context.Context) *RegionDisksSetIamPolicyCall { +func (c *RegionDisksGetCall) Context(ctx context.Context) *RegionDisksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksSetIamPolicyCall) Header() http.Header { +func (c *RegionDisksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) - if err != nil { - return nil, err +func (c *RegionDisksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") 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{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.setIamPolicy" call. +// Do executes the "compute.regionDisks.get" call. // 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 +// *Disk.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *RegionDisksGetCall) Do(opts ...googleapi.CallOption) (*Disk, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4190,7 +4192,7 @@ func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &Disk{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4203,81 +4205,80 @@ func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, return ret, nil } -type RegionDisksSetLabelsCall struct { - s *Service - project string - region string - resource string - regionsetlabelsrequest *RegionSetLabelsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksGetIamPolicyCall struct { + s *Service + project string + region string + resource string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// SetLabels: Sets the labels on the target regional disk. +// GetIamPolicy: Gets the access control policy for a resource. May be empty if +// no such policy or resource exists. // // - project: Project ID for this request. -// - region: The region for this request. +// - region: The name of the region for this request. // - resource: Name or id of the resource for this request. -func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { - c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionDisksService) GetIamPolicy(project string, region string, resource string) *RegionDisksGetIamPolicyCall { + c := &RegionDisksGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.resource = resource - c.regionsetlabelsrequest = regionsetlabelsrequest return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionDisksSetLabelsCall) RequestId(requestId string) *RegionDisksSetLabelsCall { - c.urlParams_.Set("requestId", requestId) +// OptionsRequestedPolicyVersion sets the optional parameter +// "optionsRequestedPolicyVersion": Requested IAM Policy version. +func (c *RegionDisksGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *RegionDisksGetIamPolicyCall { + c.urlParams_.Set("optionsRequestedPolicyVersion", 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 // details. -func (c *RegionDisksSetLabelsCall) Fields(s ...googleapi.Field) *RegionDisksSetLabelsCall { +func (c *RegionDisksGetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionDisksGetIamPolicyCall) IfNoneMatch(entityTag string) *RegionDisksGetIamPolicyCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionDisksSetLabelsCall) Context(ctx context.Context) *RegionDisksSetLabelsCall { +func (c *RegionDisksGetIamPolicyCall) Context(ctx context.Context) *RegionDisksGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksSetLabelsCall) Header() http.Header { +func (c *RegionDisksGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) - if err != nil { - return nil, err +func (c *RegionDisksGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/setLabels") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{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 } @@ -4290,12 +4291,12 @@ func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.setLabels" call. +// Do executes the "compute.regionDisks.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4314,7 +4315,7 @@ func (c *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, 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, @@ -4327,29 +4328,26 @@ func (c *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, return ret, nil } -type RegionDisksStartAsyncReplicationCall struct { - s *Service - project string - region string - disk string - regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksInsertCall struct { + s *Service + project string + region string + disk *Disk + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// StartAsyncReplication: Starts asynchronous replication. Must be invoked on -// the primary disk. +// Insert: Creates a persistent regional disk in the specified project using +// the data included in the request. // -// - disk: The name of the persistent disk. // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) StartAsyncReplication(project string, region string, disk string, regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest) *RegionDisksStartAsyncReplicationCall { - c := &RegionDisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionDisksService) Insert(project string, region string, disk *Disk) *RegionDisksInsertCall { + c := &RegionDisksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.disk = disk - c.regiondisksstartasyncreplicationrequest = regiondisksstartasyncreplicationrequest return c } @@ -4363,44 +4361,51 @@ func (r *RegionDisksService) StartAsyncReplication(project string, region string // 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 *RegionDisksStartAsyncReplicationCall) RequestId(requestId string) *RegionDisksStartAsyncReplicationCall { +func (c *RegionDisksInsertCall) RequestId(requestId string) *RegionDisksInsertCall { c.urlParams_.Set("requestId", requestId) return c } +// SourceImage sets the optional parameter "sourceImage": Source image to +// restore onto a disk. This field is optional. +func (c *RegionDisksInsertCall) SourceImage(sourceImage string) *RegionDisksInsertCall { + c.urlParams_.Set("sourceImage", sourceImage) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStartAsyncReplicationCall { +func (c *RegionDisksInsertCall) Fields(s ...googleapi.Field) *RegionDisksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksStartAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStartAsyncReplicationCall { +func (c *RegionDisksInsertCall) Context(ctx context.Context) *RegionDisksInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksStartAsyncReplicationCall) Header() http.Header { +func (c *RegionDisksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiondisksstartasyncreplicationrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4410,17 +4415,16 @@ func (c *RegionDisksStartAsyncReplicationCall) doRequest(alt string) (*http.Resp googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.startAsyncReplication" call. +// Do executes the "compute.regionDisks.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4452,76 +4456,148 @@ func (c *RegionDisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) return ret, nil } -type RegionDisksStopAsyncReplicationCall struct { - s *Service - project string - region string - disk string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// StopAsyncReplication: Stops asynchronous replication. Can be invoked either -// on the primary or on the secondary disk. +// List: Retrieves the list of persistent disks contained within the specified +// region. // -// - disk: The name of the persistent disk. // - project: Project ID for this request. -// - region: The name of the region for this request. -func (r *RegionDisksService) StopAsyncReplication(project string, region string, disk string) *RegionDisksStopAsyncReplicationCall { - c := &RegionDisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: Name of the region for this request. +func (r *RegionDisksService) List(project string, region string) *RegionDisksListCall { + c := &RegionDisksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk return c } -// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionDisksStopAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopAsyncReplicationCall { - c.urlParams_.Set("requestId", requestId) +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionDisksListCall) Filter(filter string) *RegionDisksListCall { + c.urlParams_.Set("filter", filter) return c } -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopAsyncReplicationCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionDisksListCall) MaxResults(maxResults int64) *RegionDisksListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } -// Context sets the context to be used in this call's Do method. -func (c *RegionDisksStopAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopAsyncReplicationCall { - c.ctx_ = ctx +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionDisksListCall) OrderBy(orderBy string) *RegionDisksListCall { + c.urlParams_.Set("orderBy", orderBy) return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionDisksStopAsyncReplicationCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionDisksListCall) PageToken(pageToken string) *RegionDisksListCall { + c.urlParams_.Set("pageToken", pageToken) + return c } -func (c *RegionDisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication") +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionDisksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionDisksListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionDisksListCall) Fields(s ...googleapi.Field) *RegionDisksListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionDisksListCall) IfNoneMatch(entityTag string) *RegionDisksListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionDisksListCall) Context(ctx context.Context) *RegionDisksListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionDisksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionDisksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -4529,17 +4605,16 @@ func (c *RegionDisksStopAsyncReplicationCall) doRequest(alt string) (*http.Respo googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, - "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.stopAsyncReplication" call. +// Do executes the "compute.regionDisks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *DiskList.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksListCall) Do(opts ...googleapi.CallOption) (*DiskList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4558,7 +4633,7 @@ func (c *RegionDisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &DiskList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4571,27 +4646,49 @@ func (c *RegionDisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type RegionDisksStopGroupAsyncReplicationCall struct { - s *Service - project string - region string - disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource - 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 *RegionDisksListCall) Pages(ctx context.Context, f func(*DiskList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// StopGroupAsyncReplication: Stops asynchronous replication for a consistency -// group of disks. Can be invoked either in the primary or secondary scope. +type RegionDisksRemoveResourcePoliciesCall struct { + s *Service + project string + region string + disk string + regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RemoveResourcePolicies: Removes resource policies from a regional disk. // -// - project: Project ID for this request. -// - region: The name of the region for this request. This must be the region -// of the primary or secondary disks in the consistency group. -func (r *RegionDisksService) StopGroupAsyncReplication(project string, region string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *RegionDisksStopGroupAsyncReplicationCall { - c := &RegionDisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: The disk name for this request. +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionDisksService) RemoveResourcePolicies(project string, region string, disk string, regiondisksremoveresourcepoliciesrequest *RegionDisksRemoveResourcePoliciesRequest) *RegionDisksRemoveResourcePoliciesCall { + c := &RegionDisksRemoveResourcePoliciesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource + c.disk = disk + c.regiondisksremoveresourcepoliciesrequest = regiondisksremoveresourcepoliciesrequest return c } @@ -4605,7 +4702,7 @@ func (r *RegionDisksService) StopGroupAsyncReplication(project string, region st // 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 *RegionDisksStopGroupAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopGroupAsyncReplicationCall { +func (c *RegionDisksRemoveResourcePoliciesCall) RequestId(requestId string) *RegionDisksRemoveResourcePoliciesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -4613,36 +4710,36 @@ func (c *RegionDisksStopGroupAsyncReplicationCall) RequestId(requestId string) * // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionDisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopGroupAsyncReplicationCall { +func (c *RegionDisksRemoveResourcePoliciesCall) Fields(s ...googleapi.Field) *RegionDisksRemoveResourcePoliciesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopGroupAsyncReplicationCall { +func (c *RegionDisksRemoveResourcePoliciesCall) Context(ctx context.Context) *RegionDisksRemoveResourcePoliciesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksStopGroupAsyncReplicationCall) Header() http.Header { +func (c *RegionDisksRemoveResourcePoliciesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksRemoveResourcePoliciesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksstopgroupasyncreplicationresource) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiondisksremoveresourcepoliciesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/removeResourcePolicies") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4652,16 +4749,17 @@ func (c *RegionDisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http. googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.stopGroupAsyncReplication" call. +// Do executes the "compute.regionDisks.removeResourcePolicies" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionDisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksRemoveResourcePoliciesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4693,65 +4791,79 @@ func (c *RegionDisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOpti return ret, nil } -type RegionDisksTestIamPermissionsCall struct { - s *Service - project string - region string - resource string - testpermissionsrequest *TestPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksResizeCall struct { + s *Service + project string + region string + disk string + regiondisksresizerequest *RegionDisksResizeRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. +// Resize: Resizes the specified regional persistent disk. // -// - project: Project ID for this request. -// - region: The name of the region for this request. -// - resource: Name or id of the resource for this request. -func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { - c := &RegionDisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: Name of the regional persistent disk. +// - project: The project ID for this request. +// - region: Name of the region for this request. +func (r *RegionDisksService) Resize(project string, region string, disk string, regiondisksresizerequest *RegionDisksResizeRequest) *RegionDisksResizeCall { + c := &RegionDisksResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.resource = resource - c.testpermissionsrequest = testpermissionsrequest + c.disk = disk + c.regiondisksresizerequest = regiondisksresizerequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionDisksResizeCall) RequestId(requestId string) *RegionDisksResizeCall { + 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 // details. -func (c *RegionDisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionDisksTestIamPermissionsCall { +func (c *RegionDisksResizeCall) Fields(s ...googleapi.Field) *RegionDisksResizeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksTestIamPermissionsCall) Context(ctx context.Context) *RegionDisksTestIamPermissionsCall { +func (c *RegionDisksResizeCall) Context(ctx context.Context) *RegionDisksResizeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksTestIamPermissionsCall) Header() http.Header { +func (c *RegionDisksResizeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiondisksresizerequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/resize") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -4759,20 +4871,19 @@ func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Respons } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "resource": c.resource, + "project": c.project, + "region": c.region, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.testIamPermissions" call. +// Do executes the "compute.regionDisks.resize" call. // Any non-2xx status code is an error. Response headers are in either -// *TestPermissionsResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { +// *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 *RegionDisksResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4791,7 +4902,7 @@ func (c *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestPermissionsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4804,114 +4915,85 @@ func (c *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*T return ret, nil } -type RegionDisksUpdateCall struct { - s *Service - project string - region string - disk string - disk2 *Disk - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksSetIamPolicyCall struct { + s *Service + project string + region string + resource string + regionsetpolicyrequest *RegionSetPolicyRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Update: Update the specified disk with the data included in the request. -// Update is performed only on selected fields included as part of update-mask. -// Only the following fields can be modified: user_license. +// SetIamPolicy: Sets the access control policy on the specified resource. +// Replaces any existing policy. // -// - disk: The disk name for this request. // - project: Project ID for this request. // - region: The name of the region for this request. -func (r *RegionDisksService) Update(project string, region string, disk string, disk2 *Disk) *RegionDisksUpdateCall { - c := &RegionDisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - resource: Name or id of the resource for this request. +func (r *RegionDisksService) SetIamPolicy(project string, region string, resource string, regionsetpolicyrequest *RegionSetPolicyRequest) *RegionDisksSetIamPolicyCall { + c := &RegionDisksSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.disk = disk - c.disk2 = disk2 + c.resource = resource + c.regionsetpolicyrequest = regionsetpolicyrequest return c } -// Paths sets the optional parameter "paths": -func (c *RegionDisksUpdateCall) Paths(paths ...string) *RegionDisksUpdateCall { - c.urlParams_.SetMulti("paths", append([]string{}, paths...)) - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionDisksUpdateCall) RequestId(requestId string) *RegionDisksUpdateCall { - c.urlParams_.Set("requestId", requestId) - return c -} - -// UpdateMask sets the optional parameter "updateMask": update_mask indicates -// fields to be updated as part of this request. -func (c *RegionDisksUpdateCall) UpdateMask(updateMask string) *RegionDisksUpdateCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *RegionDisksUpdateCall) Fields(s ...googleapi.Field) *RegionDisksUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionDisksSetIamPolicyCall) Fields(s ...googleapi.Field) *RegionDisksSetIamPolicyCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionDisksUpdateCall) Context(ctx context.Context) *RegionDisksUpdateCall { +func (c *RegionDisksSetIamPolicyCall) Context(ctx context.Context) *RegionDisksSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionDisksUpdateCall) Header() http.Header { +func (c *RegionDisksSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionDisksUpdateCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk2) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetpolicyrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/setIamPolicy") 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{ - "project": c.project, - "region": c.region, - "disk": c.disk, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionDisks.update" call. +// Do executes the "compute.regionDisks.setIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionDisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4930,7 +5012,7 @@ func (c *RegionDisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er 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, @@ -4943,27 +5025,28 @@ func (c *RegionDisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, er return ret, nil } -type RegionHealthCheckServicesDeleteCall struct { - s *Service - project string - region string - healthCheckService string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified regional HealthCheckService. +// SetLabels: Sets the labels on the target regional disk. // -// - healthCheckService: Name of the HealthCheckService to delete. The name -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Delete(project string, region string, healthCheckService string) *RegionHealthCheckServicesDeleteCall { - c := &RegionHealthCheckServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionDisksService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionDisksSetLabelsCall { + c := &RegionDisksSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheckService = healthCheckService + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest return c } @@ -4977,7 +5060,7 @@ func (r *RegionHealthCheckServicesService) Delete(project string, region string, // 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 *RegionHealthCheckServicesDeleteCall) RequestId(requestId string) *RegionHealthCheckServicesDeleteCall { +func (c *RegionDisksSetLabelsCall) RequestId(requestId string) *RegionDisksSetLabelsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -4985,52 +5068,56 @@ func (c *RegionHealthCheckServicesDeleteCall) RequestId(requestId string) *Regio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthCheckServicesDeleteCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesDeleteCall { +func (c *RegionDisksSetLabelsCall) Fields(s ...googleapi.Field) *RegionDisksSetLabelsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesDeleteCall) Context(ctx context.Context) *RegionHealthCheckServicesDeleteCall { +func (c *RegionDisksSetLabelsCall) Context(ctx context.Context) *RegionDisksSetLabelsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthCheckServicesDeleteCall) Header() http.Header { +func (c *RegionDisksSetLabelsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionDisksSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/setLabels") 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{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.delete" call. +// Do executes the "compute.regionDisks.setLabels" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthCheckServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5062,92 +5149,100 @@ func (c *RegionHealthCheckServicesDeleteCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type RegionHealthCheckServicesGetCall struct { - s *Service - project string - region string - healthCheckService string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksStartAsyncReplicationCall struct { + s *Service + project string + region string + disk string + regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified regional HealthCheckService resource. +// StartAsyncReplication: Starts asynchronous replication. Must be invoked on +// the primary disk. // -// - healthCheckService: Name of the HealthCheckService to update. The name -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Get(project string, region string, healthCheckService string) *RegionHealthCheckServicesGetCall { - c := &RegionHealthCheckServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - disk: The name of the persistent disk. +// - project: Project ID for this request. +// - region: The name of the region for this request. +func (r *RegionDisksService) StartAsyncReplication(project string, region string, disk string, regiondisksstartasyncreplicationrequest *RegionDisksStartAsyncReplicationRequest) *RegionDisksStartAsyncReplicationCall { + c := &RegionDisksStartAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheckService = healthCheckService + c.disk = disk + c.regiondisksstartasyncreplicationrequest = regiondisksstartasyncreplicationrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionDisksStartAsyncReplicationCall) RequestId(requestId string) *RegionDisksStartAsyncReplicationCall { + 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 // details. -func (c *RegionHealthCheckServicesGetCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesGetCall { +func (c *RegionDisksStartAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStartAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionHealthCheckServicesGetCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesGetCall) Context(ctx context.Context) *RegionHealthCheckServicesGetCall { +func (c *RegionDisksStartAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStartAsyncReplicationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthCheckServicesGetCall) Header() http.Header { +func (c *RegionDisksStartAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *RegionDisksStartAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regiondisksstartasyncreplicationrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/startAsyncReplication") 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{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, + "project": c.project, + "region": c.region, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.get" call. +// Do executes the "compute.regionDisks.startAsyncReplication" call. // Any non-2xx status code is an error. Response headers are in either -// *HealthCheckService.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionHealthCheckServicesGetCall) Do(opts ...googleapi.CallOption) (*HealthCheckService, error) { +// *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 *RegionDisksStartAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5166,7 +5261,7 @@ func (c *RegionHealthCheckServicesGetCall) Do(opts ...googleapi.CallOption) (*He if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheckService{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5179,26 +5274,27 @@ func (c *RegionHealthCheckServicesGetCall) Do(opts ...googleapi.CallOption) (*He return ret, nil } -type RegionHealthCheckServicesInsertCall struct { - s *Service - project string - region string - healthcheckservice *HealthCheckService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksStopAsyncReplicationCall struct { + s *Service + project string + region string + disk string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a regional HealthCheckService resource in the specified -// project and region using the data included in the request. +// StopAsyncReplication: Stops asynchronous replication. Can be invoked either +// on the primary or on the secondary disk. // +// - disk: The name of the persistent disk. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Insert(project string, region string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesInsertCall { - c := &RegionHealthCheckServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDisksService) StopAsyncReplication(project string, region string, disk string) *RegionDisksStopAsyncReplicationCall { + c := &RegionDisksStopAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthcheckservice = healthcheckservice + c.disk = disk return c } @@ -5212,7 +5308,7 @@ func (r *RegionHealthCheckServicesService) Insert(project string, region string, // 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 *RegionHealthCheckServicesInsertCall) RequestId(requestId string) *RegionHealthCheckServicesInsertCall { +func (c *RegionDisksStopAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopAsyncReplicationCall { c.urlParams_.Set("requestId", requestId) return c } @@ -5220,36 +5316,32 @@ func (c *RegionHealthCheckServicesInsertCall) RequestId(requestId string) *Regio // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthCheckServicesInsertCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesInsertCall { +func (c *RegionDisksStopAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesInsertCall) Context(ctx context.Context) *RegionHealthCheckServicesInsertCall { +func (c *RegionDisksStopAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopAsyncReplicationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthCheckServicesInsertCall) Header() http.Header { +func (c *RegionDisksStopAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *RegionDisksStopAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheckservice) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}/stopAsyncReplication") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5259,16 +5351,17 @@ func (c *RegionHealthCheckServicesInsertCall) doRequest(alt string) (*http.Respo googleapi.Expand(req.URL, map[string]string{ "project": c.project, "region": c.region, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.insert" call. +// Do executes the "compute.regionDisks.stopAsyncReplication" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthCheckServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksStopAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5300,148 +5393,80 @@ func (c *RegionHealthCheckServicesInsertCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -type RegionHealthCheckServicesListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionDisksStopGroupAsyncReplicationCall struct { + s *Service + project string + region string + disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Lists all the HealthCheckService resources that have been configured -// for the specified project in the given region. +// StopGroupAsyncReplication: Stops asynchronous replication for a consistency +// group of disks. Can be invoked either in the primary or secondary scope. // -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) List(project string, region string) *RegionHealthCheckServicesListCall { - c := &RegionHealthCheckServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The name of the region for this request. This must be the region +// of the primary or secondary disks in the consistency group. +func (r *RegionDisksService) StopGroupAsyncReplication(project string, region string, disksstopgroupasyncreplicationresource *DisksStopGroupAsyncReplicationResource) *RegionDisksStopGroupAsyncReplicationCall { + c := &RegionDisksStopGroupAsyncReplicationCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.disksstopgroupasyncreplicationresource = disksstopgroupasyncreplicationresource return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionHealthCheckServicesListCall) Filter(filter string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthCheckServicesListCall) MaxResults(maxResults int64) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionHealthCheckServicesListCall) OrderBy(orderBy string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionHealthCheckServicesListCall) PageToken(pageToken string) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionHealthCheckServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthCheckServicesListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionDisksStopGroupAsyncReplicationCall) RequestId(requestId string) *RegionDisksStopGroupAsyncReplicationCall { + 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 // details. -func (c *RegionHealthCheckServicesListCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesListCall { +func (c *RegionDisksStopGroupAsyncReplicationCall) Fields(s ...googleapi.Field) *RegionDisksStopGroupAsyncReplicationCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionHealthCheckServicesListCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesListCall) Context(ctx context.Context) *RegionHealthCheckServicesListCall { +func (c *RegionDisksStopGroupAsyncReplicationCall) Context(ctx context.Context) *RegionDisksStopGroupAsyncReplicationCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthCheckServicesListCall) Header() http.Header { +func (c *RegionDisksStopGroupAsyncReplicationCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *RegionDisksStopGroupAsyncReplicationCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disksstopgroupasyncreplicationresource) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/stopGroupAsyncReplication") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -5453,13 +5478,12 @@ func (c *RegionHealthCheckServicesListCall) doRequest(alt string) (*http.Respons return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.list" call. +// Do executes the "compute.regionDisks.stopGroupAsyncReplication" call. // Any non-2xx status code is an error. Response headers are in either -// *HealthCheckServicesList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*HealthCheckServicesList, error) { +// *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 *RegionDisksStopGroupAsyncReplicationCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5478,7 +5502,7 @@ func (c *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*H if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheckServicesList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5491,123 +5515,86 @@ func (c *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*H return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionHealthCheckServicesListCall) Pages(ctx context.Context, f func(*HealthCheckServicesList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RegionHealthCheckServicesPatchCall struct { - s *Service - project string - region string - healthCheckService string - healthcheckservice *HealthCheckService - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksTestIamPermissionsCall struct { + s *Service + project string + region string + resource string + testpermissionsrequest *TestPermissionsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates the specified regional HealthCheckService resource with the -// data included in the request. This method supports PATCH semantics and uses -// the JSON merge patch format and processing rules. +// TestIamPermissions: Returns permissions that a caller has on the specified +// resource. // -// - healthCheckService: Name of the HealthCheckService to update. The name -// must be 1-63 characters long, and comply with RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthCheckServicesService) Patch(project string, region string, healthCheckService string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesPatchCall { - c := &RegionHealthCheckServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: The name of the region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionDisksService) TestIamPermissions(project string, region string, resource string, testpermissionsrequest *TestPermissionsRequest) *RegionDisksTestIamPermissionsCall { + c := &RegionDisksTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheckService = healthCheckService - c.healthcheckservice = healthcheckservice - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionHealthCheckServicesPatchCall) RequestId(requestId string) *RegionHealthCheckServicesPatchCall { - c.urlParams_.Set("requestId", requestId) + c.resource = resource + c.testpermissionsrequest = testpermissionsrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthCheckServicesPatchCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesPatchCall { +func (c *RegionDisksTestIamPermissionsCall) Fields(s ...googleapi.Field) *RegionDisksTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthCheckServicesPatchCall) Context(ctx context.Context) *RegionHealthCheckServicesPatchCall { +func (c *RegionDisksTestIamPermissionsCall) Context(ctx context.Context) *RegionDisksTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthCheckServicesPatchCall) Header() http.Header { +func (c *RegionDisksTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthCheckServicesPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionDisksTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheckservice) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testpermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{resource}/testIamPermissions") 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{ - "project": c.project, - "region": c.region, - "healthCheckService": c.healthCheckService, + "project": c.project, + "region": c.region, + "resource": c.resource, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthCheckServices.patch" call. +// Do executes the "compute.regionDisks.testIamPermissions" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthCheckServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *TestPermissionsResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionDisksTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5626,7 +5613,7 @@ func (c *RegionHealthCheckServicesPatchCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &TestPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5639,26 +5626,36 @@ func (c *RegionHealthCheckServicesPatchCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type RegionHealthChecksDeleteCall struct { - s *Service - project string - region string - healthCheck string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionDisksUpdateCall struct { + s *Service + project string + region string + disk string + disk2 *Disk + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Delete: Deletes the specified HealthCheck resource. +// Update: Update the specified disk with the data included in the request. +// Update is performed only on selected fields included as part of update-mask. +// Only the following fields can be modified: user_license. // -// - healthCheck: Name of the HealthCheck resource to delete. +// - disk: The disk name for this request. // - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Delete(project string, region string, healthCheck string) *RegionHealthChecksDeleteCall { - c := &RegionHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - region: The name of the region for this request. +func (r *RegionDisksService) Update(project string, region string, disk string, disk2 *Disk) *RegionDisksUpdateCall { + c := &RegionDisksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheck = healthCheck + c.disk = disk + c.disk2 = disk2 + return c +} + +// Paths sets the optional parameter "paths": +func (c *RegionDisksUpdateCall) Paths(paths ...string) *RegionDisksUpdateCall { + c.urlParams_.SetMulti("paths", append([]string{}, paths...)) return c } @@ -5672,60 +5669,71 @@ func (r *RegionHealthChecksService) Delete(project string, region string, health // 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 *RegionHealthChecksDeleteCall) RequestId(requestId string) *RegionHealthChecksDeleteCall { +func (c *RegionDisksUpdateCall) RequestId(requestId string) *RegionDisksUpdateCall { c.urlParams_.Set("requestId", requestId) return c } +// UpdateMask sets the optional parameter "updateMask": update_mask indicates +// fields to be updated as part of this request. +func (c *RegionDisksUpdateCall) UpdateMask(updateMask string) *RegionDisksUpdateCall { + c.urlParams_.Set("updateMask", updateMask) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthChecksDeleteCall) Fields(s ...googleapi.Field) *RegionHealthChecksDeleteCall { +func (c *RegionDisksUpdateCall) Fields(s ...googleapi.Field) *RegionDisksUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksDeleteCall) Context(ctx context.Context) *RegionHealthChecksDeleteCall { +func (c *RegionDisksUpdateCall) Context(ctx context.Context) *RegionDisksUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthChecksDeleteCall) Header() http.Header { +func (c *RegionDisksUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionDisksUpdateCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.disk2) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/disks/{disk}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, + "project": c.project, + "region": c.region, + "disk": c.disk, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.delete" call. +// Do executes the "compute.regionDisks.update" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionDisksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5757,90 +5765,94 @@ func (c *RegionHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operat return ret, nil } -type RegionHealthChecksGetCall struct { - s *Service - project string - region string - healthCheck string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionHealthCheckServicesDeleteCall struct { + s *Service + project string + region string + healthCheckService string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns the specified HealthCheck resource. +// Delete: Deletes the specified regional HealthCheckService. // -// - healthCheck: Name of the HealthCheck resource to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Get(project string, region string, healthCheck string) *RegionHealthChecksGetCall { - c := &RegionHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - healthCheckService: Name of the HealthCheckService to delete. The name +// must be 1-63 characters long, and comply with RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthCheckServicesService) Delete(project string, region string, healthCheckService string) *RegionHealthCheckServicesDeleteCall { + c := &RegionHealthCheckServicesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheck = healthCheck + c.healthCheckService = healthCheckService + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionHealthCheckServicesDeleteCall) RequestId(requestId string) *RegionHealthCheckServicesDeleteCall { + 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 // details. -func (c *RegionHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionHealthChecksGetCall { +func (c *RegionHealthCheckServicesDeleteCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionHealthChecksGetCall) IfNoneMatch(entityTag string) *RegionHealthChecksGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksGetCall) Context(ctx context.Context) *RegionHealthChecksGetCall { +func (c *RegionHealthCheckServicesDeleteCall) Context(ctx context.Context) *RegionHealthCheckServicesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthChecksGetCall) Header() http.Header { +func (c *RegionHealthCheckServicesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthCheckServicesDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") 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{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, + "project": c.project, + "region": c.region, + "healthCheckService": c.healthCheckService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.get" call. +// Do executes the "compute.regionHealthCheckServices.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *HealthCheck.ServerResponse.Header or (if a response was returned at all) in +// *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 *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { +func (c *RegionHealthCheckServicesDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5859,7 +5871,7 @@ func (c *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthChe if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheck{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5872,77 +5884,194 @@ func (c *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthChe return ret, nil } -type RegionHealthChecksInsertCall struct { - s *Service - project string - region string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthCheckServicesGetCall struct { + s *Service + project string + region string + healthCheckService string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Insert: Creates a HealthCheck resource in the specified project using the -// data included in the request. +// Get: Returns the specified regional HealthCheckService resource. // -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Insert(project string, region string, healthcheck *HealthCheck) *RegionHealthChecksInsertCall { - c := &RegionHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - healthCheckService: Name of the HealthCheckService to update. The name +// must be 1-63 characters long, and comply with RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthCheckServicesService) Get(project string, region string, healthCheckService string) *RegionHealthCheckServicesGetCall { + c := &RegionHealthCheckServicesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthcheck = healthcheck - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionHealthChecksInsertCall) RequestId(requestId string) *RegionHealthChecksInsertCall { - c.urlParams_.Set("requestId", requestId) + c.healthCheckService = healthCheckService return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthChecksInsertCall) Fields(s ...googleapi.Field) *RegionHealthChecksInsertCall { +func (c *RegionHealthCheckServicesGetCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionHealthCheckServicesGetCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksInsertCall) Context(ctx context.Context) *RegionHealthChecksInsertCall { +func (c *RegionHealthCheckServicesGetCall) Context(ctx context.Context) *RegionHealthCheckServicesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthChecksInsertCall) Header() http.Header { +func (c *RegionHealthCheckServicesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) - if err != nil { - return nil, err +func (c *RegionHealthCheckServicesGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "healthCheckService": c.healthCheckService, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionHealthCheckServices.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *HealthCheckService.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionHealthCheckServicesGetCall) Do(opts ...googleapi.CallOption) (*HealthCheckService, 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 := &HealthCheckService{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type RegionHealthCheckServicesInsertCall struct { + s *Service + project string + region string + healthcheckservice *HealthCheckService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Insert: Creates a regional HealthCheckService resource in the specified +// project and region using the data included in the request. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthCheckServicesService) Insert(project string, region string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesInsertCall { + c := &RegionHealthCheckServicesInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.healthcheckservice = healthcheckservice + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionHealthCheckServicesInsertCall) RequestId(requestId string) *RegionHealthCheckServicesInsertCall { + 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 +// details. +func (c *RegionHealthCheckServicesInsertCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionHealthCheckServicesInsertCall) Context(ctx context.Context) *RegionHealthCheckServicesInsertCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionHealthCheckServicesInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionHealthCheckServicesInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheckservice) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5956,12 +6085,12 @@ func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.insert" call. +// Do executes the "compute.regionHealthCheckServices.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthCheckServicesInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5993,7 +6122,7 @@ func (c *RegionHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operat return ret, nil } -type RegionHealthChecksListCall struct { +type RegionHealthCheckServicesListCall struct { s *Service project string region string @@ -6003,13 +6132,13 @@ type RegionHealthChecksListCall struct { header_ http.Header } -// List: Retrieves the list of HealthCheck resources available to the specified -// project. +// List: Lists all the HealthCheckService resources that have been configured +// for the specified project in the given region. // // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) List(project string, region string) *RegionHealthChecksListCall { - c := &RegionHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionHealthCheckServicesService) List(project string, region string) *RegionHealthCheckServicesListCall { + c := &RegionHealthCheckServicesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region return c @@ -6047,7 +6176,7 @@ func (r *RegionHealthChecksService) List(project string, region string) *RegionH // filter for instances that do not end with name "instance", you would use // `name ne .*instance`. You cannot combine constraints on multiple fields // using regular expressions. -func (c *RegionHealthChecksListCall) Filter(filter string) *RegionHealthChecksListCall { +func (c *RegionHealthCheckServicesListCall) Filter(filter string) *RegionHealthCheckServicesListCall { c.urlParams_.Set("filter", filter) return c } @@ -6057,7 +6186,7 @@ func (c *RegionHealthChecksListCall) Filter(filter string) *RegionHealthChecksLi // is larger than `maxResults`, Compute Engine returns a `nextPageToken` that // can be used to get the next page of results in subsequent list requests. // Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionHealthChecksListCall) MaxResults(maxResults int64) *RegionHealthChecksListCall { +func (c *RegionHealthCheckServicesListCall) MaxResults(maxResults int64) *RegionHealthCheckServicesListCall { c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) return c } @@ -6070,7 +6199,7 @@ func (c *RegionHealthChecksListCall) MaxResults(maxResults int64) *RegionHealthC // chronological order (newest result first). Use this to sort resources like // operations so that the newest operation is returned first. Currently, only // sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionHealthChecksListCall) OrderBy(orderBy string) *RegionHealthChecksListCall { +func (c *RegionHealthCheckServicesListCall) OrderBy(orderBy string) *RegionHealthCheckServicesListCall { c.urlParams_.Set("orderBy", orderBy) return c } @@ -6078,7 +6207,7 @@ func (c *RegionHealthChecksListCall) OrderBy(orderBy string) *RegionHealthChecks // PageToken sets the optional parameter "pageToken": Specifies a page token to // use. Set `pageToken` to the `nextPageToken` returned by a previous list // request to get the next page of results. -func (c *RegionHealthChecksListCall) PageToken(pageToken string) *RegionHealthChecksListCall { +func (c *RegionHealthCheckServicesListCall) PageToken(pageToken string) *RegionHealthCheckServicesListCall { c.urlParams_.Set("pageToken", pageToken) return c } @@ -6088,7 +6217,7 @@ func (c *RegionHealthChecksListCall) PageToken(pageToken string) *RegionHealthCh // of failure. The default value is false. For example, when partial success // behavior is enabled, aggregatedList for a single zone scope either returns // all resources in the zone or no resources, with an error code. -func (c *RegionHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthChecksListCall { +func (c *RegionHealthCheckServicesListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthCheckServicesListCall { c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) return c } @@ -6096,7 +6225,7 @@ func (c *RegionHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess b // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthChecksListCall) Fields(s ...googleapi.Field) *RegionHealthChecksListCall { +func (c *RegionHealthCheckServicesListCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -6104,27 +6233,27 @@ func (c *RegionHealthChecksListCall) Fields(s ...googleapi.Field) *RegionHealthC // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *RegionHealthChecksListCall) IfNoneMatch(entityTag string) *RegionHealthChecksListCall { +func (c *RegionHealthCheckServicesListCall) IfNoneMatch(entityTag string) *RegionHealthCheckServicesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksListCall) Context(ctx context.Context) *RegionHealthChecksListCall { +func (c *RegionHealthCheckServicesListCall) Context(ctx context.Context) *RegionHealthCheckServicesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthChecksListCall) Header() http.Header { +func (c *RegionHealthCheckServicesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthCheckServicesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -6132,7 +6261,7 @@ func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, erro var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -6146,13 +6275,13 @@ func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, erro return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.list" call. +// Do executes the "compute.regionHealthCheckServices.list" call. // Any non-2xx status code is an error. Response headers are in either -// *HealthCheckList.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, error) { +// *HealthCheckServicesList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionHealthCheckServicesListCall) Do(opts ...googleapi.CallOption) (*HealthCheckServicesList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6171,7 +6300,7 @@ func (c *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCh if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &HealthCheckList{ + ret := &HealthCheckServicesList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6187,7 +6316,7 @@ func (c *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCh // 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 *RegionHealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { +func (c *RegionHealthCheckServicesListCall) Pages(ctx context.Context, f func(*HealthCheckServicesList) error) error { c.ctx_ = ctx defer c.PageToken(c.urlParams_.Get("pageToken")) for { @@ -6205,30 +6334,31 @@ func (c *RegionHealthChecksListCall) Pages(ctx context.Context, f func(*HealthCh } } -type RegionHealthChecksPatchCall struct { - s *Service - project string - region string - healthCheck string - healthcheck *HealthCheck - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthCheckServicesPatchCall struct { + s *Service + project string + region string + healthCheckService string + healthcheckservice *HealthCheckService + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a HealthCheck resource in the specified project using the +// Patch: Updates the specified regional HealthCheckService resource with the // data included in the request. This method supports PATCH semantics and uses // the JSON merge patch format and processing rules. // -// - healthCheck: Name of the HealthCheck resource to patch. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Patch(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksPatchCall { - c := &RegionHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - healthCheckService: Name of the HealthCheckService to update. The name +// must be 1-63 characters long, and comply with RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthCheckServicesService) Patch(project string, region string, healthCheckService string, healthcheckservice *HealthCheckService) *RegionHealthCheckServicesPatchCall { + c := &RegionHealthCheckServicesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.healthCheck = healthCheck - c.healthcheck = healthcheck + c.healthCheckService = healthCheckService + c.healthcheckservice = healthcheckservice return c } @@ -6242,7 +6372,7 @@ func (r *RegionHealthChecksService) Patch(project string, region string, healthC // 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 *RegionHealthChecksPatchCall) RequestId(requestId string) *RegionHealthChecksPatchCall { +func (c *RegionHealthCheckServicesPatchCall) RequestId(requestId string) *RegionHealthCheckServicesPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -6250,36 +6380,36 @@ func (c *RegionHealthChecksPatchCall) RequestId(requestId string) *RegionHealthC // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthChecksPatchCall) Fields(s ...googleapi.Field) *RegionHealthChecksPatchCall { +func (c *RegionHealthCheckServicesPatchCall) Fields(s ...googleapi.Field) *RegionHealthCheckServicesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksPatchCall) Context(ctx context.Context) *RegionHealthChecksPatchCall { +func (c *RegionHealthCheckServicesPatchCall) Context(ctx context.Context) *RegionHealthCheckServicesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthChecksPatchCall) Header() http.Header { +func (c *RegionHealthCheckServicesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthCheckServicesPatchCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheckservice) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthCheckServices/{healthCheckService}") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("PATCH", urls, body) if err != nil { @@ -6287,19 +6417,19 @@ func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "healthCheck": c.healthCheck, + "project": c.project, + "region": c.region, + "healthCheckService": c.healthCheckService, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.patch" call. +// Do executes the "compute.regionHealthCheckServices.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthCheckServicesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6331,29 +6461,26 @@ func (c *RegionHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operati return ret, nil } -type RegionHealthChecksUpdateCall struct { +type RegionHealthChecksDeleteCall struct { s *Service project string region string healthCheck string - healthcheck *HealthCheck urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// Update: Updates a HealthCheck resource in the specified project using the -// data included in the request. +// Delete: Deletes the specified HealthCheck resource. // -// - healthCheck: Name of the HealthCheck resource to update. +// - healthCheck: Name of the HealthCheck resource to delete. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionHealthChecksService) Update(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksUpdateCall { - c := &RegionHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionHealthChecksService) Delete(project string, region string, healthCheck string) *RegionHealthChecksDeleteCall { + c := &RegionHealthChecksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.healthCheck = healthCheck - c.healthcheck = healthcheck return c } @@ -6367,7 +6494,7 @@ func (r *RegionHealthChecksService) Update(project string, region string, health // 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 *RegionHealthChecksUpdateCall) RequestId(requestId string) *RegionHealthChecksUpdateCall { +func (c *RegionHealthChecksDeleteCall) RequestId(requestId string) *RegionHealthChecksDeleteCall { c.urlParams_.Set("requestId", requestId) return c } @@ -6375,38 +6502,34 @@ func (c *RegionHealthChecksUpdateCall) RequestId(requestId string) *RegionHealth // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionHealthChecksUpdateCall) Fields(s ...googleapi.Field) *RegionHealthChecksUpdateCall { +func (c *RegionHealthChecksDeleteCall) Fields(s ...googleapi.Field) *RegionHealthChecksDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionHealthChecksUpdateCall) Context(ctx context.Context) *RegionHealthChecksUpdateCall { +func (c *RegionHealthChecksDeleteCall) Context(ctx context.Context) *RegionHealthChecksDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionHealthChecksUpdateCall) Header() http.Header { +func (c *RegionHealthChecksDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *RegionHealthChecksDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) + req, err := http.NewRequest("DELETE", urls, body) if err != nil { return nil, err } @@ -6419,12 +6542,12 @@ func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, er return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionHealthChecks.update" call. +// Do executes the "compute.regionHealthChecks.delete" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthChecksDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6456,110 +6579,90 @@ func (c *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operat return ret, nil } -type RegionInstanceGroupManagersAbandonInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthChecksGetCall struct { + s *Service + project string + region string + healthCheck string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// AbandonInstances: Flags the specified instances to be immediately removed -// from the managed instance group. Abandoning an instance does not delete the -// instance, but it does remove the instance from any target pools that are -// applied by the managed instance group. This method reduces the targetSize of -// the managed instance group by the number of instances that you abandon. This -// operation is marked as DONE when the action is scheduled even if the -// instances have not yet been removed from the group. You must separately -// verify the status of the abandoning action with the listmanagedinstances -// method. If the group is part of a backend service that has enabled -// connection draining, it can take up to 60 seconds after the connection -// draining duration has elapsed before the VM instance is removed or deleted. -// You can specify a maximum of 1000 instances with this method per request. +// Get: Returns the specified HealthCheck resource. // -// - instanceGroupManager: Name of the managed instance group. +// - healthCheck: Name of the HealthCheck resource to return. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest) *RegionInstanceGroupManagersAbandonInstancesCall { - c := &RegionInstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionHealthChecksService) Get(project string, region string, healthCheck string) *RegionHealthChecksGetCall { + c := &RegionHealthChecksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersabandoninstancesrequest = regioninstancegroupmanagersabandoninstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionInstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersAbandonInstancesCall { - c.urlParams_.Set("requestId", requestId) + c.healthCheck = healthCheck return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersAbandonInstancesCall { +func (c *RegionHealthChecksGetCall) Fields(s ...googleapi.Field) *RegionHealthChecksGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionHealthChecksGetCall) IfNoneMatch(entityTag string) *RegionHealthChecksGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersAbandonInstancesCall { +func (c *RegionHealthChecksGetCall) Context(ctx context.Context) *RegionHealthChecksGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header { +func (c *RegionHealthChecksGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersabandoninstancesrequest) - if err != nil { - return nil, err +func (c *RegionHealthChecksGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.abandonInstances" call. +// Do executes the "compute.regionHealthChecks.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in +// *HealthCheck.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthChecksGetCall) Do(opts ...googleapi.CallOption) (*HealthCheck, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6578,7 +6681,7 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.C if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &HealthCheck{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6591,67 +6694,77 @@ func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.C return ret, nil } -type RegionInstanceGroupManagersApplyUpdatesToInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthChecksInsertCall struct { + s *Service + project string + region string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ApplyUpdatesToInstances: Apply updates to selected instances the managed -// instance group. +// Insert: Creates a HealthCheck resource in the specified project using the +// data included in the request. // -// - instanceGroupManager: The name of the managed instance group, should -// conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) ApplyUpdatesToInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { - c := &RegionInstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthChecksService) Insert(project string, region string, healthcheck *HealthCheck) *RegionHealthChecksInsertCall { + c := &RegionHealthChecksInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersapplyupdatesrequest = regioninstancegroupmanagersapplyupdatesrequest + c.healthcheck = healthcheck + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionHealthChecksInsertCall) RequestId(requestId string) *RegionHealthChecksInsertCall { + 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 // details. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { +func (c *RegionHealthChecksInsertCall) Fields(s ...googleapi.Field) *RegionHealthChecksInsertCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { +func (c *RegionHealthChecksInsertCall) Context(ctx context.Context) *RegionHealthChecksInsertCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { +func (c *RegionHealthChecksInsertCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthChecksInsertCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersapplyupdatesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -6659,19 +6772,18 @@ func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt s } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.applyUpdatesToInstances" call. +// Do executes the "compute.regionHealthChecks.insert" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthChecksInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6703,105 +6815,166 @@ func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...goog return ret, nil } -type RegionInstanceGroupManagersCreateInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerscreateinstancesrequest *RegionInstanceGroupManagersCreateInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthChecksListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// CreateInstances: Creates instances with per-instance configurations in this -// regional managed instance group. Instances are created using the current -// instance template. The create instances operation is marked DONE if the -// createInstances request is successful. The underlying actions take -// additional time. You must separately verify the status of the creating or -// actions with the listmanagedinstances method. +// List: Retrieves the list of HealthCheck resources available to the specified +// project. // -// - instanceGroupManager: The name of the managed instance group. It should -// conform to RFC1035. -// - project: Project ID for this request. -// - region: The name of the region where the managed instance group is -// located. It should conform to RFC1035. -func (r *RegionInstanceGroupManagersService) CreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagerscreateinstancesrequest *RegionInstanceGroupManagersCreateInstancesRequest) *RegionInstanceGroupManagersCreateInstancesCall { - c := &RegionInstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionHealthChecksService) List(project string, region string) *RegionHealthChecksListCall { + c := &RegionHealthChecksListCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerscreateinstancesrequest = regioninstancegroupmanagerscreateinstancesrequest - return c -} - -// RequestId sets the optional parameter "requestId": An optional 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. 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. The -// request ID must be a valid UUID with the exception that zero UUID is not -// supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersCreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersCreateInstancesCall { - 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 -// details. -func (c *RegionInstanceGroupManagersCreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersCreateInstancesCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersCreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersCreateInstancesCall { - c.ctx_ = ctx return c } -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *RegionInstanceGroupManagersCreateInstancesCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionHealthChecksListCall) Filter(filter string) *RegionHealthChecksListCall { + c.urlParams_.Set("filter", filter) + return c +} -func (c *RegionInstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerscreateinstancesrequest) - if err != nil { - return nil, err +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionHealthChecksListCall) MaxResults(maxResults int64) *RegionHealthChecksListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionHealthChecksListCall) OrderBy(orderBy string) *RegionHealthChecksListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionHealthChecksListCall) PageToken(pageToken string) *RegionHealthChecksListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionHealthChecksListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionHealthChecksListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionHealthChecksListCall) Fields(s ...googleapi.Field) *RegionHealthChecksListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionHealthChecksListCall) IfNoneMatch(entityTag string) *RegionHealthChecksListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionHealthChecksListCall) Context(ctx context.Context) *RegionHealthChecksListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionHealthChecksListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionHealthChecksListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks") 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "region": c.region, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.createInstances" call. +// Do executes the "compute.regionHealthChecks.list" call. // Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +// *HealthCheckList.ServerResponse.Header or (if a response was returned at +// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionHealthChecksListCall) Do(opts ...googleapi.CallOption) (*HealthCheckList, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6820,7 +6993,7 @@ func (c *RegionInstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.Ca if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Operation{ + ret := &HealthCheckList{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -6833,27 +7006,51 @@ func (c *RegionInstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.Ca return ret, nil } -type RegionInstanceGroupManagersDeleteCall struct { - s *Service - project string - region string - instanceGroupManager 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 *RegionHealthChecksListCall) Pages(ctx context.Context, f func(*HealthCheckList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Delete: Deletes the specified managed instance group and all of the -// instances in that group. +type RegionHealthChecksPatchCall struct { + s *Service + project string + region string + healthCheck string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a HealthCheck resource in the specified project using the +// data included in the request. This method supports PATCH semantics and uses +// the JSON merge patch format and processing rules. // -// - instanceGroupManager: Name of the managed instance group to delete. +// - healthCheck: Name of the HealthCheck resource to patch. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Delete(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersDeleteCall { - c := &RegionInstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionHealthChecksService) Patch(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksPatchCall { + c := &RegionHealthChecksPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroupManager = instanceGroupManager + c.healthCheck = healthCheck + c.healthcheck = healthcheck return c } @@ -6867,7 +7064,7 @@ func (r *RegionInstanceGroupManagersService) Delete(project string, region strin // 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 *RegionInstanceGroupManagersDeleteCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteCall { +func (c *RegionHealthChecksPatchCall) RequestId(requestId string) *RegionHealthChecksPatchCall { c.urlParams_.Set("requestId", requestId) return c } @@ -6875,52 +7072,56 @@ func (c *RegionInstanceGroupManagersDeleteCall) RequestId(requestId string) *Reg // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteCall { +func (c *RegionHealthChecksPatchCall) Fields(s ...googleapi.Field) *RegionHealthChecksPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersDeleteCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteCall { +func (c *RegionHealthChecksPatchCall) Context(ctx context.Context) *RegionHealthChecksPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header { +func (c *RegionHealthChecksPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionHealthChecksPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", 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{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.delete" call. +// Do executes the "compute.regionHealthChecks.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthChecksPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -6952,38 +7153,29 @@ func (c *RegionInstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) return ret, nil } -type RegionInstanceGroupManagersDeleteInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionHealthChecksUpdateCall struct { + s *Service + project string + region string + healthCheck string + healthcheck *HealthCheck + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DeleteInstances: Flags the specified instances in the managed instance group -// to be immediately deleted. The instances are also removed from any target -// pools of which they were a member. This method reduces the targetSize of the -// managed instance group by the number of instances that you delete. The -// deleteInstances operation is marked DONE if the deleteInstances request is -// successful. The underlying actions take additional time. You must separately -// verify the status of the deleting action with the listmanagedinstances -// method. If the group is part of a backend service that has enabled -// connection draining, it can take up to 60 seconds after the connection -// draining duration has elapsed before the VM instance is removed or deleted. -// You can specify a maximum of 1000 instances with this method per request. +// Update: Updates a HealthCheck resource in the specified project using the +// data included in the request. // -// - instanceGroupManager: Name of the managed instance group. +// - healthCheck: Name of the HealthCheck resource to update. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest) *RegionInstanceGroupManagersDeleteInstancesCall { - c := &RegionInstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionHealthChecksService) Update(project string, region string, healthCheck string, healthcheck *HealthCheck) *RegionHealthChecksUpdateCall { + c := &RegionHealthChecksUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersdeleteinstancesrequest = regioninstancegroupmanagersdeleteinstancesrequest + c.healthCheck = healthCheck + c.healthcheck = healthcheck return c } @@ -6997,7 +7189,7 @@ func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, reg // 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 *RegionInstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteInstancesCall { +func (c *RegionHealthChecksUpdateCall) RequestId(requestId string) *RegionHealthChecksUpdateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -7005,56 +7197,56 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) RequestId(requestId str // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteInstancesCall { +func (c *RegionHealthChecksUpdateCall) Fields(s ...googleapi.Field) *RegionHealthChecksUpdateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteInstancesCall { +func (c *RegionHealthChecksUpdateCall) Context(ctx context.Context) *RegionHealthChecksUpdateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header { +func (c *RegionHealthChecksUpdateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionHealthChecksUpdateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersdeleteinstancesrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.healthcheck) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/healthChecks/{healthCheck}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) + req, err := http.NewRequest("PUT", urls, body) if err != nil { return nil, err } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, - "instanceGroupManager": c.instanceGroupManager, + "project": c.project, + "region": c.region, + "healthCheck": c.healthCheck, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.deleteInstances" call. +// Do executes the "compute.regionHealthChecks.update" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionHealthChecksUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7086,67 +7278,90 @@ func (c *RegionInstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.Ca return ret, nil } -type RegionInstanceGroupManagersDeletePerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerdeleteinstanceconfigreq *RegionInstanceGroupManagerDeleteInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersAbandonInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// DeletePerInstanceConfigs: Deletes selected per-instance configurations for -// the managed instance group. +// AbandonInstances: Flags the specified instances to be immediately removed +// from the managed instance group. Abandoning an instance does not delete the +// instance, but it does remove the instance from any target pools that are +// applied by the managed instance group. This method reduces the targetSize of +// the managed instance group by the number of instances that you abandon. This +// operation is marked as DONE when the action is scheduled even if the +// instances have not yet been removed from the group. You must separately +// verify the status of the abandoning action with the listmanagedinstances +// method. If the group is part of a backend service that has enabled +// connection draining, it can take up to 60 seconds after the connection +// draining duration has elapsed before the VM instance is removed or deleted. +// You can specify a maximum of 1000 instances with this method per request. // -// - instanceGroupManager: The name of the managed instance group. It should -// conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) DeletePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerdeleteinstanceconfigreq *RegionInstanceGroupManagerDeleteInstanceConfigReq) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { - c := &RegionInstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: Name of the managed instance group. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) AbandonInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersabandoninstancesrequest *RegionInstanceGroupManagersAbandonInstancesRequest) *RegionInstanceGroupManagersAbandonInstancesCall { + c := &RegionInstanceGroupManagersAbandonInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerdeleteinstanceconfigreq = regioninstancegroupmanagerdeleteinstanceconfigreq + c.regioninstancegroupmanagersabandoninstancesrequest = regioninstancegroupmanagersabandoninstancesrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionInstanceGroupManagersAbandonInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersAbandonInstancesCall { + 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 // details. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersAbandonInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersAbandonInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersAbandonInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersAbandonInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Header() http.Header { +func (c *RegionInstanceGroupManagersAbandonInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersAbandonInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerdeleteinstanceconfigreq) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersabandoninstancesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/abandonInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -7161,12 +7376,12 @@ func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.deletePerInstanceConfigs" call. +// Do executes the "compute.regionInstanceGroupManagers.abandonInstances" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersAbandonInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7198,72 +7413,69 @@ func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...goo return ret, nil } -type RegionInstanceGroupManagersGetCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersApplyUpdatesToInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Get: Returns all of the details about the specified managed instance group. +// ApplyUpdatesToInstances: Apply updates to selected instances the managed +// instance group. // -// - instanceGroupManager: Name of the managed instance group to return. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Get(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersGetCall { - c := &RegionInstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group, should +// conform to RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request, should conform to +// RFC1035. +func (r *RegionInstanceGroupManagersService) ApplyUpdatesToInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersapplyupdatesrequest *RegionInstanceGroupManagersApplyUpdatesRequest) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { + c := &RegionInstanceGroupManagersApplyUpdatesToInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager + c.regioninstancegroupmanagersapplyupdatesrequest = regioninstancegroupmanagersapplyupdatesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersGetCall { +func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionInstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersGetCall) Context(ctx context.Context) *RegionInstanceGroupManagersGetCall { +func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersApplyUpdatesToInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersGetCall) Header() http.Header { +func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersapplyupdatesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/applyUpdatesToInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -7276,13 +7488,12 @@ func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Respon return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.get" call. +// Do executes the "compute.regionInstanceGroupManagers.applyUpdatesToInstances" call. // Any non-2xx status code is an error. Response headers are in either -// *InstanceGroupManager.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, error) { +// *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 *RegionInstanceGroupManagersApplyUpdatesToInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7301,7 +7512,7 @@ func (c *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (* if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &InstanceGroupManager{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7314,31 +7525,35 @@ func (c *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (* return ret, nil } -type RegionInstanceGroupManagersInsertCall struct { - s *Service - project string - region string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersCreateInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerscreateinstancesrequest *RegionInstanceGroupManagersCreateInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Insert: Creates a managed instance group using the information that you -// specify in the request. After the group is created, instances in the group -// are created using the specified instance template. This operation is marked -// as DONE when the group is created even if the instances in the group have -// not yet been created. You must separately verify the status of the -// individual instances with the listmanagedinstances method. A regional -// managed instance group can contain up to 2000 instances. +// CreateInstances: Creates instances with per-instance configurations in this +// regional managed instance group. Instances are created using the current +// instance template. The create instances operation is marked DONE if the +// createInstances request is successful. The underlying actions take +// additional time. You must separately verify the status of the creating or +// actions with the listmanagedinstances method. // -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Insert(project string, region string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersInsertCall { - c := &RegionInstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. It should +// conform to RFC1035. +// - project: Project ID for this request. +// - region: The name of the region where the managed instance group is +// located. It should conform to RFC1035. +func (r *RegionInstanceGroupManagersService) CreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagerscreateinstancesrequest *RegionInstanceGroupManagersCreateInstancesRequest) *RegionInstanceGroupManagersCreateInstancesCall { + c := &RegionInstanceGroupManagersCreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instancegroupmanager = instancegroupmanager + c.instanceGroupManager = instanceGroupManager + c.regioninstancegroupmanagerscreateinstancesrequest = regioninstancegroupmanagerscreateinstancesrequest return c } @@ -7348,11 +7563,10 @@ func (r *RegionInstanceGroupManagersService) Insert(project string, region strin // been completed. 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 was received, and if so, will ignore the second request. The // request ID must be a valid UUID with the exception that zero UUID is not // supported ( 00000000-0000-0000-0000-000000000000). -func (c *RegionInstanceGroupManagersInsertCall) RequestId(requestId string) *RegionInstanceGroupManagersInsertCall { +func (c *RegionInstanceGroupManagersCreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersCreateInstancesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -7360,36 +7574,36 @@ func (c *RegionInstanceGroupManagersInsertCall) RequestId(requestId string) *Reg // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersInsertCall { +func (c *RegionInstanceGroupManagersCreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersCreateInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersInsertCall) Context(ctx context.Context) *RegionInstanceGroupManagersInsertCall { +func (c *RegionInstanceGroupManagersCreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersCreateInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header { +func (c *RegionInstanceGroupManagersCreateInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersCreateInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerscreateinstancesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/createInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -7397,18 +7611,19 @@ func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Res } req.Header = reqHeaders googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.insert" call. +// Do executes the "compute.regionInstanceGroupManagers.createInstances" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersCreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7440,166 +7655,94 @@ func (c *RegionInstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) return ret, nil } -type RegionInstanceGroupManagersListCall struct { - s *Service - project string - region string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersDeleteCall struct { + s *Service + project string + region string + instanceGroupManager string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// List: Retrieves the list of managed instance groups that are contained -// within the specified region. +// Delete: Deletes the specified managed instance group and all of the +// instances in that group. // +// - instanceGroupManager: Name of the managed instance group to delete. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) List(project string, region string) *RegionInstanceGroupManagersListCall { - c := &RegionInstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionInstanceGroupManagersService) Delete(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersDeleteCall { + c := &RegionInstanceGroupManagersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region + c.instanceGroupManager = instanceGroupManager return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionInstanceGroupManagersListCall) Filter(filter string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionInstanceGroupManagersListCall) PageToken(pageToken string) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionInstanceGroupManagersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionInstanceGroupManagersDeleteCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteCall { + 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 // details. -func (c *RegionInstanceGroupManagersListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListCall { +func (c *RegionInstanceGroupManagersDeleteCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionInstanceGroupManagersListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListCall) Context(ctx context.Context) *RegionInstanceGroupManagersListCall { +func (c *RegionInstanceGroupManagersDeleteCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersListCall) Header() http.Header { +func (c *RegionInstanceGroupManagersDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersDeleteCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") 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{ - "project": c.project, - "region": c.region, + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.list" call. +// Do executes the "compute.regionInstanceGroupManagers.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagerList.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagerList, error) { +// *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 *RegionInstanceGroupManagersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7618,7 +7761,7 @@ func (c *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) ( if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionInstanceGroupManagerList{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7631,177 +7774,91 @@ func (c *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) ( return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupManagersListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagerList) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RegionInstanceGroupManagersListErrorsCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersDeleteInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListErrors: Lists all errors thrown by actions on instances for a given -// regional managed instance group. The filter and orderBy query parameters are -// not supported. +// DeleteInstances: Flags the specified instances in the managed instance group +// to be immediately deleted. The instances are also removed from any target +// pools of which they were a member. This method reduces the targetSize of the +// managed instance group by the number of instances that you delete. The +// deleteInstances operation is marked DONE if the deleteInstances request is +// successful. The underlying actions take additional time. You must separately +// verify the status of the deleting action with the listmanagedinstances +// method. If the group is part of a backend service that has enabled +// connection draining, it can take up to 60 seconds after the connection +// draining duration has elapsed before the VM instance is removed or deleted. +// You can specify a maximum of 1000 instances with this method per request. // -// - instanceGroupManager: The name of the managed instance group. It must be a -// string that meets the requirements in RFC1035, or an unsigned long -// integer: must match regexp pattern: (?:a-z -// (?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. This should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) ListErrors(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListErrorsCall { - c := &RegionInstanceGroupManagersListErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: Name of the managed instance group. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) DeleteInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersdeleteinstancesrequest *RegionInstanceGroupManagersDeleteInstancesRequest) *RegionInstanceGroupManagersDeleteInstancesCall { + c := &RegionInstanceGroupManagersDeleteInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager + c.regioninstancegroupmanagersdeleteinstancesrequest = regioninstancegroupmanagersdeleteinstancesrequest return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionInstanceGroupManagersListErrorsCall) Filter(filter string) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListErrorsCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListErrorsCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionInstanceGroupManagersListErrorsCall) PageToken(pageToken string) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionInstanceGroupManagersListErrorsCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListErrorsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionInstanceGroupManagersDeleteInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersDeleteInstancesCall { + 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 // details. -func (c *RegionInstanceGroupManagersListErrorsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListErrorsCall { +func (c *RegionInstanceGroupManagersDeleteInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeleteInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *RegionInstanceGroupManagersListErrorsCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListErrorsCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListErrorsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListErrorsCall { +func (c *RegionInstanceGroupManagersDeleteInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeleteInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersListErrorsCall) Header() http.Header { +func (c *RegionInstanceGroupManagersDeleteInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *RegionInstanceGroupManagersDeleteInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersdeleteinstancesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deleteInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -7814,13 +7871,12 @@ func (c *RegionInstanceGroupManagersListErrorsCall) doRequest(alt string) (*http return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.listErrors" call. +// Do executes the "compute.regionInstanceGroupManagers.deleteInstances" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagersListErrorsResponse.ServerResponse.Header or (if -// a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListErrorsResponse, error) { +// *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 *RegionInstanceGroupManagersDeleteInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -7839,7 +7895,7 @@ func (c *RegionInstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOpt if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionInstanceGroupManagersListErrorsResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -7852,162 +7908,67 @@ func (c *RegionInstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOpt return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupManagersListErrorsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListErrorsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RegionInstanceGroupManagersListManagedInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersDeletePerInstanceConfigsCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerdeleteinstanceconfigreq *RegionInstanceGroupManagerDeleteInstanceConfigReq + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// ListManagedInstances: Lists the instances in the managed instance group and -// instances that are scheduled to be created. The list includes any current -// actions that the group has scheduled for its instances. The orderBy query -// parameter is not supported. The `pageToken` query parameter is supported -// only if the group's `listManagedInstancesResults` field is set to -// `PAGINATED`. +// DeletePerInstanceConfigs: Deletes selected per-instance configurations for +// the managed instance group. // -// - instanceGroupManager: The name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall { - c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. It should +// conform to RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request, should conform to +// RFC1035. +func (r *RegionInstanceGroupManagersService) DeletePerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerdeleteinstanceconfigreq *RegionInstanceGroupManagerDeleteInstanceConfigReq) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { + c := &RegionInstanceGroupManagersDeletePerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - return c -} - -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Filter(filter string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("filter", filter) - return c -} - -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("orderBy", orderBy) - return c -} - -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListManagedInstancesCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + c.regioninstancegroupmanagerdeleteinstanceconfigreq = regioninstancegroupmanagerdeleteinstanceconfigreq return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListManagedInstancesCall { +func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersListManagedInstancesCall { +func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersDeletePerInstanceConfigsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Header { +func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerdeleteinstanceconfigreq) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/deletePerInstanceConfigs") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8022,13 +7983,12 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt stri return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.listManagedInstances" call. +// Do executes the "compute.regionInstanceGroupManagers.deletePerInstanceConfigs" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagersListInstancesResponse.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstancesResponse, error) { +// *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 *RegionInstanceGroupManagersDeletePerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8047,7 +8007,7 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googlea if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionInstanceGroupManagersListInstancesResponse{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8060,161 +8020,1569 @@ func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googlea return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstancesResponse) error) error { +type RegionInstanceGroupManagersGetCall struct { + s *Service + project string + region string + instanceGroupManager string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// Get: Returns all of the details about the specified managed instance group. +// +// - instanceGroupManager: Name of the managed instance group to return. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) Get(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersGetCall { + c := &RegionInstanceGroupManagersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionInstanceGroupManagersGetCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersGetCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionInstanceGroupManagersGetCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersGetCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagersGetCall) Context(ctx context.Context) *RegionInstanceGroupManagersGetCall { c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagersGetCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersGetCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.get" call. +// Any non-2xx status code is an error. Response headers are in either +// *InstanceGroupManager.ServerResponse.Header or (if a response was returned +// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to +// check whether the returned error was because http.StatusNotModified was +// returned. +func (c *RegionInstanceGroupManagersGetCall) Do(opts ...googleapi.CallOption) (*InstanceGroupManager, 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() } - c.PageToken(x.NextPageToken) + 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 := &InstanceGroupManager{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil } -type RegionInstanceGroupManagersListPerInstanceConfigsCall struct { +type RegionInstanceGroupManagersInsertCall struct { s *Service project string region string - instanceGroupManager string + instancegroupmanager *InstanceGroupManager urlParams_ gensupport.URLParams ctx_ context.Context header_ http.Header } -// ListPerInstanceConfigs: Lists all of the per-instance configurations defined -// for the managed instance group. The orderBy query parameter is not -// supported. +// Insert: Creates a managed instance group using the information that you +// specify in the request. After the group is created, instances in the group +// are created using the specified instance template. This operation is marked +// as DONE when the group is created even if the instances in the group have +// not yet been created. You must separately verify the status of the +// individual instances with the listmanagedinstances method. A regional +// managed instance group can contain up to 2000 instances. // -// - instanceGroupManager: The name of the managed instance group. It should -// conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) ListPerInstanceConfigs(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c := &RegionInstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) Insert(project string, region string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersInsertCall { + c := &RegionInstanceGroupManagersInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region - c.instanceGroupManager = instanceGroupManager + c.instancegroupmanager = instancegroupmanager return c } -// Filter sets the optional parameter "filter": A filter expression that -// filters resources listed in the response. Most Compute resources support two -// types of filter expressions: expressions that support regular expressions -// and expressions that follow API improvement proposal AIP-160. These two -// types of filter expressions cannot be mixed in one request. If you want to -// use AIP-160, your expression must specify the field name, an operator, and -// the value that you want to use for filtering. The value must be a string, a -// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, -// `>=` or `:`. For example, if you are filtering Compute Engine instances, you -// can exclude instances named `example-instance` by specifying `name != -// example-instance`. The `:*` comparison can be used to test whether a key has -// been defined. For example, to find all objects with `owner` label use: ``` -// labels.owner:* ``` You can also filter nested fields. For example, you could -// specify `scheduling.automaticRestart = false` to include instances only if -// they are not scheduled for automatic restarts. You can use filtering on -// nested fields to filter based on resource labels. To filter on multiple -// expressions, provide each separate expression within parentheses. For -// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel -// Skylake") ``` By default, each expression is an `AND` expression. However, -// you can include `AND` and `OR` expressions explicitly. For example: ``` -// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND -// (scheduling.automaticRestart = true) ``` If you want to use a regular -// expression, use the `eq` (equal) or `ne` (not equal) operator against a -// single un-parenthesized expression with or without quotes or against -// multiple parenthesized expressions. Examples: `fieldname eq unquoted -// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted -// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal -// value is interpreted as a regular expression using Google RE2 library -// syntax. The literal value must match the entire field. For example, to -// filter for instances that do not end with name "instance", you would use -// `name ne .*instance`. You cannot combine constraints on multiple fields -// using regular expressions. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Filter(filter string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("filter", filter) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionInstanceGroupManagersInsertCall) RequestId(requestId string) *RegionInstanceGroupManagersInsertCall { + c.urlParams_.Set("requestId", requestId) return c } -// MaxResults sets the optional parameter "maxResults": The maximum number of -// results per page that should be returned. If the number of available results -// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that -// can be used to get the next page of results in subsequent list requests. -// Acceptable values are `0` to `500`, inclusive. (Default: `500`) -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionInstanceGroupManagersInsertCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersInsertCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagersInsertCall) Context(ctx context.Context) *RegionInstanceGroupManagersInsertCall { + c.ctx_ = ctx return c } -// OrderBy sets the optional parameter "orderBy": Sorts list results by a -// certain order. By default, results are returned in alphanumerical order -// based on the resource name. You can also sort results in descending order -// based on the creation timestamp using `orderBy="creationTimestamp desc". -// This sorts results based on the `creationTimestamp` field in reverse -// chronological order (newest result first). Use this to sort resources like -// operations so that the newest operation is returned first. Currently, only -// sorting by `name` or `creationTimestamp desc` is supported. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("orderBy", orderBy) - return c +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagersInsertCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersInsertCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers") + 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{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.insert" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersInsertCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type RegionInstanceGroupManagersListCall struct { + s *Service + project string + region string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// List: Retrieves the list of managed instance groups that are contained +// within the specified region. +// +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) List(project string, region string) *RegionInstanceGroupManagersListCall { + c := &RegionInstanceGroupManagersListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionInstanceGroupManagersListCall) Filter(filter string) *RegionInstanceGroupManagersListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionInstanceGroupManagersListCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionInstanceGroupManagersListCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionInstanceGroupManagersListCall) PageToken(pageToken string) *RegionInstanceGroupManagersListCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionInstanceGroupManagersListCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionInstanceGroupManagersListCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionInstanceGroupManagersListCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagersListCall) Context(ctx context.Context) *RegionInstanceGroupManagersListCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagersListCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersListCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.list" call. +// Any non-2xx status code is an error. Response headers are in either +// *RegionInstanceGroupManagerList.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersListCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagerList, 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 := &RegionInstanceGroupManagerList{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionInstanceGroupManagersListCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagerList) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type RegionInstanceGroupManagersListErrorsCall struct { + s *Service + project string + region string + instanceGroupManager string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ListErrors: Lists all errors thrown by actions on instances for a given +// regional managed instance group. The filter and orderBy query parameters are +// not supported. +// +// - instanceGroupManager: The name of the managed instance group. It must be a +// string that meets the requirements in RFC1035, or an unsigned long +// integer: must match regexp pattern: (?:a-z +// (?:[-a-z0-9]{0,61}[a-z0-9])?)|1-9{0,19}. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. This should conform to +// RFC1035. +func (r *RegionInstanceGroupManagersService) ListErrors(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListErrorsCall { + c := &RegionInstanceGroupManagersListErrorsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionInstanceGroupManagersListErrorsCall) Filter(filter string) *RegionInstanceGroupManagersListErrorsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionInstanceGroupManagersListErrorsCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListErrorsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionInstanceGroupManagersListErrorsCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListErrorsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionInstanceGroupManagersListErrorsCall) PageToken(pageToken string) *RegionInstanceGroupManagersListErrorsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionInstanceGroupManagersListErrorsCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListErrorsCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionInstanceGroupManagersListErrorsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListErrorsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *RegionInstanceGroupManagersListErrorsCall) IfNoneMatch(entityTag string) *RegionInstanceGroupManagersListErrorsCall { + c.ifNoneMatch_ = entityTag + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagersListErrorsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListErrorsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagersListErrorsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersListErrorsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listErrors") + urls += "?" + c.urlParams_.Encode() + req, err := http.NewRequest("GET", urls, body) + if err != nil { + return nil, err + } + req.Header = reqHeaders + googleapi.Expand(req.URL, map[string]string{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.listErrors" call. +// Any non-2xx status code is an error. Response headers are in either +// *RegionInstanceGroupManagersListErrorsResponse.ServerResponse.Header or (if +// a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersListErrorsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListErrorsResponse, 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 := &RegionInstanceGroupManagersListErrorsResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionInstanceGroupManagersListErrorsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListErrorsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type RegionInstanceGroupManagersListManagedInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ListManagedInstances: Lists the instances in the managed instance group and +// instances that are scheduled to be created. The list includes any current +// actions that the group has scheduled for its instances. The orderBy query +// parameter is not supported. The `pageToken` query parameter is supported +// only if the group's `listManagedInstancesResults` field is set to +// `PAGINATED`. +// +// - instanceGroupManager: The name of the managed instance group. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) ListManagedInstances(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListManagedInstancesCall { + c := &RegionInstanceGroupManagersListManagedInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionInstanceGroupManagersListManagedInstancesCall) Filter(filter string) *RegionInstanceGroupManagersListManagedInstancesCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionInstanceGroupManagersListManagedInstancesCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListManagedInstancesCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionInstanceGroupManagersListManagedInstancesCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListManagedInstancesCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionInstanceGroupManagersListManagedInstancesCall) PageToken(pageToken string) *RegionInstanceGroupManagersListManagedInstancesCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionInstanceGroupManagersListManagedInstancesCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListManagedInstancesCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionInstanceGroupManagersListManagedInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListManagedInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagersListManagedInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersListManagedInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagersListManagedInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersListManagedInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listManagedInstances") + 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{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.listManagedInstances" call. +// Any non-2xx status code is an error. Response headers are in either +// *RegionInstanceGroupManagersListInstancesResponse.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersListManagedInstancesCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstancesResponse, 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 := &RegionInstanceGroupManagersListInstancesResponse{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionInstanceGroupManagersListManagedInstancesCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstancesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type RegionInstanceGroupManagersListPerInstanceConfigsCall struct { + s *Service + project string + region string + instanceGroupManager string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// ListPerInstanceConfigs: Lists all of the per-instance configurations defined +// for the managed instance group. The orderBy query parameter is not +// supported. +// +// - instanceGroupManager: The name of the managed instance group. It should +// conform to RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request, should conform to +// RFC1035. +func (r *RegionInstanceGroupManagersService) ListPerInstanceConfigs(project string, region string, instanceGroupManager string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { + c := &RegionInstanceGroupManagersListPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + return c +} + +// Filter sets the optional parameter "filter": A filter expression that +// filters resources listed in the response. Most Compute resources support two +// types of filter expressions: expressions that support regular expressions +// and expressions that follow API improvement proposal AIP-160. These two +// types of filter expressions cannot be mixed in one request. If you want to +// use AIP-160, your expression must specify the field name, an operator, and +// the value that you want to use for filtering. The value must be a string, a +// number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, +// `>=` or `:`. For example, if you are filtering Compute Engine instances, you +// can exclude instances named `example-instance` by specifying `name != +// example-instance`. The `:*` comparison can be used to test whether a key has +// been defined. For example, to find all objects with `owner` label use: ``` +// labels.owner:* ``` You can also filter nested fields. For example, you could +// specify `scheduling.automaticRestart = false` to include instances only if +// they are not scheduled for automatic restarts. You can use filtering on +// nested fields to filter based on resource labels. To filter on multiple +// expressions, provide each separate expression within parentheses. For +// example: ``` (scheduling.automaticRestart = true) (cpuPlatform = "Intel +// Skylake") ``` By default, each expression is an `AND` expression. However, +// you can include `AND` and `OR` expressions explicitly. For example: ``` +// (cpuPlatform = "Intel Skylake") OR (cpuPlatform = "Intel Broadwell") AND +// (scheduling.automaticRestart = true) ``` If you want to use a regular +// expression, use the `eq` (equal) or `ne` (not equal) operator against a +// single un-parenthesized expression with or without quotes or against +// multiple parenthesized expressions. Examples: `fieldname eq unquoted +// literal` `fieldname eq 'single quoted literal'` `fieldname eq "double quoted +// literal" `(fieldname1 eq literal) (fieldname2 ne "literal")` The literal +// value is interpreted as a regular expression using Google RE2 library +// syntax. The literal value must match the entire field. For example, to +// filter for instances that do not end with name "instance", you would use +// `name ne .*instance`. You cannot combine constraints on multiple fields +// using regular expressions. +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Filter(filter string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { + c.urlParams_.Set("filter", filter) + return c +} + +// MaxResults sets the optional parameter "maxResults": The maximum number of +// results per page that should be returned. If the number of available results +// is larger than `maxResults`, Compute Engine returns a `nextPageToken` that +// can be used to get the next page of results in subsequent list requests. +// Acceptable values are `0` to `500`, inclusive. (Default: `500`) +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) MaxResults(maxResults int64) *RegionInstanceGroupManagersListPerInstanceConfigsCall { + c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) + return c +} + +// OrderBy sets the optional parameter "orderBy": Sorts list results by a +// certain order. By default, results are returned in alphanumerical order +// based on the resource name. You can also sort results in descending order +// based on the creation timestamp using `orderBy="creationTimestamp desc". +// This sorts results based on the `creationTimestamp` field in reverse +// chronological order (newest result first). Use this to sort resources like +// operations so that the newest operation is returned first. Currently, only +// sorting by `name` or `creationTimestamp desc` is supported. +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) OrderBy(orderBy string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageToken sets the optional parameter "pageToken": Specifies a page token to +// use. Set `pageToken` to the `nextPageToken` returned by a previous list +// request to get the next page of results. +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) PageToken(pageToken string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + +// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": +// Opt-in for partial success behavior which provides partial results in case +// of failure. The default value is false. For example, when partial success +// behavior is enabled, aggregatedList for a single zone scope either returns +// all resources in the zone or no resources, with an error code. +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListPerInstanceConfigsCall { + c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) + return c +} + +// Fields allows partial responses to be retrieved. See +// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more +// details. +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListPerInstanceConfigsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListPerInstanceConfigsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + var body io.Reader = nil + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") + 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{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.listPerInstanceConfigs" call. +// Any non-2xx status code is an error. Response headers are in either +// *RegionInstanceGroupManagersListInstanceConfigsResp.ServerResponse.Header or +// (if a response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstanceConfigsResp, 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 := &RegionInstanceGroupManagersListInstanceConfigsResp{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstanceConfigsResp) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } +} + +type RegionInstanceGroupManagersPatchCall struct { + s *Service + project string + region string + instanceGroupManager string + instancegroupmanager *InstanceGroupManager + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a managed instance group using the information that you +// specify in the request. This operation is marked as DONE when the group is +// patched even if the instances in the group are still in the process of being +// patched. You must separately verify the status of the individual instances +// with the listmanagedinstances method. This method supports PATCH semantics +// and uses the JSON merge patch format and processing rules. If you update +// your group to specify a new template or instance configuration, it's +// possible that your intended specification for each VM in the group is +// different from the current state of that VM. To learn how to apply an +// updated configuration to the VMs in a MIG, see Updating instances in a MIG. +// +// - instanceGroupManager: The name of the instance group manager. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall { + c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.instancegroupmanager = instancegroupmanager + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchCall { + 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 +// details. +func (c *RegionInstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagersPatchCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") + 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{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.patch" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type RegionInstanceGroupManagersPatchPerInstanceConfigsCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// PatchPerInstanceConfigs: Inserts or patches per-instance configurations for +// the managed instance group. perInstanceConfig.name serves as a key used to +// distinguish whether to perform insert or patch. +// +// - instanceGroupManager: The name of the managed instance group. It should +// conform to RFC1035. +// - project: Project ID for this request. +// - region: Name of the region scoping this request, should conform to +// RFC1035. +func (r *RegionInstanceGroupManagersService) PatchPerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { + c := &RegionInstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.regioninstancegroupmanagerpatchinstanceconfigreq = regioninstancegroupmanagerpatchinstanceconfigreq + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { + 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 +// details. +func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerpatchinstanceconfigreq) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs") + 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{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.patchPerInstanceConfigs" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type RegionInstanceGroupManagersRecreateInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// RecreateInstances: Flags the specified VM instances in the managed instance +// group to be immediately recreated. Each instance is recreated using the +// group's current configuration. This operation is marked as DONE when the +// flag is set even if the instances have not yet been recreated. You must +// separately verify the status of each instance by checking its currentAction +// field; for more information, see Checking the status of managed instances. +// If the group is part of a backend service that has enabled connection +// draining, it can take up to 60 seconds after the connection draining +// duration has elapsed before the VM instance is removed or deleted. You can +// specify a maximum of 1000 instances with this method per request. +// +// - instanceGroupManager: Name of the managed instance group. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { + c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.regioninstancegroupmanagersrecreaterequest = regioninstancegroupmanagersrecreaterequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersRecreateInstancesCall { + 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 +// details. +func (c *RegionInstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersRecreateInstancesCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionInstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersRecreateInstancesCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersrecreaterequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") + 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{ + "project": c.project, + "region": c.region, + "instanceGroupManager": c.instanceGroupManager, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionInstanceGroupManagers.recreateInstances" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + +type RegionInstanceGroupManagersResizeCall struct { + s *Service + project string + region string + instanceGroupManager string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PageToken sets the optional parameter "pageToken": Specifies a page token to -// use. Set `pageToken` to the `nextPageToken` returned by a previous list -// request to get the next page of results. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) PageToken(pageToken string) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("pageToken", pageToken) +// Resize: Changes the intended size of the managed instance group. If you +// increase the size, the group creates new instances using the current +// instance template. If you decrease the size, the group deletes one or more +// instances. The resize operation is marked DONE if the resize request is +// successful. The underlying actions take additional time. You must separately +// verify the status of the creating or deleting actions with the +// listmanagedinstances method. If the group is part of a backend service that +// has enabled connection draining, it can take up to 60 seconds after the +// connection draining duration has elapsed before the VM instance is removed +// or deleted. +// +// - instanceGroupManager: Name of the managed instance group. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +// - size: Number of instances that should exist in this instance group +// manager. +func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { + c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.instanceGroupManager = instanceGroupManager + c.urlParams_.Set("size", fmt.Sprint(size)) return c } -// ReturnPartialSuccess sets the optional parameter "returnPartialSuccess": -// Opt-in for partial success behavior which provides partial results in case -// of failure. The default value is false. For example, when partial success -// behavior is enabled, aggregatedList for a single zone scope either returns -// all resources in the zone or no resources, with an error code. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) ReturnPartialSuccess(returnPartialSuccess bool) *RegionInstanceGroupManagersListPerInstanceConfigsCall { - c.urlParams_.Set("returnPartialSuccess", fmt.Sprint(returnPartialSuccess)) +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeCall { + 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 // details. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersListPerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersListPerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersResizeCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Header() http.Header { +func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/listPerInstanceConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8229,13 +9597,12 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) doRequest(alt st return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.listPerInstanceConfigs" call. +// Do executes the "compute.regionInstanceGroupManagers.resize" call. // Any non-2xx status code is an error. Response headers are in either -// *RegionInstanceGroupManagersListInstanceConfigsResp.ServerResponse.Header or -// (if a response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*RegionInstanceGroupManagersListInstanceConfigsResp, error) { +// *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 *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8254,7 +9621,7 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googl if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &RegionInstanceGroupManagersListInstanceConfigsResp{ + ret := &Operation{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -8267,58 +9634,40 @@ func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Do(opts ...googl return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *RegionInstanceGroupManagersListPerInstanceConfigsCall) Pages(ctx context.Context, f func(*RegionInstanceGroupManagersListInstanceConfigsResp) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type RegionInstanceGroupManagersPatchCall struct { - s *Service - project string - region string - instanceGroupManager string - instancegroupmanager *InstanceGroupManager - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersResumeInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagersresumeinstancesrequest *RegionInstanceGroupManagersResumeInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Patch: Updates a managed instance group using the information that you -// specify in the request. This operation is marked as DONE when the group is -// patched even if the instances in the group are still in the process of being -// patched. You must separately verify the status of the individual instances -// with the listmanagedinstances method. This method supports PATCH semantics -// and uses the JSON merge patch format and processing rules. If you update -// your group to specify a new template or instance configuration, it's -// possible that your intended specification for each VM in the group is -// different from the current state of that VM. To learn how to apply an -// updated configuration to the VMs in a MIG, see Updating instances in a MIG. +// ResumeInstances: Flags the specified instances in the managed instance group +// to be resumed. This method increases the targetSize and decreases the +// targetSuspendedSize of the managed instance group by the number of instances +// that you resume. The resumeInstances operation is marked DONE if the +// resumeInstances request is successful. The underlying actions take +// additional time. You must separately verify the status of the RESUMING +// action with the listmanagedinstances method. In this request, you can only +// specify instances that are suspended. For example, if an instance was +// previously suspended using the suspendInstances method, it can be resumed +// using the resumeInstances method. If a health check is attached to the +// managed instance group, the specified instances will be verified as healthy +// after they are resumed. You can specify a maximum of 1000 instances with +// this method per request. // -// - instanceGroupManager: The name of the instance group manager. +// - instanceGroupManager: Name of the managed instance group. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) Patch(project string, region string, instanceGroupManager string, instancegroupmanager *InstanceGroupManager) *RegionInstanceGroupManagersPatchCall { - c := &RegionInstanceGroupManagersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionInstanceGroupManagersService) ResumeInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersresumeinstancesrequest *RegionInstanceGroupManagersResumeInstancesRequest) *RegionInstanceGroupManagersResumeInstancesCall { + c := &RegionInstanceGroupManagersResumeInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.instancegroupmanager = instancegroupmanager + c.regioninstancegroupmanagersresumeinstancesrequest = regioninstancegroupmanagersresumeinstancesrequest return c } @@ -8332,7 +9681,7 @@ func (r *RegionInstanceGroupManagersService) Patch(project string, region string // 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 *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchCall { +func (c *RegionInstanceGroupManagersResumeInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersResumeInstancesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -8340,38 +9689,38 @@ func (c *RegionInstanceGroupManagersPatchCall) RequestId(requestId string) *Regi // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersPatchCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchCall { +func (c *RegionInstanceGroupManagersResumeInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResumeInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersPatchCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchCall { +func (c *RegionInstanceGroupManagersResumeInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersResumeInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersPatchCall) Header() http.Header { +func (c *RegionInstanceGroupManagersResumeInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersResumeInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.instancegroupmanager) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersresumeinstancesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resumeInstances") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) + req, err := http.NewRequest("POST", urls, body) if err != nil { return nil, err } @@ -8384,12 +9733,12 @@ func (c *RegionInstanceGroupManagersPatchCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.patch" call. +// Do executes the "compute.regionInstanceGroupManagers.resumeInstances" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersResumeInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8421,32 +9770,30 @@ func (c *RegionInstanceGroupManagersPatchCall) Do(opts ...googleapi.CallOption) return ret, nil } -type RegionInstanceGroupManagersPatchPerInstanceConfigsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersSetInstanceTemplateCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// PatchPerInstanceConfigs: Inserts or patches per-instance configurations for -// the managed instance group. perInstanceConfig.name serves as a key used to -// distinguish whether to perform insert or patch. +// SetInstanceTemplate: Sets the instance template to use when creating new +// instances or recreating instances in this group. Existing instances are not +// affected. // -// - instanceGroupManager: The name of the managed instance group. It should -// conform to RFC1035. -// - project: Project ID for this request. -// - region: Name of the region scoping this request, should conform to -// RFC1035. -func (r *RegionInstanceGroupManagersService) PatchPerInstanceConfigs(project string, region string, instanceGroupManager string, regioninstancegroupmanagerpatchinstanceconfigreq *RegionInstanceGroupManagerPatchInstanceConfigReq) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { - c := &RegionInstanceGroupManagersPatchPerInstanceConfigsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: The name of the managed instance group. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { + c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerpatchinstanceconfigreq = regioninstancegroupmanagerpatchinstanceconfigreq + c.regioninstancegroupmanagerssettemplaterequest = regioninstancegroupmanagerssettemplaterequest return c } @@ -8460,7 +9807,7 @@ func (r *RegionInstanceGroupManagersService) PatchPerInstanceConfigs(project str // 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 *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(requestId string) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *RegionInstanceGroupManagersSetInstanceTemplateCall { c.urlParams_.Set("requestId", requestId) return c } @@ -8468,36 +9815,36 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) RequestId(reque // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetInstanceTemplateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Context(ctx context.Context) *RegionInstanceGroupManagersPatchPerInstanceConfigsCall { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetInstanceTemplateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Header() http.Header { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerpatchinstanceconfigreq) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettemplaterequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/patchPerInstanceConfigs") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8512,12 +9859,12 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) doRequest(alt s return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.patchPerInstanceConfigs" call. +// Do executes the "compute.regionInstanceGroupManagers.setInstanceTemplate" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8549,37 +9896,29 @@ func (c *RegionInstanceGroupManagersPatchPerInstanceConfigsCall) Do(opts ...goog return ret, nil } -type RegionInstanceGroupManagersRecreateInstancesCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersSetTargetPoolsCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// RecreateInstances: Flags the specified VM instances in the managed instance -// group to be immediately recreated. Each instance is recreated using the -// group's current configuration. This operation is marked as DONE when the -// flag is set even if the instances have not yet been recreated. You must -// separately verify the status of each instance by checking its currentAction -// field; for more information, see Checking the status of managed instances. -// If the group is part of a backend service that has enabled connection -// draining, it can take up to 60 seconds after the connection draining -// duration has elapsed before the VM instance is removed or deleted. You can -// specify a maximum of 1000 instances with this method per request. +// SetTargetPools: Modifies the target pools to which all new instances in this +// group are assigned. Existing instances in the group are not affected. // // - instanceGroupManager: Name of the managed instance group. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersrecreaterequest *RegionInstanceGroupManagersRecreateRequest) *RegionInstanceGroupManagersRecreateInstancesCall { - c := &RegionInstanceGroupManagersRecreateInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { + c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagersrecreaterequest = regioninstancegroupmanagersrecreaterequest + c.regioninstancegroupmanagerssettargetpoolsrequest = regioninstancegroupmanagerssettargetpoolsrequest return c } @@ -8593,7 +9932,7 @@ func (r *RegionInstanceGroupManagersService) RecreateInstances(project string, r // 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 *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersRecreateInstancesCall { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *RegionInstanceGroupManagersSetTargetPoolsCall { c.urlParams_.Set("requestId", requestId) return c } @@ -8601,36 +9940,36 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) RequestId(requestId s // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersRecreateInstancesCall { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetTargetPoolsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersRecreateInstancesCall { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetTargetPoolsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Header() http.Header { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersrecreaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettargetpoolsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/recreateInstances") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8645,12 +9984,12 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) doRequest(alt string) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.recreateInstances" call. +// Do executes the "compute.regionInstanceGroupManagers.setTargetPools" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8682,38 +10021,39 @@ func (c *RegionInstanceGroupManagersRecreateInstancesCall) Do(opts ...googleapi. return ret, nil } -type RegionInstanceGroupManagersResizeCall struct { - s *Service - project string - region string - instanceGroupManager string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersStartInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagersstartinstancesrequest *RegionInstanceGroupManagersStartInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Resize: Changes the intended size of the managed instance group. If you -// increase the size, the group creates new instances using the current -// instance template. If you decrease the size, the group deletes one or more -// instances. The resize operation is marked DONE if the resize request is -// successful. The underlying actions take additional time. You must separately -// verify the status of the creating or deleting actions with the -// listmanagedinstances method. If the group is part of a backend service that -// has enabled connection draining, it can take up to 60 seconds after the -// connection draining duration has elapsed before the VM instance is removed -// or deleted. +// StartInstances: Flags the specified instances in the managed instance group +// to be started. This method increases the targetSize and decreases the +// targetStoppedSize of the managed instance group by the number of instances +// that you start. The startInstances operation is marked DONE if the +// startInstances request is successful. The underlying actions take additional +// time. You must separately verify the status of the STARTING action with the +// listmanagedinstances method. In this request, you can only specify instances +// that are stopped. For example, if an instance was previously stopped using +// the stopInstances method, it can be started using the startInstances method. +// If a health check is attached to the managed instance group, the specified +// instances will be verified as healthy after they are started. You can +// specify a maximum of 1000 instances with this method per request. // -// - instanceGroupManager: Name of the managed instance group. -// - project: Project ID for this request. -// - region: Name of the region scoping this request. -// - size: Number of instances that should exist in this instance group -// manager. -func (r *RegionInstanceGroupManagersService) Resize(project string, region string, instanceGroupManager string, size int64) *RegionInstanceGroupManagersResizeCall { - c := &RegionInstanceGroupManagersResizeCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - instanceGroupManager: Name of the managed instance group. +// - project: Project ID for this request. +// - region: Name of the region scoping this request. +func (r *RegionInstanceGroupManagersService) StartInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersstartinstancesrequest *RegionInstanceGroupManagersStartInstancesRequest) *RegionInstanceGroupManagersStartInstancesCall { + c := &RegionInstanceGroupManagersStartInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.urlParams_.Set("size", fmt.Sprint(size)) + c.regioninstancegroupmanagersstartinstancesrequest = regioninstancegroupmanagersstartinstancesrequest return c } @@ -8727,7 +10067,7 @@ func (r *RegionInstanceGroupManagersService) Resize(project string, region strin // 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 *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *RegionInstanceGroupManagersResizeCall { +func (c *RegionInstanceGroupManagersStartInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersStartInstancesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -8735,32 +10075,36 @@ func (c *RegionInstanceGroupManagersResizeCall) RequestId(requestId string) *Reg // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersResizeCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersResizeCall { +func (c *RegionInstanceGroupManagersStartInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersStartInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersResizeCall) Context(ctx context.Context) *RegionInstanceGroupManagersResizeCall { +func (c *RegionInstanceGroupManagersStartInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersStartInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersResizeCall) Header() http.Header { +func (c *RegionInstanceGroupManagersStartInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) +func (c *RegionInstanceGroupManagersStartInstancesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersstartinstancesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/resize") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/startInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8775,12 +10119,12 @@ func (c *RegionInstanceGroupManagersResizeCall) doRequest(alt string) (*http.Res return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.resize" call. +// Do executes the "compute.regionInstanceGroupManagers.startInstances" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersStartInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8812,30 +10156,45 @@ func (c *RegionInstanceGroupManagersResizeCall) Do(opts ...googleapi.CallOption) return ret, nil } -type RegionInstanceGroupManagersSetInstanceTemplateCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersStopInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagersstopinstancesrequest *RegionInstanceGroupManagersStopInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetInstanceTemplate: Sets the instance template to use when creating new -// instances or recreating instances in this group. Existing instances are not -// affected. +// StopInstances: Flags the specified instances in the managed instance group +// to be immediately stopped. You can only specify instances that are running +// in this request. This method reduces the targetSize and increases the +// targetStoppedSize of the managed instance group by the number of instances +// that you stop. The stopInstances operation is marked DONE if the +// stopInstances request is successful. The underlying actions take additional +// time. You must separately verify the status of the STOPPING action with the +// listmanagedinstances method. If the standbyPolicy.initialDelaySec field is +// set, the group delays stopping the instances until initialDelaySec have +// passed from instance.creationTimestamp (that is, when the instance was +// created). This delay gives your application time to set itself up and +// initialize on the instance. If more than initialDelaySec seconds have passed +// since instance.creationTimestamp when this method is called, there will be +// zero delay. If the group is part of a backend service that has enabled +// connection draining, it can take up to 60 seconds after the connection +// draining duration has elapsed before the VM instance is stopped. Stopped +// instances can be started using the startInstances method. You can specify a +// maximum of 1000 instances with this method per request. // // - instanceGroupManager: The name of the managed instance group. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettemplaterequest *RegionInstanceGroupManagersSetTemplateRequest) *RegionInstanceGroupManagersSetInstanceTemplateCall { - c := &RegionInstanceGroupManagersSetInstanceTemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionInstanceGroupManagersService) StopInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagersstopinstancesrequest *RegionInstanceGroupManagersStopInstancesRequest) *RegionInstanceGroupManagersStopInstancesCall { + c := &RegionInstanceGroupManagersStopInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettemplaterequest = regioninstancegroupmanagerssettemplaterequest + c.regioninstancegroupmanagersstopinstancesrequest = regioninstancegroupmanagersstopinstancesrequest return c } @@ -8849,7 +10208,7 @@ func (r *RegionInstanceGroupManagersService) SetInstanceTemplate(project string, // 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 *RegionInstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId string) *RegionInstanceGroupManagersSetInstanceTemplateCall { +func (c *RegionInstanceGroupManagersStopInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersStopInstancesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -8857,36 +10216,36 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) RequestId(requestId // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetInstanceTemplateCall { +func (c *RegionInstanceGroupManagersStopInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersStopInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetInstanceTemplateCall { +func (c *RegionInstanceGroupManagersStopInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersStopInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Header() http.Header { +func (c *RegionInstanceGroupManagersStopInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersStopInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettemplaterequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagersstopinstancesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setInstanceTemplate") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/stopInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -8901,12 +10260,12 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) doRequest(alt strin return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.setInstanceTemplate" call. +// Do executes the "compute.regionInstanceGroupManagers.stopInstances" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersStopInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -8938,29 +10297,46 @@ func (c *RegionInstanceGroupManagersSetInstanceTemplateCall) Do(opts ...googleap return ret, nil } -type RegionInstanceGroupManagersSetTargetPoolsCall struct { - s *Service - project string - region string - instanceGroupManager string - regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type RegionInstanceGroupManagersSuspendInstancesCall struct { + s *Service + project string + region string + instanceGroupManager string + regioninstancegroupmanagerssuspendinstancesrequest *RegionInstanceGroupManagersSuspendInstancesRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// SetTargetPools: Modifies the target pools to which all new instances in this -// group are assigned. Existing instances in the group are not affected. +// SuspendInstances: Flags the specified instances in the managed instance +// group to be immediately suspended. You can only specify instances that are +// running in this request. This method reduces the targetSize and increases +// the targetSuspendedSize of the managed instance group by the number of +// instances that you suspend. The suspendInstances operation is marked DONE if +// the suspendInstances request is successful. The underlying actions take +// additional time. You must separately verify the status of the SUSPENDING +// action with the listmanagedinstances method. If the +// standbyPolicy.initialDelaySec field is set, the group delays suspension of +// the instances until initialDelaySec have passed from +// instance.creationTimestamp (that is, when the instance was created). This +// delay gives your application time to set itself up and initialize on the +// instance. If more than initialDelaySec seconds have passed since +// instance.creationTimestamp when this method is called, there will be zero +// delay. If the group is part of a backend service that has enabled connection +// draining, it can take up to 60 seconds after the connection draining +// duration has elapsed before the VM instance is suspended. Suspended +// instances can be resumed using the resumeInstances method. You can specify a +// maximum of 1000 instances with this method per request. // // - instanceGroupManager: Name of the managed instance group. // - project: Project ID for this request. // - region: Name of the region scoping this request. -func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssettargetpoolsrequest *RegionInstanceGroupManagersSetTargetPoolsRequest) *RegionInstanceGroupManagersSetTargetPoolsCall { - c := &RegionInstanceGroupManagersSetTargetPoolsCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *RegionInstanceGroupManagersService) SuspendInstances(project string, region string, instanceGroupManager string, regioninstancegroupmanagerssuspendinstancesrequest *RegionInstanceGroupManagersSuspendInstancesRequest) *RegionInstanceGroupManagersSuspendInstancesCall { + c := &RegionInstanceGroupManagersSuspendInstancesCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.project = project c.region = region c.instanceGroupManager = instanceGroupManager - c.regioninstancegroupmanagerssettargetpoolsrequest = regioninstancegroupmanagerssettargetpoolsrequest + c.regioninstancegroupmanagerssuspendinstancesrequest = regioninstancegroupmanagerssuspendinstancesrequest return c } @@ -8974,7 +10350,7 @@ func (r *RegionInstanceGroupManagersService) SetTargetPools(project string, regi // 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 *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId string) *RegionInstanceGroupManagersSetTargetPoolsCall { +func (c *RegionInstanceGroupManagersSuspendInstancesCall) RequestId(requestId string) *RegionInstanceGroupManagersSuspendInstancesCall { c.urlParams_.Set("requestId", requestId) return c } @@ -8982,36 +10358,36 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) RequestId(requestId stri // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSetTargetPoolsCall { +func (c *RegionInstanceGroupManagersSuspendInstancesCall) Fields(s ...googleapi.Field) *RegionInstanceGroupManagersSuspendInstancesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Context(ctx context.Context) *RegionInstanceGroupManagersSetTargetPoolsCall { +func (c *RegionInstanceGroupManagersSuspendInstancesCall) Context(ctx context.Context) *RegionInstanceGroupManagersSuspendInstancesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Header() http.Header { +func (c *RegionInstanceGroupManagersSuspendInstancesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (*http.Response, error) { +func (c *RegionInstanceGroupManagersSuspendInstancesCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssettargetpoolsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regioninstancegroupmanagerssuspendinstancesrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/setTargetPools") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/instanceGroupManagers/{instanceGroupManager}/suspendInstances") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -9026,12 +10402,12 @@ func (c *RegionInstanceGroupManagersSetTargetPoolsCall) doRequest(alt string) (* return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "compute.regionInstanceGroupManagers.setTargetPools" call. +// Do executes the "compute.regionInstanceGroupManagers.suspendInstances" call. // Any non-2xx status code is an error. Response headers are in either // *Operation.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *RegionInstanceGroupManagersSetTargetPoolsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { +func (c *RegionInstanceGroupManagersSuspendInstancesCall) Do(opts ...googleapi.CallOption) (*Operation, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -17077,6 +18453,131 @@ func (c *RegionSecurityPoliciesRemoveRuleCall) Do(opts ...googleapi.CallOption) return ret, nil } +type RegionSecurityPoliciesSetLabelsCall struct { + s *Service + project string + region string + resource string + regionsetlabelsrequest *RegionSetLabelsRequest + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// SetLabels: Sets the labels on a security policy. To learn more about labels, +// read the Labeling Resources documentation. +// +// - project: Project ID for this request. +// - region: The region for this request. +// - resource: Name or id of the resource for this request. +func (r *RegionSecurityPoliciesService) SetLabels(project string, region string, resource string, regionsetlabelsrequest *RegionSetLabelsRequest) *RegionSecurityPoliciesSetLabelsCall { + c := &RegionSecurityPoliciesSetLabelsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.project = project + c.region = region + c.resource = resource + c.regionsetlabelsrequest = regionsetlabelsrequest + return c +} + +// RequestId sets the optional parameter "requestId": An optional 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. 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 *RegionSecurityPoliciesSetLabelsCall) RequestId(requestId string) *RegionSecurityPoliciesSetLabelsCall { + 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 +// details. +func (c *RegionSecurityPoliciesSetLabelsCall) Fields(s ...googleapi.Field) *RegionSecurityPoliciesSetLabelsCall { + c.urlParams_.Set("fields", googleapi.CombineFields(s)) + return c +} + +// Context sets the context to be used in this call's Do method. +func (c *RegionSecurityPoliciesSetLabelsCall) Context(ctx context.Context) *RegionSecurityPoliciesSetLabelsCall { + c.ctx_ = ctx + return c +} + +// Header returns a http.Header that can be modified by the caller to add +// headers to the request. +func (c *RegionSecurityPoliciesSetLabelsCall) Header() http.Header { + if c.header_ == nil { + c.header_ = make(http.Header) + } + return c.header_ +} + +func (c *RegionSecurityPoliciesSetLabelsCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) + var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.regionsetlabelsrequest) + if err != nil { + return nil, err + } + c.urlParams_.Set("alt", alt) + c.urlParams_.Set("prettyPrint", "false") + urls := googleapi.ResolveRelative(c.s.BasePath, "projects/{project}/regions/{region}/securityPolicies/{resource}/setLabels") + 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{ + "project": c.project, + "region": c.region, + "resource": c.resource, + }) + return gensupport.SendRequest(c.ctx_, c.s.client, req) +} + +// Do executes the "compute.regionSecurityPolicies.setLabels" call. +// Any non-2xx status code is an error. Response headers are in either +// *Operation.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *RegionSecurityPoliciesSetLabelsCall) Do(opts ...googleapi.CallOption) (*Operation, error) { + gensupport.SetOptions(c.urlParams_, opts...) + res, err := c.doRequest("json") + if res != nil && res.StatusCode == http.StatusNotModified { + if res.Body != nil { + res.Body.Close() + } + return nil, gensupport.WrapError(&googleapi.Error{ + Code: res.StatusCode, + Header: res.Header, + }) + } + if err != nil { + return nil, err + } + defer googleapi.CloseBody(res) + if err := googleapi.CheckResponse(res); err != nil { + return nil, gensupport.WrapError(err) + } + ret := &Operation{ + ServerResponse: googleapi.ServerResponse{ + Header: res.Header, + HTTPStatusCode: res.StatusCode, + }, + } + target := &ret + if err := gensupport.DecodeResponse(target, res); err != nil { + return nil, err + } + return ret, nil +} + type RegionSslCertificatesDeleteCall struct { s *Service project string diff --git a/dataform/v1beta1/dataform-api.json b/dataform/v1beta1/dataform-api.json index 89a163b4a2d..2f46415ff08 100644 --- a/dataform/v1beta1/dataform-api.json +++ b/dataform/v1beta1/dataform-api.json @@ -235,97 +235,6 @@ } }, "resources": { - "collections": { - "methods": { - "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}:getIamPolicy", - "httpMethod": "GET", - "id": "dataform.projects.locations.collections.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/[^/]+/collections/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:getIamPolicy", - "response": { - "$ref": "Policy" - }, - "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}:setIamPolicy", - "httpMethod": "POST", - "id": "dataform.projects.locations.collections.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/[^/]+/collections/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+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": "v1beta1/projects/{projectsId}/locations/{locationsId}/collections/{collectionsId}:testIamPermissions", - "httpMethod": "POST", - "id": "dataform.projects.locations.collections.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/[^/]+/collections/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:testIamPermissions", - "request": { - "$ref": "TestIamPermissionsRequest" - }, - "response": { - "$ref": "TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - }, "repositories": { "methods": { "commit": { @@ -780,134 +689,6 @@ } }, "resources": { - "commentThreads": { - "methods": { - "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/commentThreads/{commentThreadsId}:getIamPolicy", - "httpMethod": "GET", - "id": "dataform.projects.locations.repositories.commentThreads.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/[^/]+/repositories/[^/]+/commentThreads/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:getIamPolicy", - "response": { - "$ref": "Policy" - }, - "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/commentThreads/{commentThreadsId}:setIamPolicy", - "httpMethod": "POST", - "id": "dataform.projects.locations.repositories.commentThreads.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/[^/]+/repositories/[^/]+/commentThreads/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - }, - "resources": { - "comments": { - "methods": { - "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/commentThreads/{commentThreadsId}/comments/{commentsId}:getIamPolicy", - "httpMethod": "GET", - "id": "dataform.projects.locations.repositories.commentThreads.comments.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/[^/]+/repositories/[^/]+/commentThreads/[^/]+/comments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:getIamPolicy", - "response": { - "$ref": "Policy" - }, - "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": "v1beta1/projects/{projectsId}/locations/{locationsId}/repositories/{repositoriesId}/commentThreads/{commentThreadsId}/comments/{commentsId}:setIamPolicy", - "httpMethod": "POST", - "id": "dataform.projects.locations.repositories.commentThreads.comments.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/[^/]+/repositories/[^/]+/commentThreads/[^/]+/comments/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "v1beta1/{+resource}:setIamPolicy", - "request": { - "$ref": "SetIamPolicyRequest" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform" - ] - } - } - } - } - }, "compilationResults": { "methods": { "create": { @@ -2295,7 +2076,7 @@ } } }, - "revision": "20241108", + "revision": "20241203", "rootUrl": "https://dataform.googleapis.com/", "schemas": { "Assertion": { diff --git a/dataform/v1beta1/dataform-gen.go b/dataform/v1beta1/dataform-gen.go index 86442382463..f1f57cef64b 100644 --- a/dataform/v1beta1/dataform-gen.go +++ b/dataform/v1beta1/dataform-gen.go @@ -168,7 +168,6 @@ type ProjectsService struct { func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { rs := &ProjectsLocationsService{s: s} - rs.Collections = NewProjectsLocationsCollectionsService(s) rs.Repositories = NewProjectsLocationsRepositoriesService(s) return rs } @@ -176,23 +175,11 @@ func NewProjectsLocationsService(s *Service) *ProjectsLocationsService { type ProjectsLocationsService struct { s *Service - Collections *ProjectsLocationsCollectionsService - Repositories *ProjectsLocationsRepositoriesService } -func NewProjectsLocationsCollectionsService(s *Service) *ProjectsLocationsCollectionsService { - rs := &ProjectsLocationsCollectionsService{s: s} - return rs -} - -type ProjectsLocationsCollectionsService struct { - s *Service -} - func NewProjectsLocationsRepositoriesService(s *Service) *ProjectsLocationsRepositoriesService { rs := &ProjectsLocationsRepositoriesService{s: s} - rs.CommentThreads = NewProjectsLocationsRepositoriesCommentThreadsService(s) rs.CompilationResults = NewProjectsLocationsRepositoriesCompilationResultsService(s) rs.ReleaseConfigs = NewProjectsLocationsRepositoriesReleaseConfigsService(s) rs.WorkflowConfigs = NewProjectsLocationsRepositoriesWorkflowConfigsService(s) @@ -204,8 +191,6 @@ func NewProjectsLocationsRepositoriesService(s *Service) *ProjectsLocationsRepos type ProjectsLocationsRepositoriesService struct { s *Service - CommentThreads *ProjectsLocationsRepositoriesCommentThreadsService - CompilationResults *ProjectsLocationsRepositoriesCompilationResultsService ReleaseConfigs *ProjectsLocationsRepositoriesReleaseConfigsService @@ -217,27 +202,6 @@ type ProjectsLocationsRepositoriesService struct { Workspaces *ProjectsLocationsRepositoriesWorkspacesService } -func NewProjectsLocationsRepositoriesCommentThreadsService(s *Service) *ProjectsLocationsRepositoriesCommentThreadsService { - rs := &ProjectsLocationsRepositoriesCommentThreadsService{s: s} - rs.Comments = NewProjectsLocationsRepositoriesCommentThreadsCommentsService(s) - return rs -} - -type ProjectsLocationsRepositoriesCommentThreadsService struct { - s *Service - - Comments *ProjectsLocationsRepositoriesCommentThreadsCommentsService -} - -func NewProjectsLocationsRepositoriesCommentThreadsCommentsService(s *Service) *ProjectsLocationsRepositoriesCommentThreadsCommentsService { - rs := &ProjectsLocationsRepositoriesCommentThreadsCommentsService{s: s} - return rs -} - -type ProjectsLocationsRepositoriesCommentThreadsCommentsService struct { - s *Service -} - func NewProjectsLocationsRepositoriesCompilationResultsService(s *Service) *ProjectsLocationsRepositoriesCompilationResultsService { rs := &ProjectsLocationsRepositoriesCompilationResultsService{s: s} return rs @@ -3513,102 +3477,78 @@ func (c *ProjectsLocationsUpdateConfigCall) Do(opts ...googleapi.CallOption) (*C return ret, nil } -type ProjectsLocationsCollectionsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRepositoriesCommitCall struct { + s *Service + name string + commitrepositorychangesrequest *CommitRepositoryChangesRequest + 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. +// Commit: Applies a Git commit to a Repository. The Repository must not have a +// value for `git_remote_settings.url`. // -// - 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 *ProjectsLocationsCollectionsService) GetIamPolicy(resource string) *ProjectsLocationsCollectionsGetIamPolicyCall { - c := &ProjectsLocationsCollectionsGetIamPolicyCall{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 *ProjectsLocationsCollectionsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsCollectionsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// - name: The repository's name. +func (r *ProjectsLocationsRepositoriesService) Commit(name string, commitrepositorychangesrequest *CommitRepositoryChangesRequest) *ProjectsLocationsRepositoriesCommitCall { + c := &ProjectsLocationsRepositoriesCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + c.commitrepositorychangesrequest = commitrepositorychangesrequest return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsGetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesCommitCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCommitCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsCollectionsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsCollectionsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCollectionsGetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesCommitCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCommitCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesCommitCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsRepositoriesCommitCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrepositorychangesrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:commit") 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, + "name": c.name, }) return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataform.projects.locations.collections.getIamPolicy" call. +// Do executes the "dataform.projects.locations.repositories.commit" call. // 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 *ProjectsLocationsCollectionsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *CommitRepositoryChangesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesCommitCall) Do(opts ...googleapi.CallOption) (*CommitRepositoryChangesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3627,7 +3567,7 @@ func (c *ProjectsLocationsCollectionsGetIamPolicyCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &CommitRepositoryChangesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3640,80 +3580,83 @@ func (c *ProjectsLocationsCollectionsGetIamPolicyCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsCollectionsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRepositoriesComputeAccessTokenStatusCall struct { + s *Service + name 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. +// ComputeAccessTokenStatus: Computes a Repository's Git access token status. // -// - 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 *ProjectsLocationsCollectionsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsCollectionsSetIamPolicyCall { - c := &ProjectsLocationsCollectionsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The repository's name. +func (r *ProjectsLocationsRepositoriesService) ComputeAccessTokenStatus(name string) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { + c := &ProjectsLocationsRepositoriesComputeAccessTokenStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsSetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsCollectionsSetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:computeAccessTokenStatus") 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 "dataform.projects.locations.collections.setIamPolicy" call. +// Do executes the "dataform.projects.locations.repositories.computeAccessTokenStatus" call. // 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 *ProjectsLocationsCollectionsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *ComputeRepositoryAccessTokenStatusResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Do(opts ...googleapi.CallOption) (*ComputeRepositoryAccessTokenStatusResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3732,7 +3675,7 @@ func (c *ProjectsLocationsCollectionsSetIamPolicyCall) Do(opts ...googleapi.Call if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &ComputeRepositoryAccessTokenStatusResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3745,65 +3688,67 @@ func (c *ProjectsLocationsCollectionsSetIamPolicyCall) Do(opts ...googleapi.Call return ret, nil } -type ProjectsLocationsCollectionsTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRepositoriesCreateCall struct { + s *Service + parent string + repository *Repository + 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. +// Create: Creates a new Repository in a given project and location. // -// - 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 *ProjectsLocationsCollectionsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsCollectionsTestIamPermissionsCall { - c := &ProjectsLocationsCollectionsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.testiampermissionsrequest = testiampermissionsrequest +// - parent: The location in which to create the repository. Must be in the +// format `projects/*/locations/*`. +func (r *ProjectsLocationsRepositoriesService) Create(parent string, repository *Repository) *ProjectsLocationsRepositoriesCreateCall { + c := &ProjectsLocationsRepositoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + c.repository = repository + return c +} + +// RepositoryId sets the optional parameter "repositoryId": Required. The ID to +// use for the repository, which will become the final component of the +// repository's resource name. +func (c *ProjectsLocationsRepositoriesCreateCall) RepositoryId(repositoryId string) *ProjectsLocationsRepositoriesCreateCall { + c.urlParams_.Set("repositoryId", repositoryId) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsCollectionsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsCollectionsTestIamPermissionsCall { +func (c *ProjectsLocationsRepositoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCreateCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsCollectionsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsCollectionsTestIamPermissionsCall { +func (c *ProjectsLocationsRepositoriesCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCreateCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsCollectionsTestIamPermissionsCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesCreateCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsCollectionsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRepositoriesCreateCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/repositories") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -3811,18 +3756,17 @@ func (c *ProjectsLocationsCollectionsTestIamPermissionsCall) doRequest(alt strin } 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 "dataform.projects.locations.collections.testIamPermissions" call. +// Do executes the "dataform.projects.locations.repositories.create" call. // 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 *ProjectsLocationsCollectionsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { +// *Repository.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesCreateCall) Do(opts ...googleapi.CallOption) (*Repository, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3841,7 +3785,7 @@ func (c *ProjectsLocationsCollectionsTestIamPermissionsCall) Do(opts ...googleap if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &TestIamPermissionsResponse{ + ret := &Repository{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3854,61 +3798,62 @@ func (c *ProjectsLocationsCollectionsTestIamPermissionsCall) Do(opts ...googleap return ret, nil } -type ProjectsLocationsRepositoriesCommitCall struct { - s *Service - name string - commitrepositorychangesrequest *CommitRepositoryChangesRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRepositoriesDeleteCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header } -// Commit: Applies a Git commit to a Repository. The Repository must not have a -// value for `git_remote_settings.url`. +// Delete: Deletes a single Repository. // // - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) Commit(name string, commitrepositorychangesrequest *CommitRepositoryChangesRequest) *ProjectsLocationsRepositoriesCommitCall { - c := &ProjectsLocationsRepositoriesCommitCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsRepositoriesService) Delete(name string) *ProjectsLocationsRepositoriesDeleteCall { + c := &ProjectsLocationsRepositoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name - c.commitrepositorychangesrequest = commitrepositorychangesrequest + return c +} + +// Force sets the optional parameter "force": If set to true, any child +// resources of this repository will also be deleted. (Otherwise, the request +// will only succeed if the repository has no child resources.) +func (c *ProjectsLocationsRepositoriesDeleteCall) Force(force bool) *ProjectsLocationsRepositoriesDeleteCall { + c.urlParams_.Set("force", fmt.Sprint(force)) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRepositoriesCommitCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCommitCall { +func (c *ProjectsLocationsRepositoriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesDeleteCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesCommitCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCommitCall { +func (c *ProjectsLocationsRepositoriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesDeleteCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRepositoriesCommitCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesDeleteCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesCommitCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) +func (c *ProjectsLocationsRepositoriesDeleteCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.commitrepositorychangesrequest) - if err != nil { - return nil, err - } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:commit") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 } @@ -3919,13 +3864,12 @@ func (c *ProjectsLocationsRepositoriesCommitCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataform.projects.locations.repositories.commit" call. +// Do executes the "dataform.projects.locations.repositories.delete" call. // Any non-2xx status code is an error. Response headers are in either -// *CommitRepositoryChangesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesCommitCall) Do(opts ...googleapi.CallOption) (*CommitRepositoryChangesResponse, error) { +// *Empty.ServerResponse.Header or (if a response was returned at all) in +// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check +// whether the returned error was because http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -3944,7 +3888,7 @@ func (c *ProjectsLocationsRepositoriesCommitCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &CommitRepositoryChangesResponse{ + ret := &Empty{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -3957,7 +3901,7 @@ func (c *ProjectsLocationsRepositoriesCommitCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsRepositoriesComputeAccessTokenStatusCall struct { +type ProjectsLocationsRepositoriesFetchHistoryCall struct { s *Service name string urlParams_ gensupport.URLParams @@ -3966,19 +3910,38 @@ type ProjectsLocationsRepositoriesComputeAccessTokenStatusCall struct { header_ http.Header } -// ComputeAccessTokenStatus: Computes a Repository's Git access token status. +// FetchHistory: Fetches a Repository's history of commits. The Repository must +// not have a value for `git_remote_settings.url`. // // - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) ComputeAccessTokenStatus(name string) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { - c := &ProjectsLocationsRepositoriesComputeAccessTokenStatusCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsRepositoriesService) FetchHistory(name string) *ProjectsLocationsRepositoriesFetchHistoryCall { + c := &ProjectsLocationsRepositoriesFetchHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } +// PageSize sets the optional parameter "pageSize": Maximum number of commits +// to return. The server may return fewer items than requested. If unspecified, +// the server will pick an appropriate default. +func (c *ProjectsLocationsRepositoriesFetchHistoryCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesFetchHistoryCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous `FetchRepositoryHistory` call. Provide this to retrieve the +// subsequent page. When paginating, all other parameters provided to +// `FetchRepositoryHistory`, with the exception of `page_size`, must match the +// call that provided the page token. +func (c *ProjectsLocationsRepositoriesFetchHistoryCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesFetchHistoryCall { + c.urlParams_.Set("pageToken", pageToken) + return c +} + // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { +func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFetchHistoryCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -3986,27 +3949,27 @@ func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Fields(s ... // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { +func (c *ProjectsLocationsRepositoriesFetchHistoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFetchHistoryCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall { +func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFetchHistoryCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRepositoriesFetchHistoryCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -4014,7 +3977,7 @@ func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) doRequest(al var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:computeAccessTokenStatus") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:fetchHistory") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4027,13 +3990,13 @@ func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) doRequest(al return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataform.projects.locations.repositories.computeAccessTokenStatus" call. +// Do executes the "dataform.projects.locations.repositories.fetchHistory" call. // Any non-2xx status code is an error. Response headers are in either -// *ComputeRepositoryAccessTokenStatusResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use +// *FetchRepositoryHistoryResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Do(opts ...googleapi.CallOption) (*ComputeRepositoryAccessTokenStatusResponse, error) { +func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Do(opts ...googleapi.CallOption) (*FetchRepositoryHistoryResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4052,7 +4015,7 @@ func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Do(opts ...g if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &ComputeRepositoryAccessTokenStatusResponse{ + ret := &FetchRepositoryHistoryResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4065,85 +4028,104 @@ func (c *ProjectsLocationsRepositoriesComputeAccessTokenStatusCall) Do(opts ...g return ret, nil } -type ProjectsLocationsRepositoriesCreateCall struct { - s *Service - parent string - repository *Repository - 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 *ProjectsLocationsRepositoriesFetchHistoryCall) Pages(ctx context.Context, f func(*FetchRepositoryHistoryResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Create: Creates a new Repository in a given project and location. -// -// - parent: The location in which to create the repository. Must be in the -// format `projects/*/locations/*`. -func (r *ProjectsLocationsRepositoriesService) Create(parent string, repository *Repository) *ProjectsLocationsRepositoriesCreateCall { - c := &ProjectsLocationsRepositoriesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - c.repository = repository - return c +type ProjectsLocationsRepositoriesFetchRemoteBranchesCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// RepositoryId sets the optional parameter "repositoryId": Required. The ID to -// use for the repository, which will become the final component of the -// repository's resource name. -func (c *ProjectsLocationsRepositoriesCreateCall) RepositoryId(repositoryId string) *ProjectsLocationsRepositoriesCreateCall { - c.urlParams_.Set("repositoryId", repositoryId) +// FetchRemoteBranches: Fetches a Repository's remote branches. +// +// - name: The repository's name. +func (r *ProjectsLocationsRepositoriesService) FetchRemoteBranches(name string) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { + c := &ProjectsLocationsRepositoriesFetchRemoteBranchesCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRepositoriesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCreateCall { +func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesCreateCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCreateCall { +func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRepositoriesCreateCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository) - if err != nil { - return nil, err +func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/repositories") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:fetchRemoteBranches") 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 "dataform.projects.locations.repositories.create" call. +// Do executes the "dataform.projects.locations.repositories.fetchRemoteBranches" call. // Any non-2xx status code is an error. Response headers are in either -// *Repository.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesCreateCall) Do(opts ...googleapi.CallOption) (*Repository, error) { +// *FetchRemoteBranchesResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Do(opts ...googleapi.CallOption) (*FetchRemoteBranchesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4162,7 +4144,7 @@ func (c *ProjectsLocationsRepositoriesCreateCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Repository{ + ret := &FetchRemoteBranchesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4175,62 +4157,66 @@ func (c *ProjectsLocationsRepositoriesCreateCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsRepositoriesDeleteCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRepositoriesGetCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header } -// Delete: Deletes a single Repository. +// Get: Fetches a single Repository. // // - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) Delete(name string) *ProjectsLocationsRepositoriesDeleteCall { - c := &ProjectsLocationsRepositoriesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsRepositoriesService) Get(name string) *ProjectsLocationsRepositoriesGetCall { + c := &ProjectsLocationsRepositoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name return c } -// Force sets the optional parameter "force": If set to true, any child -// resources of this repository will also be deleted. (Otherwise, the request -// will only succeed if the repository has no child resources.) -func (c *ProjectsLocationsRepositoriesDeleteCall) Force(force bool) *ProjectsLocationsRepositoriesDeleteCall { - c.urlParams_.Set("force", fmt.Sprint(force)) - return c -} - // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRepositoriesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesDeleteCall { +func (c *ProjectsLocationsRepositoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsRepositoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesDeleteCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesDeleteCall { +func (c *ProjectsLocationsRepositoriesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRepositoriesDeleteCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesGetCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesDeleteCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRepositoriesGetCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) + } var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, body) + req, err := http.NewRequest("GET", urls, body) if err != nil { return nil, err } @@ -4241,12 +4227,12 @@ func (c *ProjectsLocationsRepositoriesDeleteCall) doRequest(alt string) (*http.R return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataform.projects.locations.repositories.delete" call. +// Do executes the "dataform.projects.locations.repositories.get" call. // Any non-2xx status code is an error. Response headers are in either -// *Empty.ServerResponse.Header or (if a response was returned at all) in +// *Repository.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) { +func (c *ProjectsLocationsRepositoriesGetCall) Do(opts ...googleapi.CallOption) (*Repository, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4265,7 +4251,7 @@ func (c *ProjectsLocationsRepositoriesDeleteCall) Do(opts ...googleapi.CallOptio if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Empty{ + ret := &Repository{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4278,47 +4264,48 @@ func (c *ProjectsLocationsRepositoriesDeleteCall) Do(opts ...googleapi.CallOptio return ret, nil } -type ProjectsLocationsRepositoriesFetchHistoryCall struct { +type ProjectsLocationsRepositoriesGetIamPolicyCall struct { s *Service - name string + resource string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// FetchHistory: Fetches a Repository's history of commits. The Repository must -// not have a value for `git_remote_settings.url`. +// 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 repository's name. -func (r *ProjectsLocationsRepositoriesService) FetchHistory(name string) *ProjectsLocationsRepositoriesFetchHistoryCall { - c := &ProjectsLocationsRepositoriesFetchHistoryCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of commits -// to return. The server may return fewer items than requested. If unspecified, -// the server will pick an appropriate default. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesFetchHistoryCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) +// - 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 *ProjectsLocationsRepositoriesService) GetIamPolicy(resource string) *ProjectsLocationsRepositoriesGetIamPolicyCall { + c := &ProjectsLocationsRepositoriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.resource = resource return c } -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous `FetchRepositoryHistory` call. Provide this to retrieve the -// subsequent page. When paginating, all other parameters provided to -// `FetchRepositoryHistory`, with the exception of `page_size`, must match the -// call that provided the page token. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesFetchHistoryCall { - c.urlParams_.Set("pageToken", pageToken) +// 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 *ProjectsLocationsRepositoriesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRepositoriesGetIamPolicyCall { + 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 // details. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFetchHistoryCall { +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4326,27 +4313,27 @@ func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Fields(s ...googleapi.Fi // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFetchHistoryCall { +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetIamPolicyCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFetchHistoryCall { +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -4354,7 +4341,7 @@ func (c *ProjectsLocationsRepositoriesFetchHistoryCall) doRequest(alt string) (* var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:fetchHistory") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4362,18 +4349,17 @@ func (c *ProjectsLocationsRepositoriesFetchHistoryCall) doRequest(alt string) (* } 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 "dataform.projects.locations.repositories.fetchHistory" call. +// Do executes the "dataform.projects.locations.repositories.getIamPolicy" call. // Any non-2xx status code is an error. Response headers are in either -// *FetchRepositoryHistoryResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Do(opts ...googleapi.CallOption) (*FetchRepositoryHistoryResponse, error) { +// *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 *ProjectsLocationsRepositoriesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4392,7 +4378,7 @@ func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Do(opts ...googleapi.Cal if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FetchRepositoryHistoryResponse{ + ret := &Policy{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4405,49 +4391,61 @@ func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Do(opts ...googleapi.Cal return ret, nil } -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsRepositoriesFetchHistoryCall) Pages(ctx context.Context, f func(*FetchRepositoryHistoryResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsRepositoriesFetchRemoteBranchesCall struct { +type ProjectsLocationsRepositoriesListCall struct { s *Service - name string + parent string urlParams_ gensupport.URLParams ifNoneMatch_ string ctx_ context.Context header_ http.Header } -// FetchRemoteBranches: Fetches a Repository's remote branches. +// List: Lists Repositories in a given project and location. // -// - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) FetchRemoteBranches(name string) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { - c := &ProjectsLocationsRepositoriesFetchRemoteBranchesCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name +// - parent: The location in which to list repositories. Must be in the format +// `projects/*/locations/*`. +func (r *ProjectsLocationsRepositoriesService) List(parent string) *ProjectsLocationsRepositoriesListCall { + c := &ProjectsLocationsRepositoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.parent = parent + return c +} + +// Filter sets the optional parameter "filter": Filter for the returned list. +func (c *ProjectsLocationsRepositoriesListCall) Filter(filter string) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("filter", filter) + return c +} + +// OrderBy sets the optional parameter "orderBy": This field only supports +// ordering by `name`. If unspecified, the server will choose the ordering. If +// specified, the default order is ascending for the `name` field. +func (c *ProjectsLocationsRepositoriesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("orderBy", orderBy) + return c +} + +// PageSize sets the optional parameter "pageSize": Maximum number of +// repositories to return. The server may return fewer items than requested. If +// unspecified, the server will pick an appropriate default. +func (c *ProjectsLocationsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) + return c +} + +// PageToken sets the optional parameter "pageToken": Page token received from +// a previous `ListRepositories` call. Provide this to retrieve the subsequent +// page. When paginating, all other parameters provided to `ListRepositories`, +// with the exception of `page_size`, must match the call that provided the +// page token. +func (c *ProjectsLocationsRepositoriesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesListCall { + c.urlParams_.Set("pageToken", pageToken) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { +func (c *ProjectsLocationsRepositoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesListCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -4455,27 +4453,27 @@ func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Fields(s ...googl // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { +func (c *ProjectsLocationsRepositoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesListCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesFetchRemoteBranchesCall { +func (c *ProjectsLocationsRepositoriesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesListCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesListCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRepositoriesListCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -4483,7 +4481,7 @@ func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) doRequest(alt str var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:fetchRemoteBranches") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/repositories") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -4491,18 +4489,18 @@ func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) doRequest(alt str } 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 "dataform.projects.locations.repositories.fetchRemoteBranches" call. +// Do executes the "dataform.projects.locations.repositories.list" call. // Any non-2xx status code is an error. Response headers are in either -// *FetchRemoteBranchesResponse.ServerResponse.Header or (if a response was +// *ListRepositoriesResponse.ServerResponse.Header or (if a response was // returned at all) in error.(*googleapi.Error).Header. Use // googleapi.IsNotModified to check whether the returned error was because // http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Do(opts ...googleapi.CallOption) (*FetchRemoteBranchesResponse, error) { +func (c *ProjectsLocationsRepositoriesListCall) Do(opts ...googleapi.CallOption) (*ListRepositoriesResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4521,7 +4519,7 @@ func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Do(opts ...google if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &FetchRemoteBranchesResponse{ + ret := &ListRepositoriesResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -4534,66 +4532,92 @@ func (c *ProjectsLocationsRepositoriesFetchRemoteBranchesCall) Do(opts ...google return ret, nil } -type ProjectsLocationsRepositoriesGetCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +// Pages invokes f for each page of results. +// A non-nil error returned from f will halt the iteration. +// The provided context supersedes any context provided to the Context method. +func (c *ProjectsLocationsRepositoriesListCall) Pages(ctx context.Context, f func(*ListRepositoriesResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// Get: Fetches a single Repository. +type ProjectsLocationsRepositoriesPatchCall struct { + s *Service + name string + repository *Repository + urlParams_ gensupport.URLParams + ctx_ context.Context + header_ http.Header +} + +// Patch: Updates a single Repository. *Note:* This method does not fully +// implement AIP/134. In particular: 1. The wildcard entry (***) is treated as +// a bad request 2. When the *field_mask* is omitted, instead of only updating +// the set fields, the request is treated as a full update on all modifiable +// fields // -// - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) Get(name string) *ProjectsLocationsRepositoriesGetCall { - c := &ProjectsLocationsRepositoriesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - name: Identifier. The repository's name. +func (r *ProjectsLocationsRepositoriesService) Patch(name string, repository *Repository) *ProjectsLocationsRepositoriesPatchCall { + c := &ProjectsLocationsRepositoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.name = name + c.repository = repository + return c +} + +// UpdateMask sets the optional parameter "updateMask": Specifies the fields to +// be updated in the repository. If left unset, all fields will be updated. +func (c *ProjectsLocationsRepositoriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPatchCall { + c.urlParams_.Set("updateMask", updateMask) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRepositoriesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetCall { +func (c *ProjectsLocationsRepositoriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPatchCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsRepositoriesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesGetCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetCall { +func (c *ProjectsLocationsRepositoriesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPatchCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRepositoriesGetCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesPatchCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsRepositoriesPatchCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, body) + req, err := http.NewRequest("PATCH", urls, body) if err != nil { return nil, err } @@ -4604,12 +4628,12 @@ func (c *ProjectsLocationsRepositoriesGetCall) doRequest(alt string) (*http.Resp return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataform.projects.locations.repositories.get" call. +// Do executes the "dataform.projects.locations.repositories.patch" call. // Any non-2xx status code is an error. Response headers are in either // *Repository.ServerResponse.Header or (if a response was returned at all) in // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check // whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesGetCall) Do(opts ...googleapi.CallOption) (*Repository, error) { +func (c *ProjectsLocationsRepositoriesPatchCall) Do(opts ...googleapi.CallOption) (*Repository, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -4641,438 +4665,37 @@ func (c *ProjectsLocationsRepositoriesGetCall) Do(opts ...googleapi.CallOption) return ret, nil } -type ProjectsLocationsRepositoriesGetIamPolicyCall struct { +type ProjectsLocationsRepositoriesQueryDirectoryContentsCall 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. +// QueryDirectoryContents: Returns the contents of a given Repository +// directory. The Repository must not have a value for +// `git_remote_settings.url`. // -// - 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 *ProjectsLocationsRepositoriesService) GetIamPolicy(resource string) *ProjectsLocationsRepositoriesGetIamPolicyCall { - c := &ProjectsLocationsRepositoriesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// - name: The repository's name. +func (r *ProjectsLocationsRepositoriesService) QueryDirectoryContents(name string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { + c := &ProjectsLocationsRepositoriesQueryDirectoryContentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name 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 *ProjectsLocationsRepositoriesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRepositoriesGetIamPolicyCall { - 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 -// details. -func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 "dataform.projects.locations.repositories.getIamPolicy" call. -// 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 *ProjectsLocationsRepositoriesGetIamPolicyCall) 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 -} - -type ProjectsLocationsRepositoriesListCall struct { - s *Service - parent string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Lists Repositories in a given project and location. -// -// - parent: The location in which to list repositories. Must be in the format -// `projects/*/locations/*`. -func (r *ProjectsLocationsRepositoriesService) List(parent string) *ProjectsLocationsRepositoriesListCall { - c := &ProjectsLocationsRepositoriesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.parent = parent - return c -} - -// Filter sets the optional parameter "filter": Filter for the returned list. -func (c *ProjectsLocationsRepositoriesListCall) Filter(filter string) *ProjectsLocationsRepositoriesListCall { - c.urlParams_.Set("filter", filter) - return c -} - -// OrderBy sets the optional parameter "orderBy": This field only supports -// ordering by `name`. If unspecified, the server will choose the ordering. If -// specified, the default order is ascending for the `name` field. -func (c *ProjectsLocationsRepositoriesListCall) OrderBy(orderBy string) *ProjectsLocationsRepositoriesListCall { - c.urlParams_.Set("orderBy", orderBy) +// CommitSha sets the optional parameter "commitSha": The Commit SHA for the +// commit to query from. If unset, the directory will be queried from HEAD. +func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) CommitSha(commitSha string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { + c.urlParams_.Set("commitSha", commitSha) return c } -// PageSize sets the optional parameter "pageSize": Maximum number of -// repositories to return. The server may return fewer items than requested. If -// unspecified, the server will pick an appropriate default. -func (c *ProjectsLocationsRepositoriesListCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesListCall { - c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) - return c -} - -// PageToken sets the optional parameter "pageToken": Page token received from -// a previous `ListRepositories` call. Provide this to retrieve the subsequent -// page. When paginating, all other parameters provided to `ListRepositories`, -// with the exception of `page_size`, must match the call that provided the -// page token. -func (c *ProjectsLocationsRepositoriesListCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsRepositoriesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsRepositoriesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesListCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsRepositoriesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+parent}/repositories") - 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 "dataform.projects.locations.repositories.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ListRepositoriesResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesListCall) Do(opts ...googleapi.CallOption) (*ListRepositoriesResponse, 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 := &ListRepositoriesResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsRepositoriesListCall) Pages(ctx context.Context, f func(*ListRepositoriesResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsRepositoriesPatchCall struct { - s *Service - name string - repository *Repository - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Updates a single Repository. *Note:* This method does not fully -// implement AIP/134. In particular: 1. The wildcard entry (***) is treated as -// a bad request 2. When the *field_mask* is omitted, instead of only updating -// the set fields, the request is treated as a full update on all modifiable -// fields -// -// - name: Identifier. The repository's name. -func (r *ProjectsLocationsRepositoriesService) Patch(name string, repository *Repository) *ProjectsLocationsRepositoriesPatchCall { - c := &ProjectsLocationsRepositoriesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - c.repository = repository - return c -} - -// UpdateMask sets the optional parameter "updateMask": Specifies the fields to -// be updated in the repository. If left unset, all fields will be updated. -func (c *ProjectsLocationsRepositoriesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsRepositoriesPatchCall { - c.urlParams_.Set("updateMask", updateMask) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsRepositoriesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesPatchCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsRepositoriesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.repository) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "name": c.name, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataform.projects.locations.repositories.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Repository.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesPatchCall) Do(opts ...googleapi.CallOption) (*Repository, 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 := &Repository{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsRepositoriesQueryDirectoryContentsCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// QueryDirectoryContents: Returns the contents of a given Repository -// directory. The Repository must not have a value for -// `git_remote_settings.url`. -// -// - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) QueryDirectoryContents(name string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c := &ProjectsLocationsRepositoriesQueryDirectoryContentsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// CommitSha sets the optional parameter "commitSha": The Commit SHA for the -// commit to query from. If unset, the directory will be queried from HEAD. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) CommitSha(commitSha string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.urlParams_.Set("commitSha", commitSha) - return c -} - -// PageSize sets the optional parameter "pageSize": Maximum number of paths to -// return. The server may return fewer items than requested. If unspecified, -// the server will pick an appropriate default. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { +// PageSize sets the optional parameter "pageSize": Maximum number of paths to +// return. The server may return fewer items than requested. If unspecified, +// the server will pick an appropriate default. +func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) PageSize(pageSize int64) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { c.urlParams_.Set("pageSize", fmt.Sprint(pageSize)) return c } @@ -5081,509 +4704,23 @@ func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) PageSize(pageS // a previous `QueryRepositoryDirectoryContents` call. Provide this to retrieve // the subsequent page. When paginating, all other parameters provided to // `QueryRepositoryDirectoryContents`, with the exception of `page_size`, must -// match the call that provided the page token. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Path sets the optional parameter "path": The directory's full path including -// directory name, relative to root. If left unset, the root is used. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Path(path string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.urlParams_.Set("path", path) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:queryDirectoryContents") - 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 "dataform.projects.locations.repositories.queryDirectoryContents" call. -// Any non-2xx status code is an error. Response headers are in either -// *QueryRepositoryDirectoryContentsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Do(opts ...googleapi.CallOption) (*QueryRepositoryDirectoryContentsResponse, 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 := &QueryRepositoryDirectoryContentsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Pages(ctx context.Context, f func(*QueryRepositoryDirectoryContentsResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ProjectsLocationsRepositoriesReadFileCall struct { - s *Service - name string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// ReadFile: Returns the contents of a file (inside a Repository). The -// Repository must not have a value for `git_remote_settings.url`. -// -// - name: The repository's name. -func (r *ProjectsLocationsRepositoriesService) ReadFile(name string) *ProjectsLocationsRepositoriesReadFileCall { - c := &ProjectsLocationsRepositoriesReadFileCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.name = name - return c -} - -// CommitSha sets the optional parameter "commitSha": The commit SHA for the -// commit to read from. If unset, the file will be read from HEAD. -func (c *ProjectsLocationsRepositoriesReadFileCall) CommitSha(commitSha string) *ProjectsLocationsRepositoriesReadFileCall { - c.urlParams_.Set("commitSha", commitSha) - return c -} - -// Path sets the optional parameter "path": Required. Full file path to read -// including filename, from repository root. -func (c *ProjectsLocationsRepositoriesReadFileCall) Path(path string) *ProjectsLocationsRepositoriesReadFileCall { - c.urlParams_.Set("path", path) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsLocationsRepositoriesReadFileCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesReadFileCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsRepositoriesReadFileCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesReadFileCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesReadFileCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesReadFileCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsRepositoriesReadFileCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesReadFileCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - var body io.Reader = nil - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:readFile") - 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 "dataform.projects.locations.repositories.readFile" call. -// Any non-2xx status code is an error. Response headers are in either -// *ReadRepositoryFileResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ProjectsLocationsRepositoriesReadFileCall) Do(opts ...googleapi.CallOption) (*ReadRepositoryFileResponse, 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 := &ReadRepositoryFileResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsRepositoriesSetIamPolicyCall 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 *ProjectsLocationsRepositoriesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRepositoriesSetIamPolicyCall { - c := &ProjectsLocationsRepositoriesSetIamPolicyCall{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 -// details. -func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") - 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{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataform.projects.locations.repositories.setIamPolicy" call. -// 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 *ProjectsLocationsRepositoriesSetIamPolicyCall) 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 -} - -type ProjectsLocationsRepositoriesTestIamPermissionsCall struct { - s *Service - resource string - testiampermissionsrequest *TestIamPermissionsRequest - 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. -// -// - 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 *ProjectsLocationsRepositoriesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRepositoriesTestIamPermissionsCall { - c := &ProjectsLocationsRepositoriesTestIamPermissionsCall{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 -// details. -func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") - 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{ - "resource": c.resource, - }) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dataform.projects.locations.repositories.testIamPermissions" call. -// 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 *ProjectsLocationsRepositoriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, 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 := &TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - if err := gensupport.DecodeResponse(target, res); err != nil { - return nil, err - } - return ret, nil -} - -type ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall 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 *ProjectsLocationsRepositoriesCommentThreadsService) GetIamPolicy(resource string) *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall { - c := &ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource +// match the call that provided the page token. +func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) PageToken(pageToken string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { + c.urlParams_.Set("pageToken", pageToken) 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 *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) +// Path sets the optional parameter "path": The directory's full path including +// directory name, relative to root. If left unset, the root is used. +func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Path(path string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { + c.urlParams_.Set("path", path) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } @@ -5591,27 +4728,27 @@ func (c *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) Fields(s . // IfNoneMatch sets an optional parameter which makes the operation fail if the // object's ETag matches the given value. This is useful for getting updates // only after the object has changed since the last request. -func (c *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { c.ifNoneMatch_ = entityTag return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesQueryDirectoryContentsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) if c.ifNoneMatch_ != "" { reqHeaders.Set("If-None-Match", c.ifNoneMatch_) @@ -5619,7 +4756,7 @@ func (c *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) doRequest( var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:queryDirectoryContents") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("GET", urls, body) if err != nil { @@ -5627,17 +4764,18 @@ func (c *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) doRequest( } 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 "dataform.projects.locations.repositories.commentThreads.getIamPolicy" call. +// Do executes the "dataform.projects.locations.repositories.queryDirectoryContents" call. // 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 *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *QueryRepositoryDirectoryContentsResponse.ServerResponse.Header or (if a +// response was returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Do(opts ...googleapi.CallOption) (*QueryRepositoryDirectoryContentsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5656,7 +4794,7 @@ func (c *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &QueryRepositoryDirectoryContentsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5669,80 +4807,119 @@ func (c *ProjectsLocationsRepositoriesCommentThreadsGetIamPolicyCall) Do(opts .. return ret, nil } -type ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - 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 *ProjectsLocationsRepositoriesQueryDirectoryContentsCall) Pages(ctx context.Context, f func(*QueryRepositoryDirectoryContentsResponse) error) error { + c.ctx_ = ctx + defer c.PageToken(c.urlParams_.Get("pageToken")) + for { + x, err := c.Do() + if err != nil { + return err + } + if err := f(x); err != nil { + return err + } + if x.NextPageToken == "" { + return nil + } + c.PageToken(x.NextPageToken) + } } -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, -// and `PERMISSION_DENIED` errors. +type ProjectsLocationsRepositoriesReadFileCall struct { + s *Service + name string + urlParams_ gensupport.URLParams + ifNoneMatch_ string + ctx_ context.Context + header_ http.Header +} + +// ReadFile: Returns the contents of a file (inside a Repository). The +// Repository must not have a value for `git_remote_settings.url`. // -// - 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 *ProjectsLocationsRepositoriesCommentThreadsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall { - c := &ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.setiampolicyrequest = setiampolicyrequest +// - name: The repository's name. +func (r *ProjectsLocationsRepositoriesService) ReadFile(name string) *ProjectsLocationsRepositoriesReadFileCall { + c := &ProjectsLocationsRepositoriesReadFileCall{s: r.s, urlParams_: make(gensupport.URLParams)} + c.name = name + return c +} + +// CommitSha sets the optional parameter "commitSha": The commit SHA for the +// commit to read from. If unset, the file will be read from HEAD. +func (c *ProjectsLocationsRepositoriesReadFileCall) CommitSha(commitSha string) *ProjectsLocationsRepositoriesReadFileCall { + c.urlParams_.Set("commitSha", commitSha) + return c +} + +// Path sets the optional parameter "path": Required. Full file path to read +// including filename, from repository root. +func (c *ProjectsLocationsRepositoriesReadFileCall) Path(path string) *ProjectsLocationsRepositoriesReadFileCall { + c.urlParams_.Set("path", path) return c } // Fields allows partial responses to be retrieved. See // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more // details. -func (c *ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesReadFileCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesReadFileCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } +// IfNoneMatch sets an optional parameter which makes the operation fail if the +// object's ETag matches the given value. This is useful for getting updates +// only after the object has changed since the last request. +func (c *ProjectsLocationsRepositoriesReadFileCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesReadFileCall { + c.ifNoneMatch_ = entityTag + return c +} + // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesReadFileCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesReadFileCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesReadFileCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) - if err != nil { - return nil, err +func (c *ProjectsLocationsRepositoriesReadFileCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) + if c.ifNoneMatch_ != "" { + reqHeaders.Set("If-None-Match", c.ifNoneMatch_) } + var body io.Reader = nil c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+name}:readFile") 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 "dataform.projects.locations.repositories.commentThreads.setIamPolicy" call. +// Do executes the "dataform.projects.locations.repositories.readFile" call. // 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 *ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *ReadRepositoryFileResponse.ServerResponse.Header or (if a response was +// returned at all) in error.(*googleapi.Error).Header. Use +// googleapi.IsNotModified to check whether the returned error was because +// http.StatusNotModified was returned. +func (c *ProjectsLocationsRepositoriesReadFileCall) Do(opts ...googleapi.CallOption) (*ReadRepositoryFileResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5761,7 +4938,7 @@ func (c *ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall) Do(opts .. if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &ReadRepositoryFileResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, @@ -5774,86 +4951,64 @@ func (c *ProjectsLocationsRepositoriesCommentThreadsSetIamPolicyCall) Do(opts .. return ret, nil } -type ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall struct { - s *Service - resource string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRepositoriesSetIamPolicyCall struct { + s *Service + resource string + setiampolicyrequest *SetIamPolicyRequest + 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. +// 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 requested. +// - 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 *ProjectsLocationsRepositoriesCommentThreadsCommentsService) GetIamPolicy(resource string) *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall { - c := &ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +func (r *ProjectsLocationsRepositoriesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRepositoriesSetIamPolicyCall { + c := &ProjectsLocationsRepositoriesSetIamPolicyCall{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 *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall { - c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion)) + 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 // details. -func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesSetIamPolicyCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall { - c.ifNoneMatch_ = entityTag - return c -} - // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesSetIamPolicyCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { + reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil + body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + if err != nil { + return nil, err + } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:getIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+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 } @@ -5864,12 +5019,12 @@ func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall) do return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataform.projects.locations.repositories.commentThreads.comments.getIamPolicy" call. +// Do executes the "dataform.projects.locations.repositories.setIamPolicy" call. // 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 *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +func (c *ProjectsLocationsRepositoriesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5901,62 +5056,65 @@ func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsGetIamPolicyCall) Do return ret, nil } -type ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall struct { - s *Service - resource string - setiampolicyrequest *SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header +type ProjectsLocationsRepositoriesTestIamPermissionsCall struct { + s *Service + resource string + testiampermissionsrequest *TestIamPermissionsRequest + 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. +// 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. // -// - 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 *ProjectsLocationsRepositoriesCommentThreadsCommentsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall { - c := &ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} +// - 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 *ProjectsLocationsRepositoriesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsRepositoriesTestIamPermissionsCall { + c := &ProjectsLocationsRepositoriesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} c.resource = resource - c.setiampolicyrequest = setiampolicyrequest + 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 // details. -func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsRepositoriesTestIamPermissionsCall { c.urlParams_.Set("fields", googleapi.CombineFields(s)) return c } // Context sets the context to be used in this call's Do method. -func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall { +func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsRepositoriesTestIamPermissionsCall { c.ctx_ = ctx return c } // Header returns a http.Header that can be modified by the caller to add // headers to the request. -func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall) Header() http.Header { +func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) Header() http.Header { if c.header_ == nil { c.header_ = make(http.Header) } return c.header_ } -func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { +func (c *ProjectsLocationsRepositoriesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) var body io.Reader = nil - body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest) + body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest) if err != nil { return nil, err } c.urlParams_.Set("alt", alt) c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:setIamPolicy") + urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta1/{+resource}:testIamPermissions") urls += "?" + c.urlParams_.Encode() req, err := http.NewRequest("POST", urls, body) if err != nil { @@ -5969,12 +5127,13 @@ func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall) do return gensupport.SendRequest(c.ctx_, c.s.client, req) } -// Do executes the "dataform.projects.locations.repositories.commentThreads.comments.setIamPolicy" call. +// Do executes the "dataform.projects.locations.repositories.testIamPermissions" call. // 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 *ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) { +// *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 *ProjectsLocationsRepositoriesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) { gensupport.SetOptions(c.urlParams_, opts...) res, err := c.doRequest("json") if res != nil && res.StatusCode == http.StatusNotModified { @@ -5993,7 +5152,7 @@ func (c *ProjectsLocationsRepositoriesCommentThreadsCommentsSetIamPolicyCall) Do if err := googleapi.CheckResponse(res); err != nil { return nil, gensupport.WrapError(err) } - ret := &Policy{ + ret := &TestIamPermissionsResponse{ ServerResponse: googleapi.ServerResponse{ Header: res.Header, HTTPStatusCode: res.StatusCode, diff --git a/datafusion/v1/datafusion-api.json b/datafusion/v1/datafusion-api.json index 2793f26985f..21c20165c79 100644 --- a/datafusion/v1/datafusion-api.json +++ b/datafusion/v1/datafusion-api.json @@ -562,7 +562,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "datafusion.projects.locations.operations.cancel", @@ -732,7 +732,7 @@ } } }, - "revision": "20240703", + "revision": "20241204", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -777,38 +777,6 @@ }, "type": "object" }, - "AssetLocation": { - "description": "Provides the mapping of a cloud asset to a direct physical location or to a proxy that defines the location on its behalf.", - "id": "AssetLocation", - "properties": { - "expected": { - "$ref": "IsolationExpectations", - "description": "Defines the customer expectation around ZI/ZS for this asset and ZI/ZS state of the region at the time of asset creation." - }, - "extraParameters": { - "description": "Defines extra parameters required for specific asset types.", - "items": { - "$ref": "ExtraParameter" - }, - "type": "array" - }, - "locationData": { - "description": "Contains all kinds of physical location definitions for this asset.", - "items": { - "$ref": "LocationData" - }, - "type": "array" - }, - "parentAsset": { - "description": "Defines parents assets if any in order to allow later generation of child_asset_location data via child assets.", - "items": { - "$ref": "CloudAsset" - }, - "type": "array" - } - }, - "type": "object" - }, "AuditConfig": { "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", "id": "AuditConfig", @@ -879,72 +847,23 @@ }, "type": "object" }, - "BlobstoreLocation": { - "description": "Policy ID that identified data placement in Blobstore as per go/blobstore-user-guide#data-metadata-placement-and-failure-domains", - "id": "BlobstoreLocation", - "properties": { - "policyId": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", "properties": {}, "type": "object" }, - "CloudAsset": { - "id": "CloudAsset", - "properties": { - "assetName": { - "type": "string" - }, - "assetType": { - "type": "string" - } - }, - "type": "object" - }, - "CloudAssetComposition": { - "id": "CloudAssetComposition", - "properties": { - "childAsset": { - "items": { - "$ref": "CloudAsset" - }, - "type": "array" - } - }, - "type": "object" - }, "CryptoKeyConfig": { "description": "The crypto key configuration. This field is used by the Customer-managed encryption keys (CMEK) feature.", "id": "CryptoKeyConfig", "properties": { "keyReference": { - "description": "The name of the key which is used to encrypt/decrypt customer data. For key in Cloud KMS, the key should be in the format of `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", + "description": "Optional. The name of the key which is used to encrypt/decrypt customer data. For key in Cloud KMS, the key should be in the format of `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", "type": "string" } }, "type": "object" }, - "DirectLocationAssignment": { - "id": "DirectLocationAssignment", - "properties": { - "location": { - "items": { - "$ref": "LocationAssignment" - }, - "type": "array" - } - }, - "type": "object" - }, "DnsPeering": { "description": "DNS peering configuration. These configurations are used to create DNS peering with the customer Cloud DNS.", "id": "DnsPeering", @@ -958,7 +877,7 @@ "type": "string" }, "name": { - "description": "Required. The resource name of the dns peering zone. Format: projects/{project}/locations/{location}/instances/{instance}/dnsPeerings/{dns_peering}", + "description": "Identifier. The resource name of the dns peering zone. Format: projects/{project}/locations/{location}/instances/{instance}/dnsPeerings/{dns_peering}", "type": "string" }, "targetNetwork": { @@ -1016,17 +935,6 @@ }, "type": "object" }, - "ExtraParameter": { - "description": "Defines parameters that should only be used for specific asset types.", - "id": "ExtraParameter", - "properties": { - "regionalMigDistributionPolicy": { - "$ref": "RegionalMigDistributionPolicy", - "description": "Details about zones used by regional compute.googleapis.com/InstanceGroupManager to create instances." - } - }, - "type": "object" - }, "Instance": { "description": "Represents a Data Fusion instance.", "id": "Instance", @@ -1060,18 +968,18 @@ }, "cryptoKeyConfig": { "$ref": "CryptoKeyConfig", - "description": "The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature." + "description": "Optional. The crypto key configuration. This field is used by the Customer-Managed Encryption Keys (CMEK) feature." }, "dataplexDataLineageIntegrationEnabled": { "description": "Optional. Option to enable the Dataplex Lineage Integration feature.", "type": "boolean" }, "dataprocServiceAccount": { - "description": "User-managed service account to set on Dataproc when Cloud Data Fusion creates Dataproc to run data processing pipelines. This allows users to have fine-grained access control on Dataproc's accesses to cloud resources.", + "description": "Optional. User-managed service account to set on Dataproc when Cloud Data Fusion creates Dataproc to run data processing pipelines. This allows users to have fine-grained access control on Dataproc's accesses to cloud resources.", "type": "string" }, "description": { - "description": "A description of this instance.", + "description": "Optional. A description of this instance.", "type": "string" }, "disabledReason": { @@ -1091,28 +999,29 @@ "type": "array" }, "displayName": { - "description": "Display name for an instance.", + "description": "Optional. Display name for an instance.", "type": "string" }, "enableRbac": { - "description": "Option to enable granular role-based access control.", + "description": "Optional. Option to enable granular role-based access control.", "type": "boolean" }, "enableStackdriverLogging": { - "description": "Option to enable Stackdriver Logging.", + "description": "Optional. Option to enable Stackdriver Logging.", "type": "boolean" }, "enableStackdriverMonitoring": { - "description": "Option to enable Stackdriver Monitoring.", + "description": "Optional. Option to enable Stackdriver Monitoring.", "type": "boolean" }, "enableZoneSeparation": { - "description": "Option to enable granular zone separation.", + "description": "Output only. Option to enable granular zone separation.", + "readOnly": true, "type": "boolean" }, "eventPublishConfig": { "$ref": "EventPublishConfig", - "description": "Option to enable and pass metadata for event publishing." + "description": "Optional. Option to enable and pass metadata for event publishing." }, "gcsBucket": { "description": "Output only. Cloud Storage bucket generated by Data Fusion in the customer project.", @@ -1137,7 +1046,7 @@ }, "networkConfig": { "$ref": "NetworkConfig", - "description": "Network configuration options. These are required when a private Data Fusion instance is to be created." + "description": "Optional. Network configuration options. These are required when a private Data Fusion instance is to be created." }, "options": { "additionalProperties": { @@ -1156,7 +1065,7 @@ "type": "string" }, "privateInstance": { - "description": "Specifies whether the Data Fusion instance should be private. If set to true, all Data Fusion nodes will have private IP addresses and will not be able to access the public internet.", + "description": "Optional. Specifies whether the Data Fusion instance should be private. If set to true, all Data Fusion nodes will have private IP addresses and will not be able to access the public internet.", "type": "boolean" }, "satisfiesPzs": { @@ -1239,7 +1148,7 @@ "type": "string" }, "version": { - "description": "Current version of the Data Fusion. Only specifiable in Update.", + "description": "Optional. Current version of the Data Fusion. Only specifiable in Update.", "type": "string" }, "workforceIdentityServiceEndpoint": { @@ -1248,128 +1157,7 @@ "type": "string" }, "zone": { - "description": "Name of the zone in which the Data Fusion instance will be created. Only DEVELOPER instances use this field.", - "type": "string" - } - }, - "type": "object" - }, - "IsolationExpectations": { - "id": "IsolationExpectations", - "properties": { - "ziOrgPolicy": { - "enum": [ - "ZI_UNSPECIFIED", - "ZI_UNKNOWN", - "ZI_NOT_REQUIRED", - "ZI_PREFERRED", - "ZI_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "", - "" - ], - "type": "string" - }, - "ziRegionPolicy": { - "enum": [ - "ZI_REGION_POLICY_UNSPECIFIED", - "ZI_REGION_POLICY_UNKNOWN", - "ZI_REGION_POLICY_NOT_SET", - "ZI_REGION_POLICY_FAIL_OPEN", - "ZI_REGION_POLICY_FAIL_CLOSED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "", - "" - ], - "type": "string" - }, - "ziRegionState": { - "enum": [ - "ZI_REGION_UNSPECIFIED", - "ZI_REGION_UNKNOWN", - "ZI_REGION_NOT_ENABLED", - "ZI_REGION_ENABLED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "" - ], - "type": "string" - }, - "zoneIsolation": { - "deprecated": true, - "description": "Deprecated: use zi_org_policy, zi_region_policy and zi_region_state instead for setting ZI expectations as per go/zicy-publish-physical-location.", - "enum": [ - "ZI_UNSPECIFIED", - "ZI_UNKNOWN", - "ZI_NOT_REQUIRED", - "ZI_PREFERRED", - "ZI_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "", - "" - ], - "type": "string" - }, - "zoneSeparation": { - "deprecated": true, - "description": "Deprecated: use zs_org_policy, and zs_region_stateinstead for setting Zs expectations as per go/zicy-publish-physical-location.", - "enum": [ - "ZS_UNSPECIFIED", - "ZS_UNKNOWN", - "ZS_NOT_REQUIRED", - "ZS_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "" - ], - "type": "string" - }, - "zsOrgPolicy": { - "enum": [ - "ZS_UNSPECIFIED", - "ZS_UNKNOWN", - "ZS_NOT_REQUIRED", - "ZS_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "" - ], - "type": "string" - }, - "zsRegionState": { - "enum": [ - "ZS_REGION_UNSPECIFIED", - "ZS_REGION_UNKNOWN", - "ZS_REGION_NOT_ENABLED", - "ZS_REGION_ENABLED" - ], - "enumDescriptions": [ - "", - "To be used if tracking of the asset ZS-bit is not available", - "", - "" - ], + "description": "Optional. Name of the zone in which the Data Fusion instance will be created. Only DEVELOPER instances use this field.", "type": "string" } }, @@ -1380,7 +1168,8 @@ "id": "ListAvailableVersionsResponse", "properties": { "availableVersions": { - "description": "Represents a list of versions that are supported.", + "deprecated": true, + "description": "Represents a list of versions that are supported. Deprecated: Use versions field instead.", "items": { "$ref": "Version" }, @@ -1389,6 +1178,13 @@ "nextPageToken": { "description": "Token to retrieve the next page of results or empty if there are no more results in the list.", "type": "string" + }, + "versions": { + "description": "Represents a list of all versions.", + "items": { + "$ref": "Version" + }, + "type": "array" } }, "type": "object" @@ -1506,64 +1302,6 @@ }, "type": "object" }, - "LocationAssignment": { - "id": "LocationAssignment", - "properties": { - "location": { - "type": "string" - }, - "locationType": { - "enum": [ - "UNSPECIFIED", - "CLUSTER", - "POP", - "CLOUD_ZONE", - "CLOUD_REGION", - "MULTI_REGION_GEO", - "MULTI_REGION_JURISDICTION", - "GLOBAL", - "OTHER" - ], - "enumDescriptions": [ - "", - "1-10: Physical failure domains.", - "", - "11-20: Logical failure domains.", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "LocationData": { - "id": "LocationData", - "properties": { - "blobstoreLocation": { - "$ref": "BlobstoreLocation" - }, - "childAssetLocation": { - "$ref": "CloudAssetComposition" - }, - "directLocation": { - "$ref": "DirectLocationAssignment" - }, - "gcpProjectProxy": { - "$ref": "TenantProjectProxy" - }, - "placerLocation": { - "$ref": "PlacerLocation" - }, - "spannerLocation": { - "$ref": "SpannerLocation" - } - }, - "type": "object" - }, "MaintenancePolicy": { "description": "Maintenance policy of the instance.", "id": "MaintenancePolicy", @@ -1702,17 +1440,6 @@ }, "type": "object" }, - "PlacerLocation": { - "description": "Message describing that the location of the customer resource is tied to placer allocations", - "id": "PlacerLocation", - "properties": { - "placerConfig": { - "description": "Directory with a config related to it in placer (e.g. \"/placer/prod/home/my-root/my-dir\")", - "type": "string" - } - }, - "type": "object" - }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -1779,25 +1506,6 @@ }, "type": "object" }, - "RegionalMigDistributionPolicy": { - "description": "To be used for specifying the intended distribution of regional compute.googleapis.com/InstanceGroupManager instances", - "id": "RegionalMigDistributionPolicy", - "properties": { - "targetShape": { - "description": "The shape in which the group converges around distribution of resources. Instance of proto2 enum", - "format": "int32", - "type": "integer" - }, - "zones": { - "description": "Cloud zones used by regional MIG to create instances.", - "items": { - "$ref": "ZoneConfiguration" - }, - "type": "array" - } - }, - "type": "object" - }, "RestartInstanceRequest": { "description": "Request message for restarting a Data Fusion instance.", "id": "RestartInstanceRequest", @@ -1820,26 +1528,6 @@ }, "type": "object" }, - "SpannerLocation": { - "id": "SpannerLocation", - "properties": { - "backupName": { - "description": "Set of backups used by the resource with name in the same format as what is available at http://table/spanner_automon.backup_metadata", - "items": { - "type": "string" - }, - "type": "array" - }, - "dbName": { - "description": "Set of databases used by the resource in format /span//", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -1867,18 +1555,6 @@ }, "type": "object" }, - "TenantProjectProxy": { - "id": "TenantProjectProxy", - "properties": { - "projectNumbers": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", "id": "TestIamPermissionsRequest", @@ -1944,12 +1620,14 @@ "enum": [ "TYPE_UNSPECIFIED", "TYPE_PREVIEW", - "TYPE_GENERAL_AVAILABILITY" + "TYPE_GENERAL_AVAILABILITY", + "TYPE_DEPRECATED" ], "enumDescriptions": [ "Version does not have availability yet", "Version is under development and not considered stable", - "Version is available for public use" + "Version is available for public use", + "Version is no longer supported." ], "type": "string" }, @@ -1959,15 +1637,6 @@ } }, "type": "object" - }, - "ZoneConfiguration": { - "id": "ZoneConfiguration", - "properties": { - "zone": { - "type": "string" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/datafusion/v1/datafusion-gen.go b/datafusion/v1/datafusion-gen.go index 89f4181ff8f..1bb4fa770cd 100644 --- a/datafusion/v1/datafusion-gen.go +++ b/datafusion/v1/datafusion-gen.go @@ -266,38 +266,6 @@ func (s Accelerator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// AssetLocation: Provides the mapping of a cloud asset to a direct physical -// location or to a proxy that defines the location on its behalf. -type AssetLocation struct { - // Expected: Defines the customer expectation around ZI/ZS for this asset and - // ZI/ZS state of the region at the time of asset creation. - Expected *IsolationExpectations `json:"expected,omitempty"` - // ExtraParameters: Defines extra parameters required for specific asset types. - ExtraParameters []*ExtraParameter `json:"extraParameters,omitempty"` - // LocationData: Contains all kinds of physical location definitions for this - // asset. - LocationData []*LocationData `json:"locationData,omitempty"` - // ParentAsset: Defines parents assets if any in order to allow later - // generation of child_asset_location data via child assets. - ParentAsset []*CloudAsset `json:"parentAsset,omitempty"` - // ForceSendFields is a list of field names (e.g. "Expected") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Expected") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AssetLocation) MarshalJSON() ([]byte, error) { - type NoMethod AssetLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // AuditConfig: Specifies the audit configuration for a service. The // configuration determines which permission types are logged, and what // identities, if any, are exempted from logging. An AuditConfig must have one @@ -473,78 +441,15 @@ func (s Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// BlobstoreLocation: Policy ID that identified data placement in Blobstore as -// per go/blobstore-user-guide#data-metadata-placement-and-failure-domains -type BlobstoreLocation struct { - PolicyId []string `json:"policyId,omitempty"` - // ForceSendFields is a list of field names (e.g. "PolicyId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PolicyId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BlobstoreLocation) MarshalJSON() ([]byte, error) { - type NoMethod BlobstoreLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // CancelOperationRequest: The request message for Operations.CancelOperation. type CancelOperationRequest struct { } -type CloudAsset struct { - AssetName string `json:"assetName,omitempty"` - AssetType string `json:"assetType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AssetName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AssetName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CloudAsset) MarshalJSON() ([]byte, error) { - type NoMethod CloudAsset - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CloudAssetComposition struct { - ChildAsset []*CloudAsset `json:"childAsset,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChildAsset") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChildAsset") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CloudAssetComposition) MarshalJSON() ([]byte, error) { - type NoMethod CloudAssetComposition - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // CryptoKeyConfig: The crypto key configuration. This field is used by the // Customer-managed encryption keys (CMEK) feature. type CryptoKeyConfig struct { - // KeyReference: The name of the key which is used to encrypt/decrypt customer - // data. For key in Cloud KMS, the key should be in the format of + // KeyReference: Optional. The name of the key which is used to encrypt/decrypt + // customer data. For key in Cloud KMS, the key should be in the format of // `projects/*/locations/*/keyRings/*/cryptoKeys/*`. KeyReference string `json:"keyReference,omitempty"` // ForceSendFields is a list of field names (e.g. "KeyReference") to @@ -565,26 +470,6 @@ func (s CryptoKeyConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type DirectLocationAssignment struct { - Location []*LocationAssignment `json:"location,omitempty"` - // ForceSendFields is a list of field names (e.g. "Location") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Location") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DirectLocationAssignment) MarshalJSON() ([]byte, error) { - type NoMethod DirectLocationAssignment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // DnsPeering: DNS peering configuration. These configurations are used to // create DNS peering with the customer Cloud DNS. type DnsPeering struct { @@ -592,7 +477,7 @@ type DnsPeering struct { Description string `json:"description,omitempty"` // Domain: Required. The dns name suffix of the zone. Domain string `json:"domain,omitempty"` - // Name: Required. The resource name of the dns peering zone. Format: + // Name: Identifier. The resource name of the dns peering zone. Format: // projects/{project}/locations/{location}/instances/{instance}/dnsPeerings/{dns // _peering} Name string `json:"name,omitempty"` @@ -705,30 +590,6 @@ func (s Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ExtraParameter: Defines parameters that should only be used for specific -// asset types. -type ExtraParameter struct { - // RegionalMigDistributionPolicy: Details about zones used by regional - // compute.googleapis.com/InstanceGroupManager to create instances. - RegionalMigDistributionPolicy *RegionalMigDistributionPolicy `json:"regionalMigDistributionPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RegionalMigDistributionPolicy") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RegionalMigDistributionPolicy") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExtraParameter) MarshalJSON() ([]byte, error) { - type NoMethod ExtraParameter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // Instance: Represents a Data Fusion instance. type Instance struct { // Accelerators: Output only. List of accelerators enabled for this CDF @@ -741,18 +602,18 @@ type Instance struct { AvailableVersion []*Version `json:"availableVersion,omitempty"` // CreateTime: Output only. The time the instance was created. CreateTime string `json:"createTime,omitempty"` - // CryptoKeyConfig: The crypto key configuration. This field is used by the - // Customer-Managed Encryption Keys (CMEK) feature. + // CryptoKeyConfig: Optional. The crypto key configuration. This field is used + // by the Customer-Managed Encryption Keys (CMEK) feature. CryptoKeyConfig *CryptoKeyConfig `json:"cryptoKeyConfig,omitempty"` // DataplexDataLineageIntegrationEnabled: Optional. Option to enable the // Dataplex Lineage Integration feature. DataplexDataLineageIntegrationEnabled bool `json:"dataplexDataLineageIntegrationEnabled,omitempty"` - // DataprocServiceAccount: User-managed service account to set on Dataproc when - // Cloud Data Fusion creates Dataproc to run data processing pipelines. This - // allows users to have fine-grained access control on Dataproc's accesses to - // cloud resources. + // DataprocServiceAccount: Optional. User-managed service account to set on + // Dataproc when Cloud Data Fusion creates Dataproc to run data processing + // pipelines. This allows users to have fine-grained access control on + // Dataproc's accesses to cloud resources. DataprocServiceAccount string `json:"dataprocServiceAccount,omitempty"` - // Description: A description of this instance. + // Description: Optional. A description of this instance. Description string `json:"description,omitempty"` // DisabledReason: Output only. If the instance state is DISABLED, the reason // for disabling the instance. @@ -762,17 +623,20 @@ type Instance struct { // "KMS_KEY_ISSUE" - The KMS key used by the instance is either revoked or // denied access to DisabledReason []string `json:"disabledReason,omitempty"` - // DisplayName: Display name for an instance. + // DisplayName: Optional. Display name for an instance. DisplayName string `json:"displayName,omitempty"` - // EnableRbac: Option to enable granular role-based access control. + // EnableRbac: Optional. Option to enable granular role-based access control. EnableRbac bool `json:"enableRbac,omitempty"` - // EnableStackdriverLogging: Option to enable Stackdriver Logging. + // EnableStackdriverLogging: Optional. Option to enable Stackdriver Logging. EnableStackdriverLogging bool `json:"enableStackdriverLogging,omitempty"` - // EnableStackdriverMonitoring: Option to enable Stackdriver Monitoring. + // EnableStackdriverMonitoring: Optional. Option to enable Stackdriver + // Monitoring. EnableStackdriverMonitoring bool `json:"enableStackdriverMonitoring,omitempty"` - // EnableZoneSeparation: Option to enable granular zone separation. + // EnableZoneSeparation: Output only. Option to enable granular zone + // separation. EnableZoneSeparation bool `json:"enableZoneSeparation,omitempty"` - // EventPublishConfig: Option to enable and pass metadata for event publishing. + // EventPublishConfig: Optional. Option to enable and pass metadata for event + // publishing. EventPublishConfig *EventPublishConfig `json:"eventPublishConfig,omitempty"` // GcsBucket: Output only. Cloud Storage bucket generated by Data Fusion in the // customer project. @@ -787,8 +651,8 @@ type Instance struct { // Name: Output only. The name of this instance is in the form of // projects/{project}/locations/{location}/instances/{instance}. Name string `json:"name,omitempty"` - // NetworkConfig: Network configuration options. These are required when a - // private Data Fusion instance is to be created. + // NetworkConfig: Optional. Network configuration options. These are required + // when a private Data Fusion instance is to be created. NetworkConfig *NetworkConfig `json:"networkConfig,omitempty"` // Options: Map of additional options used to configure the behavior of Data // Fusion instance. @@ -797,8 +661,8 @@ type Instance struct { P4ServiceAccount string `json:"p4ServiceAccount,omitempty"` // PatchRevision: Optional. Current patch revision of the Data Fusion. PatchRevision string `json:"patchRevision,omitempty"` - // PrivateInstance: Specifies whether the Data Fusion instance should be - // private. If set to true, all Data Fusion nodes will have private IP + // PrivateInstance: Optional. Specifies whether the Data Fusion instance should + // be private. If set to true, all Data Fusion nodes will have private IP // addresses and will not be able to access the public internet. PrivateInstance bool `json:"privateInstance,omitempty"` // SatisfiesPzs: Output only. Reserved for future use. @@ -848,13 +712,14 @@ type Instance struct { Type string `json:"type,omitempty"` // UpdateTime: Output only. The time the instance was last updated. UpdateTime string `json:"updateTime,omitempty"` - // Version: Current version of the Data Fusion. Only specifiable in Update. + // Version: Optional. Current version of the Data Fusion. Only specifiable in + // Update. Version string `json:"version,omitempty"` // WorkforceIdentityServiceEndpoint: Output only. Endpoint on which the Data // Fusion UI is accessible to third-party users WorkforceIdentityServiceEndpoint string `json:"workforceIdentityServiceEndpoint,omitempty"` - // Zone: Name of the zone in which the Data Fusion instance will be created. - // Only DEVELOPER instances use this field. + // Zone: Optional. Name of the zone in which the Data Fusion instance will be + // created. Only DEVELOPER instances use this field. Zone string `json:"zone,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. @@ -877,86 +742,17 @@ func (s Instance) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type IsolationExpectations struct { - // Possible values: - // "ZI_UNSPECIFIED" - // "ZI_UNKNOWN" - To be used if tracking is not available - // "ZI_NOT_REQUIRED" - // "ZI_PREFERRED" - // "ZI_REQUIRED" - ZiOrgPolicy string `json:"ziOrgPolicy,omitempty"` - // Possible values: - // "ZI_REGION_POLICY_UNSPECIFIED" - // "ZI_REGION_POLICY_UNKNOWN" - To be used if tracking is not available - // "ZI_REGION_POLICY_NOT_SET" - // "ZI_REGION_POLICY_FAIL_OPEN" - // "ZI_REGION_POLICY_FAIL_CLOSED" - ZiRegionPolicy string `json:"ziRegionPolicy,omitempty"` - // Possible values: - // "ZI_REGION_UNSPECIFIED" - // "ZI_REGION_UNKNOWN" - To be used if tracking is not available - // "ZI_REGION_NOT_ENABLED" - // "ZI_REGION_ENABLED" - ZiRegionState string `json:"ziRegionState,omitempty"` - // ZoneIsolation: Deprecated: use zi_org_policy, zi_region_policy and - // zi_region_state instead for setting ZI expectations as per - // go/zicy-publish-physical-location. - // - // Possible values: - // "ZI_UNSPECIFIED" - // "ZI_UNKNOWN" - To be used if tracking is not available - // "ZI_NOT_REQUIRED" - // "ZI_PREFERRED" - // "ZI_REQUIRED" - ZoneIsolation string `json:"zoneIsolation,omitempty"` - // ZoneSeparation: Deprecated: use zs_org_policy, and zs_region_stateinstead - // for setting Zs expectations as per go/zicy-publish-physical-location. - // - // Possible values: - // "ZS_UNSPECIFIED" - // "ZS_UNKNOWN" - To be used if tracking is not available - // "ZS_NOT_REQUIRED" - // "ZS_REQUIRED" - ZoneSeparation string `json:"zoneSeparation,omitempty"` - // Possible values: - // "ZS_UNSPECIFIED" - // "ZS_UNKNOWN" - To be used if tracking is not available - // "ZS_NOT_REQUIRED" - // "ZS_REQUIRED" - ZsOrgPolicy string `json:"zsOrgPolicy,omitempty"` - // Possible values: - // "ZS_REGION_UNSPECIFIED" - // "ZS_REGION_UNKNOWN" - To be used if tracking of the asset ZS-bit is not - // available - // "ZS_REGION_NOT_ENABLED" - // "ZS_REGION_ENABLED" - ZsRegionState string `json:"zsRegionState,omitempty"` - // ForceSendFields is a list of field names (e.g. "ZiOrgPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ZiOrgPolicy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IsolationExpectations) MarshalJSON() ([]byte, error) { - type NoMethod IsolationExpectations - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // ListAvailableVersionsResponse: Response message for the list available // versions request. type ListAvailableVersionsResponse struct { // AvailableVersions: Represents a list of versions that are supported. + // Deprecated: Use versions field instead. AvailableVersions []*Version `json:"availableVersions,omitempty"` // NextPageToken: Token to retrieve the next page of results or empty if there // are no more results in the list. NextPageToken string `json:"nextPageToken,omitempty"` + // Versions: Represents a list of all versions. + Versions []*Version `json:"versions,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -1130,62 +926,6 @@ func (s Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type LocationAssignment struct { - Location string `json:"location,omitempty"` - // Possible values: - // "UNSPECIFIED" - // "CLUSTER" - 1-10: Physical failure domains. - // "POP" - // "CLOUD_ZONE" - 11-20: Logical failure domains. - // "CLOUD_REGION" - // "MULTI_REGION_GEO" - // "MULTI_REGION_JURISDICTION" - // "GLOBAL" - // "OTHER" - LocationType string `json:"locationType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Location") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Location") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocationAssignment) MarshalJSON() ([]byte, error) { - type NoMethod LocationAssignment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LocationData struct { - BlobstoreLocation *BlobstoreLocation `json:"blobstoreLocation,omitempty"` - ChildAssetLocation *CloudAssetComposition `json:"childAssetLocation,omitempty"` - DirectLocation *DirectLocationAssignment `json:"directLocation,omitempty"` - GcpProjectProxy *TenantProjectProxy `json:"gcpProjectProxy,omitempty"` - PlacerLocation *PlacerLocation `json:"placerLocation,omitempty"` - SpannerLocation *SpannerLocation `json:"spannerLocation,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlobstoreLocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlobstoreLocation") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocationData) MarshalJSON() ([]byte, error) { - type NoMethod LocationData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // MaintenancePolicy: Maintenance policy of the instance. type MaintenancePolicy struct { // MaintenanceExclusionWindow: Optional. The maintenance exclusion window of @@ -1380,30 +1120,6 @@ func (s OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PlacerLocation: Message describing that the location of the customer -// resource is tied to placer allocations -type PlacerLocation struct { - // PlacerConfig: Directory with a config related to it in placer (e.g. - // "/placer/prod/home/my-root/my-dir") - PlacerConfig string `json:"placerConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "PlacerConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PlacerConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PlacerLocation) MarshalJSON() ([]byte, error) { - type NoMethod PlacerLocation - return gensupport.MarshalJSON(NoMethod(s), 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 @@ -1572,33 +1288,6 @@ func (s RecurringTimeWindow) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// RegionalMigDistributionPolicy: To be used for specifying the intended -// distribution of regional compute.googleapis.com/InstanceGroupManager -// instances -type RegionalMigDistributionPolicy struct { - // TargetShape: The shape in which the group converges around distribution of - // resources. Instance of proto2 enum - TargetShape int64 `json:"targetShape,omitempty"` - // Zones: Cloud zones used by regional MIG to create instances. - Zones []*ZoneConfiguration `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetShape") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetShape") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionalMigDistributionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RegionalMigDistributionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // RestartInstanceRequest: Request message for restarting a Data Fusion // instance. type RestartInstanceRequest struct { @@ -1633,30 +1322,6 @@ func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type SpannerLocation struct { - // BackupName: Set of backups used by the resource with name in the same format - // as what is available at http://table/spanner_automon.backup_metadata - BackupName []string `json:"backupName,omitempty"` - // DbName: Set of databases used by the resource in format /span// - DbName []string `json:"dbName,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SpannerLocation) MarshalJSON() ([]byte, error) { - type NoMethod SpannerLocation - return gensupport.MarshalJSON(NoMethod(s), 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 @@ -1691,26 +1356,6 @@ func (s Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type TenantProjectProxy struct { - ProjectNumbers []string `json:"projectNumbers,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProjectNumbers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProjectNumbers") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TenantProjectProxy) MarshalJSON() ([]byte, error) { - type NoMethod TenantProjectProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // TestIamPermissionsRequest: Request message for `TestIamPermissions` method. type TestIamPermissionsRequest struct { // Permissions: The set of permissions to check for the `resource`. Permissions @@ -1807,6 +1452,7 @@ type Version struct { // "TYPE_UNSPECIFIED" - Version does not have availability yet // "TYPE_PREVIEW" - Version is under development and not considered stable // "TYPE_GENERAL_AVAILABILITY" - Version is available for public use + // "TYPE_DEPRECATED" - Version is no longer supported. Type string `json:"type,omitempty"` // VersionNumber: The version number of the Data Fusion instance, such as // '6.0.1.0'. @@ -1829,26 +1475,6 @@ func (s Version) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ZoneConfiguration struct { - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Zone") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Zone") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod ZoneConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - type ProjectsLocationsGetCall struct { s *Service name string @@ -3509,7 +3135,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/datafusion/v1beta1/datafusion-api.json b/datafusion/v1beta1/datafusion-api.json index bf5a2af337d..384af2ed910 100644 --- a/datafusion/v1beta1/datafusion-api.json +++ b/datafusion/v1beta1/datafusion-api.json @@ -760,7 +760,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "datafusion.projects.locations.operations.cancel", @@ -930,7 +930,7 @@ } } }, - "revision": "20240703", + "revision": "20241204", "rootUrl": "https://datafusion.googleapis.com/", "schemas": { "Accelerator": { @@ -975,38 +975,6 @@ }, "type": "object" }, - "AssetLocation": { - "description": "Provides the mapping of a cloud asset to a direct physical location or to a proxy that defines the location on its behalf.", - "id": "AssetLocation", - "properties": { - "expected": { - "$ref": "IsolationExpectations", - "description": "Defines the customer expectation around ZI/ZS for this asset and ZI/ZS state of the region at the time of asset creation." - }, - "extraParameters": { - "description": "Defines extra parameters required for specific asset types.", - "items": { - "$ref": "ExtraParameter" - }, - "type": "array" - }, - "locationData": { - "description": "Contains all kinds of physical location definitions for this asset.", - "items": { - "$ref": "LocationData" - }, - "type": "array" - }, - "parentAsset": { - "description": "Defines parents assets if any in order to allow later generation of child_asset_location data via child assets.", - "items": { - "$ref": "CloudAsset" - }, - "type": "array" - } - }, - "type": "object" - }, "AuditConfig": { "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", "id": "AuditConfig", @@ -1077,49 +1045,12 @@ }, "type": "object" }, - "BlobstoreLocation": { - "description": "Policy ID that identified data placement in Blobstore as per go/blobstore-user-guide#data-metadata-placement-and-failure-domains", - "id": "BlobstoreLocation", - "properties": { - "policyId": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "CancelOperationRequest": { "description": "The request message for Operations.CancelOperation.", "id": "CancelOperationRequest", "properties": {}, "type": "object" }, - "CloudAsset": { - "id": "CloudAsset", - "properties": { - "assetName": { - "type": "string" - }, - "assetType": { - "type": "string" - } - }, - "type": "object" - }, - "CloudAssetComposition": { - "id": "CloudAssetComposition", - "properties": { - "childAsset": { - "items": { - "$ref": "CloudAsset" - }, - "type": "array" - } - }, - "type": "object" - }, "CryptoKeyConfig": { "description": "The crypto key configuration. This field is used by the Customer-managed encryption keys (CMEK) feature.", "id": "CryptoKeyConfig", @@ -1131,18 +1062,6 @@ }, "type": "object" }, - "DirectLocationAssignment": { - "id": "DirectLocationAssignment", - "properties": { - "location": { - "items": { - "$ref": "LocationAssignment" - }, - "type": "array" - } - }, - "type": "object" - }, "DnsPeering": { "description": "DNS peering configuration. These configurations are used to create DNS peering with the customer Cloud DNS.", "id": "DnsPeering", @@ -1214,17 +1133,6 @@ }, "type": "object" }, - "ExtraParameter": { - "description": "Defines parameters that should only be used for specific asset types.", - "id": "ExtraParameter", - "properties": { - "regionalMigDistributionPolicy": { - "$ref": "RegionalMigDistributionPolicy", - "description": "Details about zones used by regional compute.googleapis.com/InstanceGroupManager to create instances." - } - }, - "type": "object" - }, "IAMPolicy": { "description": "IAMPolicy encapsulates the IAM policy name, definition and status of policy fetching.", "id": "IAMPolicy", @@ -1467,133 +1375,13 @@ }, "type": "object" }, - "IsolationExpectations": { - "id": "IsolationExpectations", - "properties": { - "ziOrgPolicy": { - "enum": [ - "ZI_UNSPECIFIED", - "ZI_UNKNOWN", - "ZI_NOT_REQUIRED", - "ZI_PREFERRED", - "ZI_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "", - "" - ], - "type": "string" - }, - "ziRegionPolicy": { - "enum": [ - "ZI_REGION_POLICY_UNSPECIFIED", - "ZI_REGION_POLICY_UNKNOWN", - "ZI_REGION_POLICY_NOT_SET", - "ZI_REGION_POLICY_FAIL_OPEN", - "ZI_REGION_POLICY_FAIL_CLOSED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "", - "" - ], - "type": "string" - }, - "ziRegionState": { - "enum": [ - "ZI_REGION_UNSPECIFIED", - "ZI_REGION_UNKNOWN", - "ZI_REGION_NOT_ENABLED", - "ZI_REGION_ENABLED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "" - ], - "type": "string" - }, - "zoneIsolation": { - "deprecated": true, - "description": "Deprecated: use zi_org_policy, zi_region_policy and zi_region_state instead for setting ZI expectations as per go/zicy-publish-physical-location.", - "enum": [ - "ZI_UNSPECIFIED", - "ZI_UNKNOWN", - "ZI_NOT_REQUIRED", - "ZI_PREFERRED", - "ZI_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "", - "" - ], - "type": "string" - }, - "zoneSeparation": { - "deprecated": true, - "description": "Deprecated: use zs_org_policy, and zs_region_stateinstead for setting Zs expectations as per go/zicy-publish-physical-location.", - "enum": [ - "ZS_UNSPECIFIED", - "ZS_UNKNOWN", - "ZS_NOT_REQUIRED", - "ZS_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "" - ], - "type": "string" - }, - "zsOrgPolicy": { - "enum": [ - "ZS_UNSPECIFIED", - "ZS_UNKNOWN", - "ZS_NOT_REQUIRED", - "ZS_REQUIRED" - ], - "enumDescriptions": [ - "", - "To be used if tracking is not available", - "", - "" - ], - "type": "string" - }, - "zsRegionState": { - "enum": [ - "ZS_REGION_UNSPECIFIED", - "ZS_REGION_UNKNOWN", - "ZS_REGION_NOT_ENABLED", - "ZS_REGION_ENABLED" - ], - "enumDescriptions": [ - "", - "To be used if tracking of the asset ZS-bit is not available", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, "ListAvailableVersionsResponse": { "description": "Response message for the list available versions request.", "id": "ListAvailableVersionsResponse", "properties": { "availableVersions": { - "description": "Represents a list of versions that are supported.", + "deprecated": true, + "description": "Represents a list of versions that are supported. Deprecated: Use versions field instead.", "items": { "$ref": "Version" }, @@ -1602,6 +1390,13 @@ "nextPageToken": { "description": "Token to retrieve the next page of results or empty if there are no more results in the list.", "type": "string" + }, + "versions": { + "description": "Represents a list of all versions.", + "items": { + "$ref": "Version" + }, + "type": "array" } }, "type": "object" @@ -1737,64 +1532,6 @@ }, "type": "object" }, - "LocationAssignment": { - "id": "LocationAssignment", - "properties": { - "location": { - "type": "string" - }, - "locationType": { - "enum": [ - "UNSPECIFIED", - "CLUSTER", - "POP", - "CLOUD_ZONE", - "CLOUD_REGION", - "MULTI_REGION_GEO", - "MULTI_REGION_JURISDICTION", - "GLOBAL", - "OTHER" - ], - "enumDescriptions": [ - "", - "1-10: Physical failure domains.", - "", - "11-20: Logical failure domains.", - "", - "", - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "LocationData": { - "id": "LocationData", - "properties": { - "blobstoreLocation": { - "$ref": "BlobstoreLocation" - }, - "childAssetLocation": { - "$ref": "CloudAssetComposition" - }, - "directLocation": { - "$ref": "DirectLocationAssignment" - }, - "gcpProjectProxy": { - "$ref": "TenantProjectProxy" - }, - "placerLocation": { - "$ref": "PlacerLocation" - }, - "spannerLocation": { - "$ref": "SpannerLocation" - } - }, - "type": "object" - }, "MaintenancePolicy": { "description": "Maintenance policy of the instance.", "id": "MaintenancePolicy", @@ -1948,17 +1685,6 @@ }, "type": "object" }, - "PlacerLocation": { - "description": "Message describing that the location of the customer resource is tied to placer allocations", - "id": "PlacerLocation", - "properties": { - "placerConfig": { - "description": "Directory with a config related to it in placer (e.g. \"/placer/prod/home/my-root/my-dir\")", - "type": "string" - } - }, - "type": "object" - }, "Policy": { "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", "id": "Policy", @@ -2025,25 +1751,6 @@ }, "type": "object" }, - "RegionalMigDistributionPolicy": { - "description": "To be used for specifying the intended distribution of regional compute.googleapis.com/InstanceGroupManager instances", - "id": "RegionalMigDistributionPolicy", - "properties": { - "targetShape": { - "description": "The shape in which the group converges around distribution of resources. Instance of proto2 enum", - "format": "int32", - "type": "integer" - }, - "zones": { - "description": "Cloud zones used by regional MIG to create instances.", - "items": { - "$ref": "ZoneConfiguration" - }, - "type": "array" - } - }, - "type": "object" - }, "RemoveIamPolicyRequest": { "description": "Request message for RemoveIamPolicy method.", "id": "RemoveIamPolicyRequest", @@ -2078,26 +1785,6 @@ }, "type": "object" }, - "SpannerLocation": { - "id": "SpannerLocation", - "properties": { - "backupName": { - "description": "Set of backups used by the resource with name in the same format as what is available at http://table/spanner_automon.backup_metadata", - "items": { - "type": "string" - }, - "type": "array" - }, - "dbName": { - "description": "Set of databases used by the resource in format /span//", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "Status": { "description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", "id": "Status", @@ -2125,18 +1812,6 @@ }, "type": "object" }, - "TenantProjectProxy": { - "id": "TenantProjectProxy", - "properties": { - "projectNumbers": { - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, "TestIamPermissionsRequest": { "description": "Request message for `TestIamPermissions` method.", "id": "TestIamPermissionsRequest", @@ -2208,12 +1883,14 @@ "enum": [ "TYPE_UNSPECIFIED", "TYPE_PREVIEW", - "TYPE_GENERAL_AVAILABILITY" + "TYPE_GENERAL_AVAILABILITY", + "TYPE_DEPRECATED" ], "enumDescriptions": [ "Version does not have availability yet", "Version is under development and not considered stable", - "Version is available for public use Version is under development and not considered stable" + "Version is available for public use", + "Version is no longer supported." ], "type": "string" }, @@ -2223,15 +1900,6 @@ } }, "type": "object" - }, - "ZoneConfiguration": { - "id": "ZoneConfiguration", - "properties": { - "zone": { - "type": "string" - } - }, - "type": "object" } }, "servicePath": "", diff --git a/datafusion/v1beta1/datafusion-gen.go b/datafusion/v1beta1/datafusion-gen.go index 35c05a8fa39..94e2550a1cc 100644 --- a/datafusion/v1beta1/datafusion-gen.go +++ b/datafusion/v1beta1/datafusion-gen.go @@ -278,38 +278,6 @@ func (s Accelerator) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// AssetLocation: Provides the mapping of a cloud asset to a direct physical -// location or to a proxy that defines the location on its behalf. -type AssetLocation struct { - // Expected: Defines the customer expectation around ZI/ZS for this asset and - // ZI/ZS state of the region at the time of asset creation. - Expected *IsolationExpectations `json:"expected,omitempty"` - // ExtraParameters: Defines extra parameters required for specific asset types. - ExtraParameters []*ExtraParameter `json:"extraParameters,omitempty"` - // LocationData: Contains all kinds of physical location definitions for this - // asset. - LocationData []*LocationData `json:"locationData,omitempty"` - // ParentAsset: Defines parents assets if any in order to allow later - // generation of child_asset_location data via child assets. - ParentAsset []*CloudAsset `json:"parentAsset,omitempty"` - // ForceSendFields is a list of field names (e.g. "Expected") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Expected") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s AssetLocation) MarshalJSON() ([]byte, error) { - type NoMethod AssetLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // AuditConfig: Specifies the audit configuration for a service. The // configuration determines which permission types are logged, and what // identities, if any, are exempted from logging. An AuditConfig must have one @@ -485,73 +453,10 @@ func (s Binding) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// BlobstoreLocation: Policy ID that identified data placement in Blobstore as -// per go/blobstore-user-guide#data-metadata-placement-and-failure-domains -type BlobstoreLocation struct { - PolicyId []string `json:"policyId,omitempty"` - // ForceSendFields is a list of field names (e.g. "PolicyId") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PolicyId") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s BlobstoreLocation) MarshalJSON() ([]byte, error) { - type NoMethod BlobstoreLocation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // CancelOperationRequest: The request message for Operations.CancelOperation. type CancelOperationRequest struct { } -type CloudAsset struct { - AssetName string `json:"assetName,omitempty"` - AssetType string `json:"assetType,omitempty"` - // ForceSendFields is a list of field names (e.g. "AssetName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AssetName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CloudAsset) MarshalJSON() ([]byte, error) { - type NoMethod CloudAsset - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type CloudAssetComposition struct { - ChildAsset []*CloudAsset `json:"childAsset,omitempty"` - // ForceSendFields is a list of field names (e.g. "ChildAsset") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ChildAsset") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s CloudAssetComposition) MarshalJSON() ([]byte, error) { - type NoMethod CloudAssetComposition - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // CryptoKeyConfig: The crypto key configuration. This field is used by the // Customer-managed encryption keys (CMEK) feature. type CryptoKeyConfig struct { @@ -577,26 +482,6 @@ func (s CryptoKeyConfig) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type DirectLocationAssignment struct { - Location []*LocationAssignment `json:"location,omitempty"` - // ForceSendFields is a list of field names (e.g. "Location") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Location") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DirectLocationAssignment) MarshalJSON() ([]byte, error) { - type NoMethod DirectLocationAssignment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // DnsPeering: DNS peering configuration. These configurations are used to // create DNS peering with the customer Cloud DNS. type DnsPeering struct { @@ -717,30 +602,6 @@ func (s Expr) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// ExtraParameter: Defines parameters that should only be used for specific -// asset types. -type ExtraParameter struct { - // RegionalMigDistributionPolicy: Details about zones used by regional - // compute.googleapis.com/InstanceGroupManager to create instances. - RegionalMigDistributionPolicy *RegionalMigDistributionPolicy `json:"regionalMigDistributionPolicy,omitempty"` - // ForceSendFields is a list of field names (e.g. - // "RegionalMigDistributionPolicy") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RegionalMigDistributionPolicy") - // to include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ExtraParameter) MarshalJSON() ([]byte, error) { - type NoMethod ExtraParameter - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // IAMPolicy: IAMPolicy encapsulates the IAM policy name, definition and status // of policy fetching. type IAMPolicy struct { @@ -914,86 +775,17 @@ func (s Instance) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type IsolationExpectations struct { - // Possible values: - // "ZI_UNSPECIFIED" - // "ZI_UNKNOWN" - To be used if tracking is not available - // "ZI_NOT_REQUIRED" - // "ZI_PREFERRED" - // "ZI_REQUIRED" - ZiOrgPolicy string `json:"ziOrgPolicy,omitempty"` - // Possible values: - // "ZI_REGION_POLICY_UNSPECIFIED" - // "ZI_REGION_POLICY_UNKNOWN" - To be used if tracking is not available - // "ZI_REGION_POLICY_NOT_SET" - // "ZI_REGION_POLICY_FAIL_OPEN" - // "ZI_REGION_POLICY_FAIL_CLOSED" - ZiRegionPolicy string `json:"ziRegionPolicy,omitempty"` - // Possible values: - // "ZI_REGION_UNSPECIFIED" - // "ZI_REGION_UNKNOWN" - To be used if tracking is not available - // "ZI_REGION_NOT_ENABLED" - // "ZI_REGION_ENABLED" - ZiRegionState string `json:"ziRegionState,omitempty"` - // ZoneIsolation: Deprecated: use zi_org_policy, zi_region_policy and - // zi_region_state instead for setting ZI expectations as per - // go/zicy-publish-physical-location. - // - // Possible values: - // "ZI_UNSPECIFIED" - // "ZI_UNKNOWN" - To be used if tracking is not available - // "ZI_NOT_REQUIRED" - // "ZI_PREFERRED" - // "ZI_REQUIRED" - ZoneIsolation string `json:"zoneIsolation,omitempty"` - // ZoneSeparation: Deprecated: use zs_org_policy, and zs_region_stateinstead - // for setting Zs expectations as per go/zicy-publish-physical-location. - // - // Possible values: - // "ZS_UNSPECIFIED" - // "ZS_UNKNOWN" - To be used if tracking is not available - // "ZS_NOT_REQUIRED" - // "ZS_REQUIRED" - ZoneSeparation string `json:"zoneSeparation,omitempty"` - // Possible values: - // "ZS_UNSPECIFIED" - // "ZS_UNKNOWN" - To be used if tracking is not available - // "ZS_NOT_REQUIRED" - // "ZS_REQUIRED" - ZsOrgPolicy string `json:"zsOrgPolicy,omitempty"` - // Possible values: - // "ZS_REGION_UNSPECIFIED" - // "ZS_REGION_UNKNOWN" - To be used if tracking of the asset ZS-bit is not - // available - // "ZS_REGION_NOT_ENABLED" - // "ZS_REGION_ENABLED" - ZsRegionState string `json:"zsRegionState,omitempty"` - // ForceSendFields is a list of field names (e.g. "ZiOrgPolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ZiOrgPolicy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s IsolationExpectations) MarshalJSON() ([]byte, error) { - type NoMethod IsolationExpectations - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // ListAvailableVersionsResponse: Response message for the list available // versions request. type ListAvailableVersionsResponse struct { // AvailableVersions: Represents a list of versions that are supported. + // Deprecated: Use versions field instead. AvailableVersions []*Version `json:"availableVersions,omitempty"` // NextPageToken: Token to retrieve the next page of results or empty if there // are no more results in the list. NextPageToken string `json:"nextPageToken,omitempty"` + // Versions: Represents a list of all versions. + Versions []*Version `json:"versions,omitempty"` // ServerResponse contains the HTTP response code and headers from the server. googleapi.ServerResponse `json:"-"` @@ -1195,62 +987,6 @@ func (s Location) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type LocationAssignment struct { - Location string `json:"location,omitempty"` - // Possible values: - // "UNSPECIFIED" - // "CLUSTER" - 1-10: Physical failure domains. - // "POP" - // "CLOUD_ZONE" - 11-20: Logical failure domains. - // "CLOUD_REGION" - // "MULTI_REGION_GEO" - // "MULTI_REGION_JURISDICTION" - // "GLOBAL" - // "OTHER" - LocationType string `json:"locationType,omitempty"` - // ForceSendFields is a list of field names (e.g. "Location") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Location") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocationAssignment) MarshalJSON() ([]byte, error) { - type NoMethod LocationAssignment - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type LocationData struct { - BlobstoreLocation *BlobstoreLocation `json:"blobstoreLocation,omitempty"` - ChildAssetLocation *CloudAssetComposition `json:"childAssetLocation,omitempty"` - DirectLocation *DirectLocationAssignment `json:"directLocation,omitempty"` - GcpProjectProxy *TenantProjectProxy `json:"gcpProjectProxy,omitempty"` - PlacerLocation *PlacerLocation `json:"placerLocation,omitempty"` - SpannerLocation *SpannerLocation `json:"spannerLocation,omitempty"` - // ForceSendFields is a list of field names (e.g. "BlobstoreLocation") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BlobstoreLocation") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s LocationData) MarshalJSON() ([]byte, error) { - type NoMethod LocationData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // MaintenancePolicy: Maintenance policy of the instance. type MaintenancePolicy struct { // MaintenanceExclusionWindow: Optional. The maintenance exclusion window of @@ -1469,30 +1205,6 @@ func (s OperationMetadata) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// PlacerLocation: Message describing that the location of the customer -// resource is tied to placer allocations -type PlacerLocation struct { - // PlacerConfig: Directory with a config related to it in placer (e.g. - // "/placer/prod/home/my-root/my-dir") - PlacerConfig string `json:"placerConfig,omitempty"` - // ForceSendFields is a list of field names (e.g. "PlacerConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "PlacerConfig") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PlacerLocation) MarshalJSON() ([]byte, error) { - type NoMethod PlacerLocation - return gensupport.MarshalJSON(NoMethod(s), 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 @@ -1661,33 +1373,6 @@ func (s RecurringTimeWindow) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -// RegionalMigDistributionPolicy: To be used for specifying the intended -// distribution of regional compute.googleapis.com/InstanceGroupManager -// instances -type RegionalMigDistributionPolicy struct { - // TargetShape: The shape in which the group converges around distribution of - // resources. Instance of proto2 enum - TargetShape int64 `json:"targetShape,omitempty"` - // Zones: Cloud zones used by regional MIG to create instances. - Zones []*ZoneConfiguration `json:"zones,omitempty"` - // ForceSendFields is a list of field names (e.g. "TargetShape") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "TargetShape") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RegionalMigDistributionPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RegionalMigDistributionPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // RemoveIamPolicyRequest: Request message for RemoveIamPolicy method. type RemoveIamPolicyRequest struct { } @@ -1732,30 +1417,6 @@ func (s SetIamPolicyRequest) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type SpannerLocation struct { - // BackupName: Set of backups used by the resource with name in the same format - // as what is available at http://table/spanner_automon.backup_metadata - BackupName []string `json:"backupName,omitempty"` - // DbName: Set of databases used by the resource in format /span// - DbName []string `json:"dbName,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s SpannerLocation) MarshalJSON() ([]byte, error) { - type NoMethod SpannerLocation - return gensupport.MarshalJSON(NoMethod(s), 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 @@ -1790,26 +1451,6 @@ func (s Status) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type TenantProjectProxy struct { - ProjectNumbers []string `json:"projectNumbers,omitempty"` - // ForceSendFields is a list of field names (e.g. "ProjectNumbers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ProjectNumbers") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s TenantProjectProxy) MarshalJSON() ([]byte, error) { - type NoMethod TenantProjectProxy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - // TestIamPermissionsRequest: Request message for `TestIamPermissions` method. type TestIamPermissionsRequest struct { // Permissions: The set of permissions to check for the `resource`. Permissions @@ -1908,8 +1549,8 @@ type Version struct { // Possible values: // "TYPE_UNSPECIFIED" - Version does not have availability yet // "TYPE_PREVIEW" - Version is under development and not considered stable - // "TYPE_GENERAL_AVAILABILITY" - Version is available for public use Version - // is under development and not considered stable + // "TYPE_GENERAL_AVAILABILITY" - Version is available for public use + // "TYPE_DEPRECATED" - Version is no longer supported. Type string `json:"type,omitempty"` // VersionNumber: The version number of the Data Fusion instance, such as // '6.0.1.0'. @@ -1932,26 +1573,6 @@ func (s Version) MarshalJSON() ([]byte, error) { return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) } -type ZoneConfiguration struct { - Zone string `json:"zone,omitempty"` - // ForceSendFields is a list of field names (e.g. "Zone") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Zone") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ZoneConfiguration) MarshalJSON() ([]byte, error) { - type NoMethod ZoneConfiguration - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - type ProjectsLocationsGetCall struct { s *Service name string @@ -4323,7 +3944,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/datamigration/v1beta1/datamigration-api.json b/datamigration/v1beta1/datamigration-api.json index 59241a192bf..4d4035923ce 100644 --- a/datamigration/v1beta1/datamigration-api.json +++ b/datamigration/v1beta1/datamigration-api.json @@ -924,7 +924,7 @@ "operations": { "methods": { "cancel": { - "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.", "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", "httpMethod": "POST", "id": "datamigration.projects.locations.operations.cancel", @@ -1049,7 +1049,7 @@ } } }, - "revision": "20240221", + "revision": "20241202", "rootUrl": "https://datamigration.googleapis.com/", "schemas": { "AuditConfig": { diff --git a/datamigration/v1beta1/datamigration-gen.go b/datamigration/v1beta1/datamigration-gen.go index 2fa70a815e6..d82f9ac92a8 100644 --- a/datamigration/v1beta1/datamigration-gen.go +++ b/datamigration/v1beta1/datamigration-gen.go @@ -4576,7 +4576,7 @@ type ProjectsLocationsOperationsCancelCall struct { // other methods to check whether the cancellation succeeded or whether the // operation completed despite cancellation. On successful cancellation, the // operation is not deleted; instead, it becomes an operation with an -// Operation.error value with a google.rpc.Status.code of 1, corresponding to +// Operation.error value with a google.rpc.Status.code of `1`, corresponding to // `Code.CANCELLED`. // // - name: The name of the operation resource to be cancelled. diff --git a/digitalassetlinks/v1/digitalassetlinks-api.json b/digitalassetlinks/v1/digitalassetlinks-api.json index e85ffb0b852..110bcf6e024 100644 --- a/digitalassetlinks/v1/digitalassetlinks-api.json +++ b/digitalassetlinks/v1/digitalassetlinks-api.json @@ -5,6 +5,7 @@ "description": "Discovers relationships between online assets such as websites or mobile apps.", "discoveryVersion": "v1", "documentationLink": "https://developers.google.com/digital-asset-links/", + "fullyEncodeReservedExpansion": true, "icons": { "x16": "http://www.google.com/images/icons/product/search-16.gif", "x32": "http://www.google.com/images/icons/product/search-32.gif" @@ -184,7 +185,7 @@ } } }, - "revision": "20241112", + "revision": "20241207", "rootUrl": "https://digitalassetlinks.googleapis.com/", "schemas": { "AndroidAppAsset": { diff --git a/go.work.sum b/go.work.sum index 90fb670f624..2cb8b145971 100644 --- a/go.work.sum +++ b/go.work.sum @@ -730,6 +730,7 @@ golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/term v0.25.0/go.mod h1:RPyXicDX+6vLxogjjRxjgD2TKtmAO6NZBsBRfrOLu7M= golang.org/x/term v0.26.0/go.mod h1:Si5m1o57C5nBNQo5z1iq+XDijt21BDBDp2bK0QI8e3E= +golang.org/x/term v0.27.0/go.mod h1:iMsnZpn0cago0GOrHO2+Y7u7JPn5AylBrcoWkElMTSM= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= From 73ee8335a64ec37710e41c1ae67a7b3695726996 Mon Sep 17 00:00:00 2001 From: Cody Oss <6331106+codyoss@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:32:26 -0600 Subject: [PATCH 09/11] chore: bump auth dep (#2907) This notably also drops opencensus from our indirect deps! Updates: #2559 --- go.mod | 4 +-- go.sum | 97 ++--------------------------------------------------- go.work.sum | 13 +++++++ 3 files changed, 16 insertions(+), 98 deletions(-) diff --git a/go.mod b/go.mod index 7af3d205953..ac892ecc836 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( cloud.google.com/go v0.116.0 - cloud.google.com/go/auth v0.12.0 + cloud.google.com/go/auth v0.12.1 cloud.google.com/go/auth/oauth2adapt v0.2.6 cloud.google.com/go/compute/metadata v0.5.2 github.com/google/go-cmp v0.6.0 @@ -29,8 +29,6 @@ require ( github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect - github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/otel v1.29.0 // indirect go.opentelemetry.io/otel/metric v1.29.0 // indirect go.opentelemetry.io/otel/trace v1.29.0 // indirect diff --git a/go.sum b/go.sum index 3c182db2203..b1fdff21a92 100644 --- a/go.sum +++ b/go.sum @@ -1,23 +1,13 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= -cloud.google.com/go/auth v0.12.0 h1:ARAD8r0lkiHw2go7kEnmviF6TOYhzLM+yDGcDt9mP68= -cloud.google.com/go/auth v0.12.0/go.mod h1:xxA5AqpDrvS+Gkmo9RqrGGRh6WSNKKOXhY3zNOr38tI= +cloud.google.com/go/auth v0.12.1 h1:n2Bj25BUMM0nvE9D2XLTiImanwZhO3DkfWSYS/SAJP4= +cloud.google.com/go/auth v0.12.1/go.mod h1:BFMu+TNpF3DmvfBO9ClqTR/SiqVIm7LukKF9mbendF4= cloud.google.com/go/auth/oauth2adapt v0.2.6 h1:V6a6XDu2lTwPZWOawrAa9HUK+DB2zfJyTuciBG5hFkU= cloud.google.com/go/auth/oauth2adapt v0.2.6/go.mod h1:AlmsELtlEBnaNTL7jCj8VQFLy6mbZv0s4Q7NGBeQ5E8= cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -25,33 +15,10 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/s2a-go v0.1.8 h1:zZDs9gcbt9ZPLV0ndSyQk6Kacx2g/X+SKYovpnz3SMM= github.com/google/s2a-go v0.1.8/go.mod h1:6iNWHTpQ+nfNRN5E00MSdfDwVesa8hhS32PhPO8deJA= -github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.4 h1:XYIDZApgAnrN1c855gTgghdIA6Stxb52D5RnLI1SLyw= @@ -60,17 +27,8 @@ github.com/googleapis/gax-go/v2 v2.14.0 h1:f+jMrjBPl+DL9nI4IQzLUxMq7XrAqFYB7hBPq github.com/googleapis/gax-go/v2 v2.14.0/go.mod h1:lhBCnjdLrWRaPvLWhmc8IS24m9mr07qSYnHncrgo+zk= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= @@ -81,53 +39,20 @@ go.opentelemetry.io/otel/metric v1.29.0 h1:vPf/HFWTNkPu1aYeIsc98l4ktOQaL6LeSoeV2 go.opentelemetry.io/otel/metric v1.29.0/go.mod h1:auu/QWieFVWx+DmQOUMgj0F8LHWdgalxXqvp7BII/W8= go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4= go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY= golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.32.0 h1:ZqPmj8Kzc+Y6e0+skZsuACbx+wzMgo5MQsJh9Qd6aYI= golang.org/x/net v0.32.0/go.mod h1:CwU0IoeOlnQQWJ6ioyFrfRuomB8GKF6KbYXZVyeXNfs= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE= golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA= golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20241206012308-a4fef0638583 h1:pjPnE7Rv3PAwHISLRJhA3HQTnM2uu5qcnroxTkRb5G8= google.golang.org/genproto v0.0.0-20241206012308-a4fef0638583/go.mod h1:dW27OyXi0Ph+N43jeCWMFC86aTT5VgdeQtOSf0Hehdw= google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 h1:pgr/4QbFyktUv9CtQ/Fq4gzEE6/Xs7iCXbktaGzLHbQ= @@ -136,27 +61,9 @@ google.golang.org/genproto/googleapis/bytestream v0.0.0-20241206012308-a4fef0638 google.golang.org/genproto/googleapis/bytestream v0.0.0-20241206012308-a4fef0638583/go.mod h1:qUsLYwbwz5ostUWtuFuXPlHmSJodC5NI/88ZlHj4M1o= google.golang.org/genproto/googleapis/rpc v0.0.0-20241206012308-a4fef0638583 h1:IfdSdTcLFy4lqUQrQJLkLt1PB+AsqVz6lwkWPzWEz10= google.golang.org/genproto/googleapis/rpc v0.0.0-20241206012308-a4fef0638583/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/go.work.sum b/go.work.sum index 2cb8b145971..9b2524f3964 100644 --- a/go.work.sum +++ b/go.work.sum @@ -154,6 +154,7 @@ cloud.google.com/go/contactcenterinsights v1.13.6/go.mod h1:mL+DbN3pMQGaAbDC4wZh cloud.google.com/go/contactcenterinsights v1.14.0/go.mod h1:APmWYHDN4sASnUBnXs4o68t1EUfnqadA53//CzXZ1xE= cloud.google.com/go/contactcenterinsights v1.15.0/go.mod h1:6bJGBQrJsnATv2s6Dh/c6HCRanq2kCZ0kIIjRV1G0mI= cloud.google.com/go/contactcenterinsights v1.15.1/go.mod h1:cFGxDVm/OwEVAHbU9UO4xQCtQFn0RZSrSUcF/oJ0Bbs= +cloud.google.com/go/contactcenterinsights v1.16.0/go.mod h1:cFGxDVm/OwEVAHbU9UO4xQCtQFn0RZSrSUcF/oJ0Bbs= cloud.google.com/go/container v1.31.0/go.mod h1:7yABn5s3Iv3lmw7oMmyGbeV6tQj86njcTijkkGuvdZA= cloud.google.com/go/container v1.38.0/go.mod h1:U0uPBvkVWOJGY/0qTVuPS7NeafFEUsHSPqT5pB8+fCY= cloud.google.com/go/container v1.39.0/go.mod h1:gNgnvs1cRHXjYxrotVm+0nxDfZkqzBbXCffh5WtqieI= @@ -171,6 +172,7 @@ cloud.google.com/go/datacatalog v1.22.0/go.mod h1:4Wff6GphTY6guF5WphrD76jOdfBifl cloud.google.com/go/datacatalog v1.22.1/go.mod h1:MscnJl9B2lpYlFoxRjicw19kFTwEke8ReKL5Y/6TWg8= cloud.google.com/go/datacatalog v1.22.2/go.mod h1:9Wamq8TDfL2680Sav7q3zEhBJSPBrDxJU8WtPJ25dBM= cloud.google.com/go/datacatalog v1.23.0/go.mod h1:9Wamq8TDfL2680Sav7q3zEhBJSPBrDxJU8WtPJ25dBM= +cloud.google.com/go/datacatalog v1.24.0/go.mod h1:9Wamq8TDfL2680Sav7q3zEhBJSPBrDxJU8WtPJ25dBM= cloud.google.com/go/dataflow v0.9.5/go.mod h1:udl6oi8pfUHnL0z6UN9Lf9chGqzDMVqcYTcZ1aPnCZQ= cloud.google.com/go/dataflow v0.9.11/go.mod h1:CCLufd7I4pPfyp54qMgil/volrL2ZKYjXeYLfQmBGJs= cloud.google.com/go/dataflow v0.10.0/go.mod h1:zAv3YUNe/2pXWKDSPvbf31mCIUuJa+IHtKmhfzaeGww= @@ -196,6 +198,7 @@ cloud.google.com/go/dataplex v1.18.2/go.mod h1:NuBpJJMGGQn2xctX+foHEDKRbizwuiHJa cloud.google.com/go/dataplex v1.19.0/go.mod h1:5H9ftGuZWMtoEIUpTdGUtGgje36YGmtRXoC8wx6QSUc= cloud.google.com/go/dataplex v1.19.1/go.mod h1:WzoQ+vcxrAyM0cjJWmluEDVsg7W88IXXCfuy01BslKE= cloud.google.com/go/dataplex v1.19.2/go.mod h1:vsxxdF5dgk3hX8Ens9m2/pMNhQZklUhSgqTghZtF1v4= +cloud.google.com/go/dataplex v1.20.0/go.mod h1:vsxxdF5dgk3hX8Ens9m2/pMNhQZklUhSgqTghZtF1v4= cloud.google.com/go/dataproc/v2 v2.4.0/go.mod h1:3B1Ht2aRB8VZIteGxQS/iNSJGzt9+CA0WGnDVMEm7Z4= cloud.google.com/go/dataproc/v2 v2.5.3/go.mod h1:RgA5QR7v++3xfP7DlgY3DUmoDSTaaemPe0ayKrQfyeg= cloud.google.com/go/dataproc/v2 v2.6.0/go.mod h1:amsKInI+TU4GcXnz+gmmApYbiYM4Fw051SIMDoWCWeE= @@ -215,18 +218,21 @@ cloud.google.com/go/datastream v1.10.10/go.mod h1:NqchuNjhPlISvWbk426/AU/S+Kgv7s cloud.google.com/go/datastream v1.11.0/go.mod h1:vio/5TQ0qNtGcIj7sFb0gucFoqZW19gZ7HztYtkzq9g= cloud.google.com/go/datastream v1.11.1/go.mod h1:a4j5tnptIxdZ132XboR6uQM/ZHcuv/hLqA6hH3NJWgk= cloud.google.com/go/datastream v1.11.2/go.mod h1:RnFWa5zwR5SzHxeZGJOlQ4HKBQPcjGfD219Qy0qfh2k= +cloud.google.com/go/datastream v1.12.0/go.mod h1:RnFWa5zwR5SzHxeZGJOlQ4HKBQPcjGfD219Qy0qfh2k= cloud.google.com/go/deploy v1.17.1/go.mod h1:SXQyfsXrk0fBmgBHRzBjQbZhMfKZ3hMQBw5ym7MN/50= cloud.google.com/go/deploy v1.20.0/go.mod h1:PaOfS47VrvmYnxG5vhHg0KU60cKeWcqyLbMBjxS8DW8= cloud.google.com/go/deploy v1.22.0/go.mod h1:qXJgBcnyetoOe+w/79sCC99c5PpHJsgUXCNhwMjG0e4= cloud.google.com/go/deploy v1.23.0/go.mod h1:O7qoXcg44Ebfv9YIoFEgYjPmrlPsXD4boYSVEiTqdHY= cloud.google.com/go/deploy v1.23.1/go.mod h1:h9uVCWxSDanXUereI5WR+vlZdbPJ6XGy+gcfC25v5rM= cloud.google.com/go/deploy v1.25.0/go.mod h1:h9uVCWxSDanXUereI5WR+vlZdbPJ6XGy+gcfC25v5rM= +cloud.google.com/go/deploy v1.25.1/go.mod h1:h9uVCWxSDanXUereI5WR+vlZdbPJ6XGy+gcfC25v5rM= cloud.google.com/go/dialogflow v1.49.0/go.mod h1:dhVrXKETtdPlpPhE7+2/k4Z8FRNUp6kMV3EW3oz/fe0= cloud.google.com/go/dialogflow v1.55.0/go.mod h1:0u0hSlJiFpMkMpMNoFrQETwDjaRm8Q8hYKv+jz5JeRA= cloud.google.com/go/dialogflow v1.57.0/go.mod h1:wegtnocuYEfue6IGlX96n5mHu3JGZUaZxv1L5HzJUJY= cloud.google.com/go/dialogflow v1.58.0/go.mod h1:sWcyFLdUrg+TWBJVq/OtwDyjcyDOfirTF0Gx12uKy7o= cloud.google.com/go/dialogflow v1.58.1/go.mod h1:PjsrI+d2FI4BlGThxL0+Rua/g9vLI+2A1KL7s/Vo3pY= cloud.google.com/go/dialogflow v1.60.0/go.mod h1:PjsrI+d2FI4BlGThxL0+Rua/g9vLI+2A1KL7s/Vo3pY= +cloud.google.com/go/dialogflow v1.61.0/go.mod h1:PjsrI+d2FI4BlGThxL0+Rua/g9vLI+2A1KL7s/Vo3pY= cloud.google.com/go/dlp v1.11.2/go.mod h1:9Czi+8Y/FegpWzgSfkRlyz+jwW6Te9Rv26P3UfU/h/w= cloud.google.com/go/dlp v1.15.0/go.mod h1:LtPZxZAenBXKzvWIOB2hdHIXuEcK0wW0En8//u+/nNA= cloud.google.com/go/dlp v1.18.0/go.mod h1:RVO9zkh+xXgUa7+YOf9IFNHL/2FXt9Vnv/GKNYmc1fE= @@ -349,6 +355,7 @@ cloud.google.com/go/longrunning v0.5.11/go.mod h1:rDn7//lmlfWV1Dx6IB4RatCPenTwwm cloud.google.com/go/longrunning v0.6.0/go.mod h1:uHzSZqW89h7/pasCWNYdUpwGz3PcVWhrWupreVPYLts= cloud.google.com/go/longrunning v0.6.1/go.mod h1:nHISoOZpBcmlwbJmiVk5oDRz0qG/ZxPynEGs1iZ79s0= cloud.google.com/go/longrunning v0.6.2/go.mod h1:k/vIs83RN4bE3YCswdXC5PFfWVILjm3hpEUlSko4PiI= +cloud.google.com/go/longrunning v0.6.3/go.mod h1:k/vIs83RN4bE3YCswdXC5PFfWVILjm3hpEUlSko4PiI= cloud.google.com/go/managedidentities v1.6.5/go.mod h1:fkFI2PwwyRQbjLxlm5bQ8SjtObFMW3ChBGNqaMcgZjI= cloud.google.com/go/managedidentities v1.6.11/go.mod h1:df+8oZ1D4Eri+NrcpuiR5Hd6MGgiMqn0ZCzNmBYPS0A= cloud.google.com/go/managedidentities v1.7.0/go.mod h1:o4LqQkQvJ9Pt7Q8CyZV39HrzCfzyX8zBzm8KIhRw91E= @@ -391,6 +398,7 @@ cloud.google.com/go/networkmanagement v1.14.0/go.mod h1:4myfd4A0uULCOCGHL1npZN0U cloud.google.com/go/networkmanagement v1.14.1/go.mod h1:3Ds8FZ3ZHjTVEedsBoZi9ef9haTE14iS6swTSqM39SI= cloud.google.com/go/networkmanagement v1.15.0/go.mod h1:Yc905R9U5jik5YMt76QWdG5WqzPU4ZsdI/mLnVa62/Q= cloud.google.com/go/networkmanagement v1.16.0/go.mod h1:Yc905R9U5jik5YMt76QWdG5WqzPU4ZsdI/mLnVa62/Q= +cloud.google.com/go/networkmanagement v1.17.0/go.mod h1:Yc905R9U5jik5YMt76QWdG5WqzPU4ZsdI/mLnVa62/Q= cloud.google.com/go/networksecurity v0.9.5/go.mod h1:KNkjH/RsylSGyyZ8wXpue8xpCEK+bTtvof8SBfIhMG8= cloud.google.com/go/networksecurity v0.9.11/go.mod h1:4xbpOqCwplmFgymAjPFM6ZIplVC6+eQ4m7sIiEq9oJA= cloud.google.com/go/networksecurity v0.10.0/go.mod h1:IcpI5pyzlZyYG8cNRCJmY1AYKajsd9Uz575HoeyYoII= @@ -491,6 +499,7 @@ cloud.google.com/go/run v1.5.0/go.mod h1:Z4Tv/XNC/veO6rEpF0waVhR7vEu5RN1uJQ8dD1P cloud.google.com/go/run v1.6.0/go.mod h1:DXkPPa8bZ0jfRGLT+EKIlPbHvosBYBMdxTgo9EBbXZE= cloud.google.com/go/run v1.6.1/go.mod h1:IvJOg2TBb/5a0Qkc6crn5yTy5nkjcgSWQLhgO8QL8PQ= cloud.google.com/go/run v1.7.0/go.mod h1:IvJOg2TBb/5a0Qkc6crn5yTy5nkjcgSWQLhgO8QL8PQ= +cloud.google.com/go/run v1.8.0/go.mod h1:IvJOg2TBb/5a0Qkc6crn5yTy5nkjcgSWQLhgO8QL8PQ= cloud.google.com/go/scheduler v1.10.6/go.mod h1:pe2pNCtJ+R01E06XCDOJs1XvAMbv28ZsQEbqknxGOuE= cloud.google.com/go/scheduler v1.10.12/go.mod h1:6DRtOddMWJ001HJ6MS148rtLSh/S2oqd2hQC3n5n9fQ= cloud.google.com/go/scheduler v1.11.0/go.mod h1:RBSu5/rIsF5mDbQUiruvIE6FnfKpLd3HlTDu8aWk0jw= @@ -648,6 +657,8 @@ github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwm github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= @@ -672,6 +683,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1/go.mod h1:4UoMYEZOC0yN/sPGH76KPkkU7zgiEWYWL9vwmbnTJPE= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.46.1/go.mod h1:sEGXWArGqc3tVa+ekntsN65DmVbVeW+7lTKTjZF3/Fo= From f4c1ac651f453b5970402d2f1d3d918e93d05c44 Mon Sep 17 00:00:00 2001 From: Cody Oss <6331106+codyoss@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:56:22 -0600 Subject: [PATCH 10/11] fix: remove dep hacks for old cycle deps (#2908) I believe our dep cycle issues should have been fixed in #2907. Verified issue in #2543 is fixed with this change. Fixes: #2559 --- doc.go | 8 -------- go.mod | 3 +-- go.sum | 4 ---- go.work.sum | 2 ++ 4 files changed, 3 insertions(+), 14 deletions(-) diff --git a/doc.go b/doc.go index 14301f97d95..7245b08a77c 100644 --- a/doc.go +++ b/doc.go @@ -143,11 +143,3 @@ // // Do something with the response // fmt.Println(op.Response) package api - -import ( - // Force dependency on main module to ensure it is unambiguous during - // module resolution. - // See: https://github.com/googleapis/google-api-go-client/issues/2559. - _ "cloud.google.com/go/civil" - _ "google.golang.org/genproto/googleapis/type/datetime" -) diff --git a/go.mod b/go.mod index ac892ecc836..1af164030ae 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module google.golang.org/api go 1.21 require ( - cloud.google.com/go v0.116.0 cloud.google.com/go/auth v0.12.1 cloud.google.com/go/auth/oauth2adapt v0.2.6 cloud.google.com/go/compute/metadata v0.5.2 @@ -18,7 +17,6 @@ require ( golang.org/x/oauth2 v0.24.0 golang.org/x/sync v0.10.0 golang.org/x/time v0.8.0 - google.golang.org/genproto v0.0.0-20241206012308-a4fef0638583 google.golang.org/genproto/googleapis/bytestream v0.0.0-20241206012308-a4fef0638583 google.golang.org/genproto/googleapis/rpc v0.0.0-20241206012308-a4fef0638583 google.golang.org/grpc v1.67.1 @@ -35,4 +33,5 @@ require ( golang.org/x/crypto v0.30.0 // indirect golang.org/x/sys v0.28.0 // indirect golang.org/x/text v0.21.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 // indirect ) diff --git a/go.sum b/go.sum index b1fdff21a92..ec1c5afc264 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -cloud.google.com/go v0.116.0 h1:B3fRrSDkLRt5qSHWe40ERJvhvnQwdZiHu0bJOpldweE= -cloud.google.com/go v0.116.0/go.mod h1:cEPSRWPzZEswwdr9BxE6ChEn01dWlTaF05LiC2Xs70U= cloud.google.com/go/auth v0.12.1 h1:n2Bj25BUMM0nvE9D2XLTiImanwZhO3DkfWSYS/SAJP4= cloud.google.com/go/auth v0.12.1/go.mod h1:BFMu+TNpF3DmvfBO9ClqTR/SiqVIm7LukKF9mbendF4= cloud.google.com/go/auth/oauth2adapt v0.2.6 h1:V6a6XDu2lTwPZWOawrAa9HUK+DB2zfJyTuciBG5hFkU= @@ -53,8 +51,6 @@ golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= golang.org/x/time v0.8.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -google.golang.org/genproto v0.0.0-20241206012308-a4fef0638583 h1:pjPnE7Rv3PAwHISLRJhA3HQTnM2uu5qcnroxTkRb5G8= -google.golang.org/genproto v0.0.0-20241206012308-a4fef0638583/go.mod h1:dW27OyXi0Ph+N43jeCWMFC86aTT5VgdeQtOSf0Hehdw= google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697 h1:pgr/4QbFyktUv9CtQ/Fq4gzEE6/Xs7iCXbktaGzLHbQ= google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697/go.mod h1:+D9ySVjN8nY8YCVjc5O7PZDIdZporIDY3KaGfJunh88= google.golang.org/genproto/googleapis/bytestream v0.0.0-20241206012308-a4fef0638583 h1:QNxhiucJGWLF/fFpnyTIk8GdEGTa6tUC7/JYG7VN3XU= diff --git a/go.work.sum b/go.work.sum index 9b2524f3964..67264de29b2 100644 --- a/go.work.sum +++ b/go.work.sum @@ -4,6 +4,8 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.110.2/go.mod h1:k04UEeEtb6ZBRTv3dZz4CeJC3jKGxyhl0sAiVVquxiw= cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= +cloud.google.com/go v0.112.2 h1:ZaGT6LiG7dBzi6zNOvVZwacaXlmf3lRqnC4DQzqyRQw= +cloud.google.com/go v0.112.2/go.mod h1:iEqjp//KquGIJV/m+Pk3xecgKNhV+ry+vVTsy4TbDms= cloud.google.com/go/accessapproval v1.7.5/go.mod h1:g88i1ok5dvQ9XJsxpUInWWvUBrIZhyPDPbk4T01OoJ0= cloud.google.com/go/accessapproval v1.7.11/go.mod h1:KGK3+CLDWm4BvjN0wFtZqdFUGhxlTvTF6PhAwQJGL4M= cloud.google.com/go/accessapproval v1.8.0/go.mod h1:ycc7qSIXOrH6gGOGQsuBwpRZw3QhZLi0OWeej3rA5Mg= From 71a90821956464e97f84bc7cf8aac0ea14f10adf Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:16:23 -0600 Subject: [PATCH 11/11] chore(main): release 0.211.0 (#2898) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGES.md | 18 ++++++++++++++++++ internal/version.go | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index e8d2bf969cd..3bfd776d0c5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,23 @@ # Changes +## [0.211.0](https://github.com/googleapis/google-api-go-client/compare/v0.210.0...v0.211.0) (2024-12-10) + + +### Features + +* **all:** Auto-regenerate discovery clients ([#2897](https://github.com/googleapis/google-api-go-client/issues/2897)) ([a7a9149](https://github.com/googleapis/google-api-go-client/commit/a7a9149289b538150b5ec600a19899ce3b19d3b7)) +* **all:** Auto-regenerate discovery clients ([#2899](https://github.com/googleapis/google-api-go-client/issues/2899)) ([587a11d](https://github.com/googleapis/google-api-go-client/commit/587a11df23378396e3e174fd7021afcb4c59db0e)) +* **all:** Auto-regenerate discovery clients ([#2902](https://github.com/googleapis/google-api-go-client/issues/2902)) ([d4cb90f](https://github.com/googleapis/google-api-go-client/commit/d4cb90f490006155566779810a37100c56a57780)) +* **all:** Auto-regenerate discovery clients ([#2903](https://github.com/googleapis/google-api-go-client/issues/2903)) ([6528fb2](https://github.com/googleapis/google-api-go-client/commit/6528fb2369704b3448dc2144cff0624e40072ca8)) +* **all:** Auto-regenerate discovery clients ([#2905](https://github.com/googleapis/google-api-go-client/issues/2905)) ([f37ece7](https://github.com/googleapis/google-api-go-client/commit/f37ece71d34f784c1b8bd65ec8c17cee4f306deb)) +* **all:** Auto-regenerate discovery clients ([#2906](https://github.com/googleapis/google-api-go-client/issues/2906)) ([91960b1](https://github.com/googleapis/google-api-go-client/commit/91960b196e5b2dedfc21045964b07944d284a629)) +* **transport:** Remove deprecated EXPERIMENTAL OpenCensus trace context propagation ([#2901](https://github.com/googleapis/google-api-go-client/issues/2901)) ([2b3363e](https://github.com/googleapis/google-api-go-client/commit/2b3363e799feff4ed8d191bc69cd3afdb70f1f99)) + + +### Bug Fixes + +* Remove dep hacks for old cycle deps ([#2908](https://github.com/googleapis/google-api-go-client/issues/2908)) ([f4c1ac6](https://github.com/googleapis/google-api-go-client/commit/f4c1ac651f453b5970402d2f1d3d918e93d05c44)), refs [#2559](https://github.com/googleapis/google-api-go-client/issues/2559) + ## [0.210.0](https://github.com/googleapis/google-api-go-client/compare/v0.209.0...v0.210.0) (2024-12-04) diff --git a/internal/version.go b/internal/version.go index 7211ffe0305..ab745d712b9 100644 --- a/internal/version.go +++ b/internal/version.go @@ -5,4 +5,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.210.0" +const Version = "0.211.0"